AT&T (T) is an interesting stock because it stayed mostly range bound from 2012 to the beginning of 2016. During that time it would stay between around $32 and $37; in fact, it breached $37 for only two months in 2013, and stayed below that price point for every day before and after until the start of 2016. Then it skyrocketed to over $40 and mostly stayed in that range until today. In 2016, the stock soared 15% after years of being mostly flat.

What happened?

It all boils down to one thing: the acquisition of DirectTV.

This is particularly interesting, because that acquisition was old news a year ago. AT&T made the announcement in 2014 and closed the deal in the middle of 2015. These are highly visible companies and the acquisition was closely scrutinized by legislators, pundits, and financial analysts. Yet the acquisition caused AT&T stock to skyrocket over six months after the deal was done.

Markets aren’t very efficient, clearly. And sometimes they price in new information very, very slowly.

Now let’s look at why the acquisition drove AT&T higher.

In 2012, AT&T’s free cash flow per share over the prior 12 months was $2.46, and by March 2015 it had plummeted to its lowest point in decades: $1.84. At the same time the company’s dividend had increased 6.8% to 47 cents. And AT&T had to keep increasing its dividend. As a widow and orphan stock, investors rely on its annual penny-per-share dividend hike. If that vanishes, the selling pressure on the stock will be breathtaking.

This was one of the big bear cases of AT&T in 2014 and 2015. The dividend was in trouble because free cash flow was falling. The stock’s total dividends paid were approaching $10 billion by the middle of 2015 while free cash flow was falling to less than $10 billion. This was clearly unsustainable, and forced AT&T’s management to do some creative accounting to get cash to pay dividends. Plus, cash from operations was falling to less than $30 billion from a high of $39.5 billion in 2013. This was all very stressing fundamental data.

Then after AT&T bought DirectTV, its cash flow soared. Cash flow from operations is now over $38 billion for the last twelve months and is set to reach $40 billion soon. Free cash flow per share has stabilized to over $2.79 per share, and is now 148% of total dividends paid. AT&T’s dividend problem is over.

This became apparent in December 2015, when the company reported a 60% year-over-year increase in cash from operations thanks to the strong cash flow from DirectTV. As 2016 rolled on, more saw the safety of AT&T’s dividend and the stock rose throughout the year.

There are several lessons we can take from this story, but perhaps the most important is that a deep analysis of fundamental data, even in a very visible company that has a very established history of a certain trend, can uncover new investment opportunities that provide a high rate of return. If it’s possible with AT&T, it’s possible with just about any stock anywhere. It’s up to individual investors to do the deep analysis to find these opportunities.