The last couple of years have been truly horrific for investors in a number of resources companies. Profits have tumbled, share prices have plunged and investor sentiment towards mining and oil and gas companies in particular has weakened significantly.

However, in recent months the outlook for a number of commodities has improved dramatically. For example, since the turn of the year gold has risen by around 18% while the price of oil is now almost 80% higher than it was earlier in the year. For many investors, such figures may mean that commodities as a whole are worth investing in. But in reality, it depends on which commodity is being discussed. In other words, some commodities may perform well, while others see their prices come under pressure.

Black gold

One commodity with strong long term growth appeal is oil. Clearly, it has already risen dramatically in price in recent months, but there could be much more to come over the long run as the current supply/demand imbalance begins to change.

A key reason for that is a forecast increase in demand from the emerging world for oil. With industrialisation likely to continue and energy use across the developing world set to increase as incomes rise and car ownership and transport use increase, demand for oil is likely to do the same. And while cleaner forms of energy are becoming more prevalent in the developed world (in particular as technology improves at a rapid rate), fossil fuels such as oil are still forecast to be a major part of the energy mix in the coming decades.

Iron and steel

It’s a similar story for iron ore, since demand from the emerging world that will continue to industrialise is likely to rise for the steelmaking ingredient. However, the outlook for iron ore may be somewhat less appealing than is the case for oil, since the Chinese economy is gradually transitioning away from capital expenditure-led projects and towards a more consumer-led economy. This means that while demand for iron ore could rise in future, it may be constrained somewhat by moderating demand from China.

Safe haven?

Meanwhile, gold’s future is somewhat uncertain. On the one hand it could benefit from an uncertain economic outlook and continue to be popular among investors due to its status as a perceived safer asset. However, with interest rate rises on the horizon, gold’s appeal may be held back somewhat and if comments made by San Francisco Federal Reserve President John Williams are accurate, then a rate hike could take place imminently, with further rises in 2017. Such a situation could cause the price of gold to disappoint compared to its recent performance.

Clearly, the long-term outlook for oil, iron ore, gold and all other commodities is highly uncertain and there could be significant volatility in the short-to-medium term. As such, it seems sensible for investors to diversity and pick out companies that offer a wide margin of safety and have significant financial resources.

Of course, finding the best commodity stocks at the lowest prices can be challenging when work and other commitments get in the way.

That's why the analysts at The Motley Fool have written a free and without obligation guide called 10 Steps To Making A Million In The Market.

It's a step-by-step guide that could make a real difference to your financial future and allow you to retire early, pay off your mortgage, or even build a seven-figure portfolio.

Click here to get your free and without obligation copy - it's well-worth a read!