Trying to run a long-term portfolio with just two shares would probably end in tears. But if I did try to make it work, iron ore giant Rio Tinto (LSE: RIO) and consumer goods firm Unilever (LSE: ULVR) would definitely be on my short list.

Both companies have proud records of shareholder returns, strong cash generation and high profit margins. Both companies have quality assets which give them a sustainable advantage and defensible profits.

I own shares in Rio and Unilever and have no intention of selling. However, I must admit that I’d only be prepared to buy one of these companies in today’s market.

Owning great assets

Rio and Unilever are obviously very different businesses. What they have in common, however, is that they are both able to generate attractive profits from selling products that are really quite ordinary.

In Rio’s case, this is because the firm’s iron ore mines in Western Australia are larger and have lower costs than most of their competitors. Rio produced iron ore at a cash cost of just $14.90/tonne in 2015. The firm’s average sales price was $48.40/tonne. It’s hard to imagine Rio ever not being able to make a profit from its iron ore business.

At Unilever, the asset which provides the firm with above-average profits is its portfolio of brands. A Magnum ice cream will sell for a higher price than a supermarket own-brand alternative, even if the two products are essentially identical. The same is true across Unilever’s product range. Customer loyalty to well-known brands is very hard to shake.

As investors, buying shares in companies such as Rio Tinto and Unilever gives us a chance to enjoy the benefits of part-ownership of world class assets. In my view, both companies are long-term holds with the potential to beat the market.

The secret to actually beating the market lies in buying at the right time.

Is now the time to buy?

I remember reading an article a couple of years ago suggesting that 2,000p was about the right price for Rio Tinto shares. At the time they were trading close to 3,000p, which I thought was quite reasonable.

I was wrong. Rio shares bottomed out at around 1,600p earlier this year, and now trade at around 2,100p. The dividend is expected to fall by 45% to $1.19 per share this year, giving a forecast yield of 3.8%.

Rio’s adjusted earnings per share are expected to be flat this year, before rising by about 30% next year. This forecast puts the firm’s shares on a 2017 P/E of 16, but I don’t think this is too expensive for this low point in the mining cycle. I believe now is the time to be building a long-term position in Rio stocks — before the market recovers.

I’m not so sure about Unilever. I admire this firm’s long-term growth and strong free cash flow, which consistently covers the dividend. But I think Unilever shares look very expensive, on around 21 times forecast earnings.

Profits are only expected to rise by around 3% in 2016. My concern is that buying Unilever at today’s price may result in below-average returns over the next few years. I’m going to wait for a chance to pay a little less for Unilever.

However, being too cautious may mean that I miss out. The Motley Fool's top analysts recently scoured the FTSE 100 for their top retirement stocks and decided that Unilever does deserve a buy rating.

In 5 Shares To Retire On, the Fool's gurus explain why Unilever and four other stocks have the potential to form the core of a market-beating retirement portfolio.

If you'd like full details of all five of the stocks chosen by the Fool's experts, then download this free, no-obligation report immediately.

To get started, just click here now.

Roland Head owns shares of Rio Tinto and Unilever. The Motley Fool UK owns shares of  Unilever and 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.