American railroad operator CSX (NASDAQ:CSX) just reported results for the second quarter of 2014. Shares rose and then fell in after-hours treading as investors digested the news.

GAAP earnings rose 4% year over year to land at $0.53 per share. Second-quarter revenue increased 7% to $3.2 billion, thanks to 8% higher shipping volumes.

Analysts were looking for earnings of $0.52 per share on $3.3 billion in revenue, making this report a mixed bag.

Management expects a "positive economic environment" plus sustained growth in the intermodal and petroleum markets to drive "modest" earnings growth in the 2014 fiscal year. Looking further ahead, CSX hopes to deliver double-digit earnings growth and margin expansion in 2015 and beyond.

To reach these goals, CSX is increasing its 2014 capital investment budget by $100 million, chiefly to expand the railcar fleet.

"With the broad-based economic momentum we are seeing, the core earning strength of this company is improving and driving value for shareholders," said CSX CEO Michael Ward in a prepared statement.

CSX shares have gained a market-beating 28% over the past year and briefly touched fresh all-time highs after today's closing bell.

Anders Bylund has no position in any stocks mentioned. He worked at CSX Technology in the early 2000s, in the interest of full disclosure. The Motley Fool recommends Apple and owns shares of Apple and CSX. Try any of our Foolish newsletter services free for 30 days.

We Fools don't 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.