2018 is on track to end up a losing year for the major indexes, but investors can prepare to beat the averages next year by finding stocks that have exceeded both the overall market return and that of their native sectors. Union Pacific (UNP 0.78%) and CSX (CSX 0.29%) are persuasive examples of such companies. Both railroads have bested the S&P 500 index's total return slump of 6% year to date, and they've also easily exceeded the aggregate return of industrial stocks within the index: 

CSX Total Return Price Chart

CSX Total Return Price data by YCharts.

In 2019, the two rail behemoths are likely to maintain their relative outperformance edge against the industrials sector and the broader market. The central reason is that CSX and Union Pacific have indirectly prepared for an economic slowdown for the last two years. Both have embarked on exercises to improve efficiency reminiscent of Kaizen overhauls in the manufacturing sector. 

Specifically, CSX and Union Pacific have focused on significantly improving their individual operating ratios. The operating ratio is a measure of efficiency found by dividing total expenses in a given period by revenue (lower readings equate to higher efficiency). It provides a quick overview of a railroad's ability to profitably handle its volume and is perhaps the most widely watched measure of productivity in the rail industry.

CSX has taken the more dramatic approach to lowering its operating ratio by implementing a "precision scheduled railroad" model. This model emphasizes strict train scheduling and discipline around operating assets, as well as several other specific characteristics that I've described in more detail recently.

Through the first nine months of 2018, CSX lowered its operating ratio from 69.6% to 60.3% against the prior-year period. This represents an enormous single-year leap in efficiency. The company has made surprising progress within less than two years since beginning its scheduled railroad implementation in early 2017.

CSX's success is one factor that prompted Union Pacific executives to integrate scheduled railroad principles in the company's recent Unified Plan 2020 strategic blueprint. Union Pacific's own operating ratio remained flat at 63.1% in the first three quarters of 2018 versus the year-ago period.

A minimization of utilized assets and reduction of excess personnel have characterized CSX's scheduled railroad efforts, and these have implications for 2019. CEO James Foote said during the company's most recent earnings conference call that the railroad has taken 800 locomotives out of service since the beginning of 2017, and reduced its workforce by roughly 2,000 (including contractors) in the current year. For context, CSX ended 2017 with roughly 24,000 employees. 

Reducing both its operating assets and workforce removes excess capacity (and the expenses tied to it) from CSX's system while also functioning as a self-created constraint that forces the railroad to operate more efficiently -- to do more with less. Union Pacific, while currently less inclined to trim its workforce, has also focused on taking excess locomotives and cars out of service to curb operating expense.

By tackling superfluous capacity, CSX and Union Pacific are performing the types of operations that railroads typically engage in when the economy experiences a downturn, but in advance. The World Bank's latest forecast for U.S. gross domestic product (GDP) calls for a slight decline from the current year's full-year estimate of 2.7% growth, to 2.5% next year, and on down to 2% in 2020. 

While these numbers still suggest moderate domestic expansion, risks for a more severe downturn appear to be growing. Given the United States' trade disputes with economic partners, slowing global economic growth, and a rising interest rate environment, it's possible that the U.S. economy could decelerate at a faster pace than currently projected next year.

Freight train rolling through valley with green pine trees on either side.

Image source: Getty Images.

Besides operational insulation against an economic downturn, both companies will continue to benefit from constrained capacity in the trucking market next year. A shortage of truck drivers (among other factors) challenged shippers in 2018, which faced higher rates alongside tighter freight availability in 2018.

Conditions remain much the same heading into the new year, providing opportunity for rail companies, especially in their intermodal operations (the transport of shipping containers between multiple modes of transportation, including rail, ocean, air, and freight). For example, Union Pacific's premium segment, which includes both international and domestic intermodal operations, expanded revenue by 13% in the first three quarters of 2018 to $4.9 billion. The intermodal business provided the largest year-over-year boost to total revenue across Union Pacific's four major segments during this period.  

Lastly, despite relatively healthy stock performance this year, both companies are trading fairly close to the S&P 500 index's average forward P/E of 15.2. CSX and Union Pacific currently trade at 14.6 and 15.2 times forward one-year earnings estimates, respectively. In other words, their market values are tightly in line with the pricing of fellow S&P 500 constituents. So there's plenty of room for CSX and Union Pacific to trade at a premium to the market next year, especially if the major indexes remain weak and investors continue to seek safety in blue-chip stocks with earnings growth potential.