Major railroads continue to ride out a rough patch in this low-energy-price environment. In addition to the weak energy market, railroads are coming up against increased national and global uncertainty and continued weakness in manufacturing. Low fuel prices are making trucking more competitive as well. All of this led to a 2.5% decrease in U.S. rail traffic last year, according to the Association of American Railroads, and industrial weakness and increased retail inventories were among the culprits.

Before we get into why the railroads are a buy right now, let's talk about the negative backdrop and how it provides long-term investors an opportunity. 

What does history tell us
Historically, a decline in rail traffic is a leading indicator of a slowdown in the economy. A recent note from Bank of America states:

We believe rail data may be signaling a warning for the broader economy. Carloads have declined more than 5% in each of the past 11 weeks on a year-over-year basis. While one-off volume declines occur occasionally, they are followed by a recovery shortly thereafter. The current period of substantial and sustained weakness, including last week's 10.1% decline, has not occurred since 2009.

Indeed, this drop in rail traffic is cause for concern. Among other things, low natural gas prices continue to hamper the industry as power plants switch to natural gas to create energy. That means reduced coal shipments, which are a big driver of revenue for the rails. The decrease in U.S. steel production is also putting pressure on coal shipments. Over time, I expect oil and gas shipments to offset (and mostly replace) the reduction in coal shipments. Historically, a decrease in rail traffic has provided great buying opportunities in the railroad industry.

I expect it to be no different this time around as the U.S. population continues to grow, more food is consumed, more people buy cars, and more people need energy. Goods and materials will continue to be moved across the U.S. over the next 25 to 50 years by rail. The sector, as a whole, strategically positioned to benefit from these long-term tailwinds.

Are railroads a buy right now?
The latest quarterly financials were abysmal and expectations aren't high for the coming year. Numerous companies have already taken actions to combat the drop in rail traffic. We've already seen CSX Corp. (CSX -0.57%) and Union Pacific (UNP -0.20%) lay off employees, shut down locomotives, and pull back on operations.

Many of the railroads have fallen more than 30% over the past 12 months. The financial performance is the industry's worst in the past 20 years, and the stock price pullbacks have taken away some of the long-term gains over the past 10 years.

NSC 1 Year Price Returns (Daily) Chart

NSC 1 Year Price Returns (Daily) data by YCharts

On the bright side, we could be looking at a decent buying opportunity. The industry as a whole has made productivity improvements that have helped weaker rail traffic. Also, industry valuation metrics look appealing at current levels, with an industry average P/E of 14.04, an EV/EBIT of 10.95, an EV/FCF of 16.47, and a median dividend of 2.88%. Moreover, recent low earnings figures could be cyclical lows in earnings at current levels, which would make the companies even more attractive.

Image source: Ycharts.com

On a side note, M&A activity appears to be picking up within the industry, given Canadian Pacific Railway's (CP -0.62%) bid for Norfolk Southern (NSC -0.07%). Norfolk declined the offer, however, and given that there's only a handful of major players in rail, it would take an extraordinary circumstance for the regulatory boards to approve any potential mergers. Still, this should be a welcome sign for investors as railroad insiders see value in these companies. 

Investor takeaway
On the surface, things don't look great for railroads right now. Although the competitiveness of trucking is gaining momentum, the fuel efficiency of rails still makes them incredibly attractive versus the alternatives. High barriers to entry also make the rail system almost impossible to replicate, from a geographical and cost perspective.

The railroads' competitive advantages should give them pricing power greater than inflation, which should allow them to take advantage of future growth in underperforming industries such as energy, agriculture, construction, and housing. Despite the current downturn and negative backdrop of slowing rail traffic, this is an industry to watch. At the very least, foolish investors are being paid to wait with reasonable dividends in a sector with serious long-term potential.