Is it too late to buy Royal Dutch Shell plc (+33%) and BP plc (+25%)?

I don’t know about you, but two of the best-performing shares in my portfolio since the referendum have been Royal Dutch Shell (LSE: RDSB) and BP (LSE: BP).

BP shares have risen by 15% since last Friday, while Shell has managed a 9% increase. These rapid gains mean that BP has climbed 25% so far this year. Shell is up 34%.

It’s no coincidence that the UK’s big oil stocks have done well recently. A weaker pound means that their US dollar earnings are worth more in sterling than they used to be. Because both firms’ dividends are set in US dollars, UK shareholders may now receive higher dividend payments than before the referendum.

For overseas investors, the falling pound means that BP and Shell shares have become cheaper to buy.

The other factor powering BP and Shell higher is that while both are based in the UK, they don’t do much business here. Leaving the EU is unlikely to have any real effect on either company’s business.

But of far more importance is that the oil market appears to be starting to rebalance. US oil production has fallen by almost one million barrels per day over the last year, according to the latest US government figures. Oil production is also falling in some other areas due to lack of investment.

What comes next for BP?

Brent crude oil is currently stable at about $50 per barrel. In its first quarter update, BP said that if oil stabilises between $50-$55 per barrel, it would expect to become cash flow neutral in 2017.

This would mean that BP’s income and spending — including the dividend — will be balanced and sustainable. I think we’re close enough now to that target to be able to assume that BP’s dividend will be safe. Even after recent gains, the firm’s shares still offer a forecast yield of 6.7%.

Although BP shares may look expensive on a 2016 forecast P/E of 30, this is expected to fall to a P/E of 15 in 2017, as profits recover. Cyclical companies often have high P/E ratios when they emerge from major downturns.

In my view, BP shares remain a decent buy for dividend investors.

Shell needs $60 oil

Shell has based its forecasts on the assumption that Brent crude will hit $60. We’re not there yet, but I think oil is likely to reach this level over the next year or so.

In the meantime, Shell is busy integrating the assets of BG Group, which it acquired earlier this year. Cost savings are expected to reach $4.5bn by 2018, 30% more than originally expected.

Shell also expects to be able to absorb BG’s operating and capital expenditure in 2016 without any increase on Shell’s standalone figures from 2015.

In a recent presentation to analysts, Shell indicated that if oil reaches $60, annual free cash flow could reach $20bn-$25bn by 2020. To put that in context, the current dividend costs less than $15bn per year.

Like BP, Shell doesn’t appear cheap on a 2016 forecast P/E of 22. But earnings forecasts are rising. The group’s profits are expected to increase by more than 65% in 2017. With a prospective yield of 6.7%, I believe Shell remains a solid long-term income buy.

Today's best dividend buy?

I'm positive on BP and Shell. But the Motley Fool's top analysts aren't convinced and didn't select any oil stocks for their latest dividend investing report, 5 Shares To Retire On.

This exclusive new report contains details of five companies our experts believe have the potential to beat the wider market.

If you already own shares in BP or Shell, these companies could be ideal additions to your portfolio. This report is free and without obligation. I urge you to take a look.

To download your copy, just click here now.

Roland Head owns shares of BP and Royal Dutch Shell. The Motley Fool UK has recommended BP and Royal Dutch Shell B. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.