CSX (CSX -3.02%) has felt the pressure from the downward trend in coal demand -- likely a secular trend. High levels of utility stockpiles and lack of international demand have cut back capacity and added to the downward pressure. It's difficult to envision a real return to coal demand with regulatory overhang, lower natural gas prices, and a strong dollar.

With that said, I expect intermodal and merchandise revenue to more than offset any declines in coal as it becomes less and less of the company's revenue model. Should this thesis play out, it would be just one of the many reasons CSX is a buy right now. Let's look at four more reasons why CSX is a buy at current levels.

1. A leader in U.S. rail networks
CSX is one of the largest U.S. railroads. Its route lines mainly cover the eastern third of the U.S., and it operates through four major corridors to connect to important U.S. and Canadian gateways, with 21,000 route miles that connect 23 states east of the Mississippi River, as well as D.C, Ontario, and Quebec.

Image source: CSX company presentation.

It has a diversified revenue stream, with merchandise making up 60% of revenue and 42% of volume in 2014, coal at 22% of revenue and 18% of volume, and intermodal at 14% of revenue and 40% of volume. The company also has a diversified market base:

Image source: CSX company presentation.

2. The moat of a highly capital-intensive business
CSX also has the advantage of essentially operating as part of a government-protected oligopoly.The high barriers to entry make its systems almost impossible to replicate and provide for limited competition. Like Burlington Northern Santa Fe and Union Pacific (UNP -1.82%), it has pricing power greater than inflation, and that power should allow it to take advantage of future growth in underperforming industries -- such as energy, agriculture, construction, and housing -- and generate excess returns over time.

Image source: CSX company presentation.

A key metric for railroads is the operating ratio, which is a primary measure of profitability, expressing a company's operating expenses as a percentage of revenue -- the inverse of operating margins. CSX was able to increase its number 20 basis points to 71.6% for the most recent quarter. The operating ratio for all of 2015 was 69.7%. Management continues to focus on this number, with a goal of hitting the mid-60s in 2016. The lower the operating ratio, the more efficient the company. CSX has shown a consistent improvement trend in operations since 2009.  

3. Advantageous railroad economics
The rail revolution started around 2005, when rates started increasing from a relaxation of regulatory control. After consolidation, the deregulation of the railroad industry allowed railroad companies greater pricing freedom to charge their customers with limited competition.  More efficient locomotives and double-stacking of cargo have also changed the dynamics of the industry over the past 10 to 15 years. In this environment, CSX revenues have increased by the high single digits, while operating margins almost tripling from 12.44% in 2004 to over 30% in 2015.  Return on invested capital also increased from 4.92% in 2004 to 10.97% in 2015, while free cash per share has gone from $0.31 to $0.81.

Railroads, moreover, offer several significant advantages. Trains are incredibly fuel efficient, and on a ton-mile basis, they're three times as clean as trucks. They also reduce highway congestion, and one train can take as many as 300 trucks off the road. And they increase safety per ton mile and take no taxpayer money.

Railroads, in short, help solidify how goods get moved around the U.S. -- they're a massive and crucial part of the U.S. economy.

4. Competent and shareholder-friendly management
Management has increased the dividend from $0.33 to $0.68 per share over the past five years and has repurchased almost $2 billion worth of stock at reasonable prices. I expect management to continue to be shareholder friendly. It's also staying focused in the current depressed environment, cutting back on hiring and putting locomotives into storage where necessary.

What's next for investors?
CSX's earnings capability is likely to remain where it is until the pricing in commodities recovers. Energy markets will probably pose a challenge in 2016, though I expect oil and gas to offset, and mostly replace, reductions in coal shipments, which are likely to continue falling.

The strong dollar has also hurt manufacturers and exports. I expect this trend to continue in the short to intermediate term, but it will eventually work itself out. Yet even despite the harsh environment, CSX has produced record earnings, and ROIC and free cash improvements illustrate just how well it's executing right now. Its ability to operate well during a difficult transition away from coal demonstrates the strength of the business. In fact, I expect CSX to continue generating excess free cash and returning that capital to shareholders.

Image source: CSX company presentation.

With its P/E at 11.1, you're paying below a market multiple for a business that has true competitive advantages. The FCF yield is 3.34%, the EV/EBIT ratio is 8.36, and the dividend yield is 3.12%. The company won't knock your socks off in terms of growth, but high barriers to entry, limited competition, and increased efficiencies all bode well for the future. I see shares as very appealing at current levels.