Railroad companies have worked hard to try to claw their way back from tough times over the past two years. CSX (CSX -3.02%) in particular has focused on restructuring efforts designed to increase efficiency and take advantage of emerging opportunities in the industry, and the stock has responded favorably in anticipation of better times ahead.

Coming into Tuesday's second-quarter financial report, CSX investors expected to see significant gains in earnings and revenue, building on strengthening momentum from last quarter. The railroad delivered on that front with better results than most investors had expected to see, but some concerns about the future for CSX held back the stock following the announcement. Let's take a closer look to see how CSX did and what it means for the remainder of 2017 and beyond.

CSX train on a track.

Image source: CSX.

CSX keeps gaining speed

CSX's second-quarter results looked strong on their face. Revenue climbed 8% to $2.93 billion, accelerating at a faster pace than the 5% growth that most of those following the stock were anticipating. Net income gained 15% to $510 million, and after accounting for extraordinary restructuring charges, adjusted earnings of $0.64 per share were $0.05 higher than the consensus forecast among investors.

As CSX's numbers reveal, the railroad continued to see strength across much of its key businesses. Coal represented a key boost to revenue for the second quarter in a row, rising by 27% on modest volume gains and strong pricing. Intermodal revenue was also a leading area, rising 7%, and the catch-all other segment produced a rise of more than 60% from year-ago levels. Weakness in automotives and in metals and equipment held back CSX, but pricing power was evident in nearly all of the railroad's categories.

Fuel surcharges also kept supporting CSX's top line, more than doubling to $88 million during the quarter. From a cost perspective, efficiency gains and a favorable legal judgment helped offset rises in incentive compensation, fuel prices, and general inflation. Labor costs were down from the year-ago period, and savings on materials and supplies also helped to boost earnings.

Operationally, CSX once again had pluses and minuses. Operating ratios were healthy at 67.4% on a GAAP basis and 63.2% on an adjusted basis. Gross ton-mileage was up 3% to 100.5 billion, and accident rates eased downward by 1%. On-time arrivals improved by 10 percentage points to 79%, and train velocities sped up slightly as delays fell. Yet personal injury frequencies jumped nearly a fifth to 1.14 per 200,000 worker-hours.

CEO Hunter Harrison focused on restructuring initiatives. "We are implementing Precision Scheduled Railroading on an expedited timetable," Harrison said, "converting switching operations, balancing the network, streamlining resources, and getting more out of our assets." The CEO sees these moves improving customer service and making its overall efficiency levels improve.

Will CSX have to slow down?

One question that CSX has to answer is whether the recent strength in coal will continue. The railroad attributed gains in the segment to strength in the export market, and that comes as somewhat of a surprise given the weakness in prices of other energy commodities like crude oil during the period. CSX also noted that outside coal, softening conditions in the merchandise and intermodal businesses could point to tougher times ahead.

In addition, a lot of CSX's future success depends on the future of the industrial economy. Many industrial stocks rose in anticipation of greater federal government spending on infrastructure and construction projects, but so far, those higher expenditures haven't yet come about.

CSX nevertheless believes that its previous guidance will hold true for the year. The railroad expects to see operating ratios in the mid-60s, with free cash flow of $1.5 billion and earnings growth of 25%. That should work out to $2.26 per share on a reported basis. Yet with the consensus among investors coming in at $2.30 per share, CSX wasn't able to satisfy its shareholders completely.

Because of that disappointment, CSX stock fell more than 4% in after-hours trading on Tuesday following the announcement of the railroad's quarterly results. With the stock having hit all-time highs repeatedly in 2016 and 2017, CSX will have to show that its restructuring efforts will produce sharp growth in its fundamental business prospects in order to keep up with investors. Otherwise, shareholders might well worry that they've let their optimism get the better of their judgment.