In early 2012, Delta Air Lines (NYSE:DAL) surprised pundits when it revealed plans to buy an idled oil refinery in Trainer, Pennsylvania. The refinery had been shut down due to persistent losses, and many observers doubted that Delta could operate the facility profitably when a refining specialist couldn't do so.

The refinery has produced erratic results for Delta over the past 6 1/2 years, but on balance, it has helped the airline reduce fuel costs. Management believes that owning the refinery will continue to produce benefits for the airline for the foreseeable future. Nevertheless, Delta is looking to sell a stake in the refinery, bringing in a joint-venture partner that can help maximize its value.

A controversial move -- then and now

Delta's decision to buy the Trainer refinery was widely panned when it was first announced. The airline paid just $150 million for the refinery -- plus another $120 million investment to get it up and running again -- but energy-industry experts noted that the Trainer refinery had poor economics. Others warned that owning a refinery might be a distraction for management.

Not surprisingly, this criticism mounted after Delta reported a $63 million loss for the refinery in 2012 and a $116 million loss in 2013. This was a far cry from management's original estimate that the refinery would produce annual earnings of around $300 million.

However, the refinery turned profitable in 2014, earning $96 million, and posted a bumper profit of $290 million in 2015. Earnings volatility has continued in the past few years. The Trainer refinery posted an operating loss of $125 million in 2016, a $110 million operating profit in 2017, and an $89 million profit in the first half of 2018.

An oil refinery at twilight.

Image source: Getty Images.

The sharp swings in the Trainer refinery's profitability have been driven by a number of factors. First, supply and demand trends for oil and refined products impact refining margins. Natural disasters can contribute to this volatility. Additionally, regulatory costs have been erratic, depending on the price of so-called RIN credits required to meet renewable fuel production requirements.

Despite its rough start in the refining business, Delta has already recouped its initial $270 million investment. Yet many pundits continue to call the refinery purchase a failure.

Delta wants to form a joint venture

Last week, Delta Air Lines announced that it had hired two investment banks to market a joint-venture interest in the Trainer refinery. Delta wants to maintain a stake in the refinery and take the plant's jet fuel output for its operations in the Northeast. Meanwhile, its new partner would be responsible for selling the rest of the refinery's output, which includes road fuels like gasoline and diesel.

Some industry experts believe that strategic buyers may not be interested because Delta is not offering full control of the refinery. However, given that the refinery's profitability has improved dramatically compared to 2012, Delta could potentially sell a joint-venture stake to a private-equity firm or energy-trading firm at a higher valuation than its initial purchase price.

Improving its jet fuel hedge

It's true that the Trainer refinery hasn't produced the level of profits that Delta's management had expected back in 2012. Yet the main reason for the refinery purchase was not to develop a new profitable line of business, but to hedge Delta's exposure to volatility in jet fuel refining margins.

In that respect, the refinery has been more successful. When refining margins are high -- adding to the cost of jet fuel -- the refinery tends to be more profitable, offsetting Delta's incremental fuel expense. However, it's not a perfect hedge. Indeed, owning the refinery has given Delta Air Lines new exposure to changes in refining margins for other products like gasoline, diesel, and heating oil.

A properly structured joint venture could improve the hedging qualities of the Trainer refinery for Delta. The new joint-venture partner would absorb the risk (and capture the potential reward) from changes in refining margins for products other than jet fuel.

This would leave Delta with just the jet-fuel refining operations, which provide a natural hedge to changes in the market price of jet fuel relative to oil prices. In other words, finding a partner for the Trainer refinery could enable Delta Air Lines to realize the full hedging potential of its refinery business, at long last.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.