If you bought shares in mining giants Glencore (LSE: GLEN) and Rio Tinto (LSE: RIO) at the start of 2016, then congratulations. Your Glencore shares have increased in value by 162%, while Rio’s more modest 32% gain is nearly three times what the FTSE 100 has managed.

However, longer-term investors may find their holdings are still underwater. Rio shares are worth 16% less than they were two years ago, while for Glencore this figure is 26%.

All of which leaves us with a dilemma: are mining stocks now fully priced, or is this sector’s recovery only just getting started?

What’s new?

Glencore said this morning that it has agreed a deal to sell its Australian coal haulage business for $874m. The sale takes chief executive Ivan Glasenberg to within a whisker of his $5bn target for asset sales in 2016.

Although the deal isn’t huge for a company of Glencore’s scale, it does suggest that the firm is still working hard to cut debt, despite commodity markets becoming more stable.

Rail operations were also in focus at Rio Tinto today. The group said that port and rail maintenance operations had restricted iron ore shipments during the quarter. Full-year shipment guidance has been reduced slightly from “around 330m tonnes” to “between 325 and 330m tonnes” for 2016.

This clearly isn’t a major issue, especially as Rio is in the process of introducing an automated rail system that should cut costs and allow increased shipments.

Don’t make this classic mistake

Glencore shares currently trade on a 2017 forecast P/E of 24, while Rio has a 2017 P/E of 14. Neither of these seems obviously cheap. After all, these big miners aren’t exactly growth businesses.

However, it’s important to remember that mining is heavily cyclical. Such businesses tend to look cheap on the way down, and expensive on the way up. Although the weaker pound has given miners’ earnings a boost for UK investors, I think there could be more to come.

Let me show you what I mean. Since the start of this year, the price of Australian thermal coal — an important product for Glencore and Rio Tinto — has doubled in value to $100 per tonne. This rebound is the result of China’s government placing restrictions on domestic production.

I believe we’re seeing something similar in the oil market, where after a long period of surplus, US oil storage levels have started to fall steadily towards historically normal levels.

At some point, I suspect the price of iron ore and copper will also recover. Low prices reduce investment in new production. Eventually, any surplus in the market will disappear, either because production falls or because demand rises.

At that point we could see dramatic price rises, as has happened with coal this year. In the meantime, Rio Tinto and Glencore both have the low costs and strong cash flow needed to ride out this downturn.

A mining recovery already seems to be under way, but as a shareholder in Rio Tinto and some other mining stocks, I believe there’s probably still more to come. I’m holding onto my shares in Rio and believe that both Rio and Glencore offer value at current levels.

Read this before you act

Of course, I may be wrong. Growth remains uncertain in many parts of the world, and it's hard to predict what the Chinese government will do next.

If you're hoping to build a portfolio to fund your retirement, I believe you should also be considering stocks from other sectors and to help you get started, the Fool's top experts have put together a report containing their five best big-cap investment picks.

It's called 5 Shares To Retire On and is completely free and without obligation. To get your copy today, just click here now.

Roland Head owns shares of Rio Tinto. 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.