Csx Engine
Source: CSX.

Railroad stock CSX (NASDAQ:CSX) climbed to all-time highs earlier this month, as investors have been impressed at the pace of the company's recovery from tough conditions affecting the railroad industry. Even though the company's location in the eastern part of the U.S. gives it greater exposure to the struggling coal industry than rival Union Pacific (NYSE:UNP) and other peers across the country, CSX hasn't let much hold it back. With the company announcing its third-quarter earnings in less than a month, let's take a look back at CSX's most recent earnings report to see how strong a performance the railroad really had.

What CSX accomplished last quarter
CSX hit a number of new records in the second quarter and painted an encouraging picture for its future. For the quarter, net earnings per share hit $0.53, up about 4% from the year-earlier quarter. A 7% jump in revenue to $3.2 billion was also an all-time record, with volume growth seen in all of CSX's major segments. Chemicals produced the largest year-over-year volume gain at 18%, but metals, agricultural products, and waste and equipment all posted double-digit percentage gains. Even the hard-hit coal segment saw volumes climb 6%, despite being the only segment to see its revenue fall.

CSX's overall business was profitable as well. Operating income climbed to $997 million, as revenue growth was strong enough to overcome higher expenses for materials and supplies. CSX's operating ratio fell to 69.3%, which was higher than nearby rival Norfolk Southern (NYSE:NSC) but still represented an impressive performance for the railroad.

Csx Train
Source: CSX.

More importantly, CEO Michael Ward kept investors focused on the future. As he noted, because of "the broad-based economic momentum we are seeing, the core earning strength of this company is improving and driving value for shareholders." That sentiment helped underscore the extent of the progress that CSX has made in recovery from much weaker conditions for the railroad just a few years ago.

Where CSX's growth will come from
At least for now, the most promising areas CSX sees to focus on are the oil and gas and intermodal markets. Oil and gas producers continue to rely on railroads to help transport their production from hard-to-reach shale oil and gas plays, and until pipelines come on-line years down the road, CSX, Union Pacific, Norfolk Southern, and other railroads will enjoy a dominant position in that market. CSX sees secular trends not just in energy but also in intermodal transportation benefiting its business throughout 2014, and it expects 2015 to provide chances to keep earnings growing at a double-digit percentage pace.

In order to support those markets, CSX has shown that it's willing to put money and resources toward improving its service. Ward said that adding front-line personnel and investing in the railroad's infrastructure and freight-car inventory should help foster efficient growth that's targeted to the company's most attractive opportunities.

Csx Map

CSX route map. Source: CSX.

That doesn't mean that CSX has clear sailing ahead. Sluggishness in the coal industry will continue to have a disproportionate impact on CSX, and even with its best efforts to diversify, CSX will still remain exposed to coal's fortunes for years to come. That could be to its benefit of coal companies can bounce back from their long slump, but CSX is rightfully looking for alternatives rather than hoping for a turnaround with a far from certain chance of success.

What's next for CSX?
Overall, CSX continues to generate optimism from shareholders, who expect revenue gains to continue next year and for earnings growth to accelerate. If CSX can deliver on those promises in its third-quarter results and beyond, then the stock could have further to run.

Dan Caplinger has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.