When two company share prices move in synchronised lockstep you know that wider market conditions are to blame rather than individual company quirks.

Mining giants BHP Billiton (LSE: BLT) and Rio Tinto (LSE: RIO) are both up around 23% over the last month as investors decide they’ve overdone the commodity sell-off and there are bargains to be had in this sector.

This is a clear example of how shifts in investor sentiment can drive share prices, even when they fundamentals haven’t changed that much. While Rio Tinto is seen as the stronger company with a more solid balance sheet, this shift is affecting both stocks in equal measure.

Metal gurus

If you were canny enough to dive into either of these stocks at their recent lows, then I congratulate you. You spotted a valuation opportunity and took it.

Neither company has risen because it delivered good news to investors, quite the reverse.

Rio Tinto recently posted a full-year loss of $866m, a shocking collapse from last year’s profit of $6.5bn. Except of course investors weren’t shocked, they knew exactly what to expect.

Which is why they were willing to dig a little deeper, and unearth comforting nuggets such as the fact that Rio actually made an underlying profit of $4.5bn last year (provided you overlook minor matters such as impairments, writedowns and derivatives losses).

Rio grande

Investors were also relieved that Rio Tinto will be paying its full-year dividend of $2.15 per share, even though management’s decision to scrap its progressive policy is surely laying the groundwork for a cut later this year.

Thanks to lower cost production, net cash flows of $9.4bn and a relatively healthy net-to-debt equity ratio of 24%, Rio looks better placed to withstand the commodity price downturn than many of its rivals, despite its heavy dependency on a single metal, iron ore. But even at today’s valuation of 11.66 times earnings it could struggle to maintain its share price comeback in the face of further commodity price volatility. Natural resources stocks aren’t out of their hole yet.

Thanks a Billiton

BHP Billiton’s rebound is even more surprising after this week’s 74% cut in its interim dividend from 62 cents to 16 cents, ending 15 years of increases. With a double-digit yield and wafer thin cover, markets knew what was going to happen and had already assumed the brace position. Maybe they were simply glad that management had finally got the bad news out of the way.

The dividend cut was actually worse than markets expected but couldn’t be avoided following the 84% plunge in operating profits to $1.3bn and statutory loss of $5.7bn on impairment charges. With BHP’s management steeling itself for a prolonged period of volatile commodity prices, investors were happy to wrap themselves in the comfort blanket of a pledge to pay out 50% of earnings in future. With BHP Billiton’s net debt rising another $1.5bn to $25.9bn, and gearing up from 22.4% to 29.7%, the future will remain rocky.

BLT and RIO are relying on cutting capex and slashing costs to help them muddle through the current crisis, but ultimately both need a recovery in commodity prices, which I don’t see coming just yet. The recent comeback has been impressive but today’s buyers should still dig-in for the long haul.

While many FTSE 100 companies have been slashing their dividends other stocks offer great income prospects.

We at the Motley Fool identify a top dividend stock with great prospects in this BRAND NEW report A Top Income Share from The Motley Fool.

While many leading UK companies are slashing their dividends, this FTSE 250 star accelerated its payout at astonishing speed in 2015.

The Fool's crack team of analysts is so impressed by this company's ambitious growth plans they are happy to call it one of the best income stocks on the market today.

Click here to enjoy this FREE, no-obligation wealth report. It will be yours in moments and won't cost you a penny.

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