Along with a stock that has outperformed the S&P 500 for more than 15 years, Union Pacific (UNP 4.99%) just posted record quarterly earnings.

United Pacific stock reached an all-time high of nearly $280 in March of this year but has since plummeted 30%. So is now the time to buy the dip on this railroad stock?

A historic American railway

Since 1862, when the company helped build the first transcontinental railroad, Union Pacific has contributed to the infrastructure of America. The company remains a staple in the railway industry, having endured world wars and economic downturns.

Now one of America's most recognized companies, Union Pacific links together 23 Western states, delivering goods for families and businesses. The operator serves some of the fastest-growing areas in the U.S. and connects with Canada's and Mexico's rail systems. 

Union Pacific seeks to improve profit margins in two ways: by increasing volume and streamlining operations. Determined to reach a 55% operating ratio, CEO Lance Fritz seeks better fleet utilization, faster train speeds, and other productivity improvements. An operating ratio compares total operating expenses to net sales, measuring how efficiently a company is running: The smaller the number, the better.

Union Pacific train chugs past with steam rolling out of engine.

A Union Pacific locomotive. Image source: Union Pacific.

Staffing and crew challenges

As fuel and other costs surged in the third quarter, Union Pacific's operating ratio jumped 3.6 points to 59.9%. And despite record third-quarter earnings, the company lowered its full-year growth outlook to 3%, from a range of 4% to 5%, indicating a potentially disappointing fourth quarter. For the full year, the company's operating ratio is now expected to be 60%, up from the previous estimate of 58%.

While volume was actually up in the third quarter, Union Pacific left a significant amount of business on the table due to staffing shortages. To bolster its train crews, the company recently launched hiring initiatives and training programs. As Fritz put it during the third-quarter earnings call, "We got into trouble on our crew availability, and we're digging out of that."

Having met its hiring target of 1,400 train and engineer positions, Union Pacific now awaits the outcome of a labor agreement between U.S. railroads and 12 unions. Six unions have ratified the deal so far, which would provide substantial pay increases and paid sick time for railroad workers.

But some fear that negotiations could unravel into an industrywide strike. Based on his comments during the third-quarter earnings call, Fritz is confident that a strike can be avoided.

Looking ahead

According to Eric Gehringer, executive vice president for operations, Union Pacific's hiring and training efforts have already improved crew availability. And Fritz expects service levels to return to normal by year-end. Other metrics such as car-miles per day, a measure of railway fluidity, improved during the third quarter.

After posting quarterly records for operating revenue, operating income, net income, and earnings per share, Union Pacific certainly seems to be on the right track. But considering that a combination of higher core prices and higher fuel surcharge revenue (charged as an additional levy from customers when fuel prices increase faster than transportation charges to control operational costs) helped cushion third-quarter revenue numbers, the impressive results should be taken with a grain of salt. Additionally, a shift in consumer spending from goods to experiences has affected Union Pacific's volumes, causing a 16% drop in parcel shipments.

Still, Fritz affirmed that Union Pacific's volumes had outpaced competitors' so far this year. While the railroad hasn't provided any forecasts for 2023, current trends point to increased shipments of coal, autos, and construction materials.

The railroad industry might seem outdated to invest in, but it is still the most eco-friendly way to transport chemicals, metal, coal, grain, and many other goods. Buying railroad stocks like Union Pacific could even be considered sustainable investing. And as one of America's largest railroad companies, Union Pacific should see some upside if the industry picks back up.