It is fair to say the last decade has not been kind to BP. With a total bill of $61.6bn due to the 2010 disaster compounded with historically low crude oil prices, exponential growth in US shale production, and OPEC which has had, at best, a tenuous grip on the affairs of oil in recent years.

As BP prepares for oil at $50 a barrel well into the 2020s, you may be forgiven for thinking there is little hope at the end of this tunnel.

It may also be said that BPs recent disastrous past has a lingering effect on investors to this day, once bitten twice shy as the proverb goes. Despite the turmoil in recent years, and factors quite outside of Bob Dudleys (BP CEO) control, BP has arguably fared extremely well.

Recent years have seen radical change for BP, with large scale restructuring and efficiency savings as the primary agenda. This strategy has been widely considered as being executed well and with excellent outcomes by the financial community.

BP have recently stated that they generally expect the price of crude to remain at around $50/barrel well into the 2020s. Due to this expectation, restructuring efforts have meant the sale and overhaul of various assets to ensure the company can remain profitable at this price point for the mid to long term.

This has allowed BP to retain dividends of over 6%, and it has reiterated its commitments to maintain the current dividend in its drive to return most profits back to shareholders.

The latest quarterly report from BP, published August the 2nd, indicates better than expected performance. Underlying profits on a replacement cost basis were £516.8 million in Q2. This is considerably better than the £384 million expected by forecasters.

As BP operates on a truly global scale, the vast majority of its revenue, and thus profits, are made outside of the UK.

This has resulted in favorable conditions in which to convert foreign income into sterling as the pound weakened after the UK referendum on leaving the EU.

In short, a weak pound is good news for BP. This is amplified by a weaker pound reducing the price for foreign investors to buy UK equities, such as BP.

Broadly because of this, the FTSE 100 has climbed from around 6,000 to 7,542, a record level.

If Brexit talks continue to falter, and there is no deal in place by the end of next year, then the pound will almost certainly depreciate compared to its current value. This is likely to cause further growth in the FTSE100, and an increased share price for companies such as BP.

The trend of low price crude oil seen today appears set to continue, and it is true that this is not all bad news for BP. While upstream production and drilling is clearly disadvantaged by low crude prices, downstream manufacturing has benefitted substantially from lower input costs as a result of the low price of crude.

This goes someway in acting as a hedge against both high and low oil prices.

The sale of assets continues as per BP’s decision to exit exploration assets in Angola. This contributed to $753 million of write-offs in the quarter, meaning that the profits were still lower than a year earlier and against the $1.5 billion recorded in Q1.

As noted earlier, BP has still exceeded analyst expectations for Q2, and despite significant write-offs it remains in a strong position going forward.

This is in-line with excellent industry wide results for Q2, as Royal Dutch Shell and Total has similarly posted excellent results in recent days.

As BP moves forward over the next few years, it will invest only in upstream projects that are newer, and viable at the lower price of oil seen in recent times.

This sustainable approach appears to set BP upon solid foundations with which to continue its commitment of high dividends while stabilizing the company against the backdrop of an increasingly difficult environment.

While talking about BP, it is important to not have tunnel vision in relation to the wider factors involved in making BP a success in the coming years.

As in 2015, the strength in oil demand was most pronounced in consumer-led fuels, such as gasoline, buoyed by low prices. In contrast, diesel demand, which was more exposed to the industrial slowdown, including in the US and China, declined for the first time since 2009.

Recent reports show that the weakness on the supply side was driven by non-OPEC production which fell by 0.8 Mb/d (millions of barrels per day), its largest decline for almost 25 years. This fall was led by US tight oil, whose production fell 0.3 Mb/d, a swing of almost 1 Mb/d relative to growth in 2015. China also experienced its largest ever decline in oil production (-0.3 Mb/d).

In contrast, OPEC production recorded another year of solid growth (1.2 Mb/d), with Iran (0.7 Mb/d), Iraq (0.4 Mb/d) and Saudi Arabia (0.4 Mb/d) more than accounting for the increase. Iran’s production and its share of OPEC output are now both back around pre-sanction levels.

The combination of strong demand and weak supply was sufficient to move the oil market broadly back into balance by the middle of the year.

OPECs strength is that it can manage and control the rate of oil production from one point in time to another. This allows it to smooth through the effects of temporary shocks of changes in supply or demand, and this shifting of production from one period in time to another allows stability until the shock subsides.

OPEC has generally a strong ability to deal with short term volatility in both supply and demand, but the long term shocks of the last decade have remained a constant concern.

This lack of ability to deal with permanent shocks stems from the primary recourse for OPEC being largely ineffective. Shifting oil production from one month to another does nothing to resolve the massive increases in production in places such as the US.

An example of this may be the unsuccessful attempts by OPEC in the 1980s to support and stabilize the oil markets in the wake of new production from Alaska and the North Sea.

The source of today’s imbalance in supply emerged in 2014 with the revolution of shale oil in the US. To use the Minister’s words, this was not a short-term aberration; it was the emergence of a new source of intra-marginal supply.

In contrast, the focus now is on increasing the pace at which the huge overhang of oil stocks is drawn down to more normal levels. This is exactly the type of temporary adjustment in which OPEC intervention can be effective – reducing supply until stocks have adjusted.

As perhaps is true in all the best stories, the actions of the main characters make a great deal of sense when seen in the right context. OPEC remains a powerful, even central force, being able to effectively manage and stabalise the oil market. Yet it is the nature of this power, that means it is only really effective in short term issues of supply and demand, and not the structural shifts we have seen in recent years.

As the world reduces its ecological footprint due to adverse consequences of global warming, the demand in certain areas for oil is forecasted to decline. The UK government has recently unveiled plans to eliminate diesel by 2040 in the automobile industry.

There has already been some expansion in green technologies by major oil firms, with BP considering further expansion in Wind Farms, it is already the biggest renewable energy provider compared to the other major oil companies.

BP have shown strong performance in recent years in its downstream businesses, such as its involvement in biofuel processing for products such as bioethanol. This is another green technology which holds the promise of being low cost, low carbon, scalable and competitive without subsidies.

Talks are currently in progress between BP and major car producers in the hope of fulfilling the growing need for charging stations for electric cars.

Following BPs better than expected results, the firm raised its 2018 and 2019 earnings per share estimate by about 7 percent each year and raised its forward cash flow estimates by 1 percent. This is perhaps indicative of BPs future.

Since Brexit the price of BP has remain relatively high compared to the last 10 or so years. It is also true that demand in unlikely to change significantly in the short to medium turn.

That said, BP remains highly attractive as a long term position, paying a 6%+ annual dividend which will remain relatively consistent over the next few years, barring any major disasters.

There is opportunity to capitalise on increased share prices if Brexit or the wider UK economy falters this year or next.

My general opinion is that BP is still avoided by some investors due to its disastrous past, potentially reducing demand for its shares.

This all equates to what is potentially a very smart investment.