What happened

Last year was another volatile one for investors in Energy Transfer (NYSE:ET). Units of the midstream giant surged by double digits out of the gate, only to tumble at the end of March, before clawing most of their way back by midsummer.

However, a late swoon in the oil and stock market wiped away those gains, and then some: The company shed 23.5% of its value last year, according to data provided by S&P Global Market Intelligence. Here's a look at what fueled its turbulent year.

Barrels of oil rising in height, with an upward-pointing red arrow in the background

Image source: Getty Images.

So what

Energy Transfer accomplished a lot last year. It streamlined its corporate structure by acquiring its MLP, made several moves to shore up its balance sheet, and delivered strong earnings and cash flow growth as its expansion projects continued paying dividends. The company also finished work on two key pipelines toward the end of 2018 that will fuel growth in 2019, while securing several new projects that will enable it to maintain its momentum beyond this year.

However, despite all that progress, Energy Transfer tumbled under the weight of falling oil prices during the final few months of the year. Overall, crude crashed 40% from its peak in early October -- sending it down 19% for the year -- after the Trump administration unexpectedly allowed most of Iran's key customers to continue buying Iranian oil, even after the U.S. imposed new sanctions on the country.

The decline in the price of oil weighed on Energy Transfer because about 14% of the company's earnings have direct exposure to commodity prices. That will put some downward pressure on its profitability. However, with more than 85% of its earnings coming from fees and other more stable sources, the overall impact will be mild. In fact, earnings likely will continue rising due to all the expansion projects the company finished last year.

Now what

Energy Transfer got caught in the undertow of last year's oil market sell-off because it has some minor exposure to commodity prices. However, the company should more than offset that impact with the cash flows from its recently completed pipelines. Because of that, last year's late swoon looks like a buying opportunity for long-term investors.

Matthew DiLallo has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.