With commodity prices having slumped in recent years, it’s little surprise that the financial performance of companies such as Premier Oil (LSE: PMO) and Glencore (LSE: GLEN) has suffered.

In fact, Premier Oil has been lossmaking in each of the last two years and Glencore’s bottom line has been in the red in two of the last three years. And with the two companies’ share prices having fallen by 84% (Premier Oil) and 69% (Glencore) in the last five years, it has clearly been a challenging period for their investors.

Period of change

In response, both have made major changes to their business models. In the case of Premier Oil, it has sought to reduce costs and generate efficiencies as it seeks to become increasingly competitive relative to its peers. It has also taken a long-term view on the current oil price decline, with Premier Oil purchasing Eon’s North Sea asset base. This indicates that it’s seeking to improve its competitive position and while a risky strategy in the short run, it could pay off through higher profitability in the long term.

Similarly, Glencore is making numerous changes to its business. Like Premier Oil, it’s in the midst of a major cost-cutting exercise and is seeking to rapidly reduce the amount of debt on its balance sheet. This is at least partly in response to investor concerns surrounding Glencore’s ability to service its debt – especially as interest rates rise. Thus far, it’s making encouraging progress, but unlike Premier Oil, Glencore is disposing of assets in order to become more streamlined and efficient. In the long run, this should create a leaner and more profitable business.

Challenges and opportunities

Clearly, both companies are enduring challenging periods and with the potential for commodity price falls, things could get worse before they get better. Therefore, it seems prudent to seek out companies within the resources space that offer a wide margin of safety.

In Premier Oil’s case, its price-to-book (P/B) ratio of 0.68 indicates that its shares are cheap. And while asset impairments are a very real threat, Premier Oil’s asset base has the potential to deliver improved financial performance over the medium-to-long term. And with Glencore trading on a P/B ratio of 0.7, it appears to offer a similarly wide margin of safety.

However, where Glencore has the edge over Premier Oil is with regards to profitability. While Premier is expected to remain lossmaking in the current year and next year, Glencore is due to record a pre-tax profit of £733m this year, followed by growth in earnings of 49% next year. This has the potential to significantly improve investor sentiment towards it and also indicates that it’s in a better financial position than Premier at the present time. So, while Premier Oil is worth buying for the long haul, Glencore seems to be rather more attractive right now.

The best stocks

Of course, finding stocks that are worth adding to your portfolio is a tough task, which is 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 simple and straightforward guide that could make a real difference to your portfolio returns. As such, 2016 could prove to be an even better year than you had thought possible.

Click here to get your copy of the guide - it's completely free and comes without any obligation.

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