A major risk when investing in resources companies such as Anglo American (LSE: AAL) and Tullow Oil (LSE: TLW) is that commodity prices move downwards and hurt profitability. While this risk has been thrust into the forefront of investors’ minds thanks to the recent fall in oil and other commodity prices, it always exists and must be factored in before buying a slice of any resources company.

Significant upside

That’s where the idea of a “margin of safety” is invaluable. This is where a company’s current price level is below its intrinsic value, with the difference being the margin of safety. This should allow for a degree of protection on the downside, should the risks which the company faces come into being. Similarly, it may also lead to greater upside than if there were no margin of safety on offer.

In the case of Tullow Oil, it appears to offer a wide margin of safety. Clearly, the price of oil could continue its decline of the last couple of years and, if this were to happen, Tullow’s share price could be hit hard. However, with Tullow expected to transform its pre-tax profit from a loss of £926m in 2015 to a profit of £221m in 2017, it appears to offer the potential for significant upside. And with its shares trading on a price to earnings growth (PEG) ratio of just 0.1, this growth potential does not yet appear to be priced in.

The reason for the forecast rise in Tullow’s profitability is increased production. The company is set to shortly complete work on Project TEN in Ghana and the asset is due to come onstream in the middle part of 2016. Therefore, even if the price of oil does fall, Tullow’s ramp-up in production should be sufficient to offset this to a large extent. Therefore, it seems to be an opportune moment to buy it for the long term.

Raft of changes

Also offering a wide margin of safety is Anglo American. Unlike Tullow Oil, Anglo American’s profitability is expected to come under pressure in the near term, with it due to fall by as much as 61% in the current financial year. So it would be unsurprising if investor sentiment were relatively weak in the coming months.

However, with the company’s raft of changes to its business model due to have a positive impact on its bottom line in 2017, its medium term performance could be much more impressive. In areas such as cost cutting and in generating efficiencies, Anglo American is expected to make major gains and this is forecast to propel its pre-tax profit to £1.3bn next year from a guided £750m this year. With its shares trading on a PEG ratio of just 0.1, they seem to offer excellent value for money and alongside Tullow, seem to be a bargain for Foolish investors.

Of course, Anglo American and Tullow Oil aren't the only companies that could boost your portfolio returns. However, finding the best 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!

Peter Stephens owns shares of Anglo American. The Motley Fool UK has recommended Tullow Oil. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.