Knowing when to sell a stock is just as important as knowing when to buy. It often poses a greater psychological challenge as nobody likes to admit to making a bad call and losing money as a result. Sometimes you have to bite the bullet, so what should you do if you hold any of these three stocks?

Ophir Energy

January was a tough month for investors in Asia and Africa-focused gas and oil explorer Ophir Energy Plc (LSE: OPHR), but it was a tough month for pretty much every energy stock, as fears of a Chinese hard landing intensified. In the teeth of the storm, when the stock had plunged 10% in a week, I said Ophir was tough enough to battle through 2016. I’m therefore happy to report it’s up 13% in the last week.

The recovery is largely be down to oil hitting a two-month high, with Brent crude creeping above $37 a barrel (up from just $27 in January). It may struggle to climb higher with US crude inventories spiking to the highest level since April 2015, which suggests that supply will outstrip demand for some time yet, but any progress is welcome.

Ophir’s healthy balance sheet includes $650m at year-end that should cover a couple of years’ worth of capex and exploration. The recent drop in gas and LNG prices, particularly in Ophir’s Asia market, is a concern. Existing investors will still believe they can convert losses into gains but new investors should tread carefully.

Genel Energy

2015 was a tough year for Kurdistan-based oil explorer Genel Energy (LSE: GENL), which saw revenues plunge 34% to $334m due to falling oil prices, more than offsetting a 22% rise in production volumes to 84,900 bopd. The good news that the Kurdish Regional Government committed to regular payments for oil exports was more than offset by the dire news of the 75% downgrade in estimated 2P reserves at its Taq Taq field, where Genel generates around 60% of its production.

Chief executive Murat Özgül says there’s still cash to be made from 264m barrels of net 2P reserves, given that both Taq Taq and Tawke remain “low-cost oil fields by any global benchmark“. The business looks relatively solid for now, with a cash balance of $455m, against $489m in 2014, and forecast 2016 revenues of $160m to $220m, assuming $35 a barrel Brent. With the oil price rising and the bad news on Taq Taq in the price, few will want to sell now.

Xtract Resources

Mining specialist Xtract Resources (LSE: XTR) fell almost 20% in February and has failed to capitalise on the recovery in commodity prices and stocks. As well as falling prices, management has had the extra worry of failing to meet its volume targets, as its Chepica mine only has one exit point. Q3 revenues fell 16% to $375,802, although a 44% cut in costs helped drive a 39% rise in profits to $208,269. I suspect most investors will be willing to run their losses from Xtract that little bit longer, but fresh commodity price slippage will hurt.

If you're looking for smaller companies in a less risky area, this might be the place to start.

Motley Fool analyst have scoured the market for the very best opportunities and have found a hidden gem. They call it 1 Small-Cap Stock Flying 'Under The Radar'.

They consider this stock to be one of the UK's "top small-caps" whose potential upside, they reckon, could be as great as 45%!

They believe the sky's the limit for this fast-growing company, which has already delivered a powerful return.

To find out the identity of the Fool's top small-cap stock pick, simply click here to download your FREE report. This no obligation report will be yours to read in moments.

Harvey Jones has no position in any shares mentioned. The Motley Fool UK has no position in any of the shares mentioned. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.