What happened

Shares of infrastructure company MasTec (MTZ 1.69%) soared by 58.2% in 2019 according to data provided by S&P Global Market Intelligence. Those gains reflected the upgrades to its earnings outlook that it made throughout the year, as well as its bright prospects for 2020.

A 5G wireless tower.

5G spending should help MasTec in 2020. Image source: Getty images.

At the start of 2019, management guided for full-year adjusted earnings before interest, taxation, depreciation, and amortization (EBITDA) of $780 million and adjusted diluted EPS of $4.34. Fast forward to the third-quarter earnings report in October, and management had lifted those forecasts to $842 million and $5.16 respectively.

MasTec serves the energy, utility and communications industries, and its strong year was driven by oil and gas pipeline projects, notably in the Permian Basin. EBITDA from its oil and gas segment rose 60% in the first nine months and represented 71% of segment EBITDA before corporate costs. Its other major end market, communications, is posed for a strong 2020 due to the rollout of 5G wireless networks.

So what

Despite the meteoric rise of its stock price, MasTec still trades at just 12.1 times estimated earnings for 2019 and 11.3 times estimated earnings for 2020. However, I suspect that the company's modest valuation reflects the fact that oil and gas revenue growth is likely to slow dramatically now that more takeaway capacity has come online in the Permian Basin and the U.S. oil rig count has been declining.

US Rig Count Chart

U.S. Rig Count data by YCharts

Still, the coming fiscal year will see the communications segment take over the growth baton; analysts are forecasting 10% sales growth for the total company in 2020.

Now what

The key question that investors interested in buying MasTec stock have to ask themselves is not so much about 2019 or even 2020. It's what the company's growth profile will look like after a couple of  highly favorable years for its two key segments. 5G network spending won't last forever, and MasTec's oil and gas industry revenue is already starting to dip.

Meanwhile, its power generation and industrial segment and its electrical transmission segment are relatively small parts of the company's profitability -- together, they contributed less than 5% of total EBITDA in the first nine months.

All told, investors will be looking for another good year of execution in 2020 while keeping an eye out for potential growth catalysts in 2021. Higher oil prices will help.