It’s been tough to be a commodity investor during the past two years. Plunging commodity prices, coupled with global growth concerns, have sent investors fleeing from the sector in droves, but now it appears that investor sentiment towards the sector is changing. Indeed, in the year-to-date shares in Rio Tinto (LSE: RIO) and BHP Billiton (LSE: BLT) have rallied by a staggering 36% and 59% respectively, excluding dividends. 

A weaker pound is responsible for some of these gains. Both Rio and BHP use dollars as their primary currency — virtually all commodities are traded in dollars — so, when translated back into sterling,  a weaker pound means higher profits for the two miners. Unfortunately, this is nothing more than a beneficial accounting treatment. Indeed, BHP and Rio’s US shares, which are traded in dollars and are valued based on dollar earnings, not dollar earnings translated into sterling, have only added 35% and 15% respectively year-to-date.

Still, investor sentiment towards the miners has changed dramatically over the past 12 months because miners have finally acknowledged that following a “growth-at-any-price” strategy is foolish. Instead, miners such as Rio and BHP are focused on keeping costs low, reducing debt and maximising cash generation. These miners have been forced to adopt this operating style thanks to low commodity prices, but now that they’re more disciplined in their operations, they are well placed to rapidly return to growth when the next commodity cycle begins.

This is why I believe it could be time for long-term investors to revisit BHP and Rio.

Big changes 

Thanks to management’s drive to cut costs and maximise productivity, BHP is expecting to report a free cash flow of around $7bn for the 2017 financial year, up nearly 100% from 2016’s reported figure. Some of this cash will come from asset sales — specifically, the sale of investments that have otherwise been difficult to progress. To put it another way, BHP is selling off its non-core assets to focus on higher margin projects — great news for investors. The additional cash will be used to pay off some of the company’s $26bn net debt.

Rio has also been using its “strong liquidity position” to reduce its gross debt. After a $4.5bn cash debt tender offer earlier this year, at the end of September Rio launched another $3bn bond repurchase plan. These actions show that Rio’s management is now truly focused on sensible capital allocation decisions and is not chasing growth at any price. The same can be said for BHP. The firm’s $7bn free cash flow target is shows what it can accomplish if cash returns are prioritised over growth.

The bottom line

So overall, as long-term investments BHP and Rio remain attractive even after recent gains. And City analysts are expecting big things from these companies in the near-term. 

Analysts have pencilled in earnings per share growth of 160% for BHP for the year to the end of June 2017 while Rio is expected to report a pre-tax profit of £4bn for this year, up from -£470m last year. Shares in Rio support a dividend yield of 3.3% and BHP yields 2%.

Looking for dividends?

If you're looking for dividend champions to jump-start your portfolio's income, I strongly recommend you check out this special report, which gives a rundown of what I believe is one of the hottest dividend stocks in London today.  

The exclusive report entitled A Top Income Share looks at a hidden FTSE giant that's already an income champion but is also investing for growth and these ambitious expansion plans should power dividends through the roof in the years ahead.

To discover more just click here and enjoy this exclusive wealth report. It's 100% free and comes with no obligation.

Rupert Hargreaves 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.