CSX Corporation (NASDAQ:CSX) shares are up more than 33.03% this year and recently decreased -1.29% or -$0.96 to settle at $73.18. Western Digital Corporation (NASDAQ:WDC), on the other hand, is down -28.20% year to date as of 09/13/2018. It currently trades at $57.10 and has returned -1.19% during the past week.

CSX Corporation (NASDAQ:CSX) and Western Digital Corporation (NASDAQ:WDC) are the two most active stocks in the Railroads industry based on today’s trading volumes. Investor interest in the two stocks is clearly very high, but which is the better investment? To answer this question, we will compare the two companies across growth, profitability, risk, and valuation metrics, and also examine their analyst ratings and insider activity trends.

**Growth**

The ability to consistently grow earnings at a high compound rate is a defining characteristic of the best companies for long-term investment. Analysts expect CSX to grow earnings at a 20.38% annual rate over the next 5 years. Comparatively, WDC is expected to grow at a 5.63% annual rate. All else equal, CSX’s higher growth rate would imply a greater potential for capital appreciation.

**Profitability and Returns**

Growth isn’t very attractive to investors if companies are sacrificing profitability and shareholder returns to achieve that growth. We will use EBITDA margin and Return on Investment (ROI), which control for differences in capital structure between the two companies, to measure profitability and return., compared to an EBITDA margin of 24.4% for Western Digital Corporation (WDC). CSX’s ROI is 9.40% while WDC has a ROI of 16.40%. The interpretation is that WDC’s business generates a higher return on investment than CSX’s.

**Cash Flow**

Cash is king when it comes to investing. CSX’s free cash flow (“FCF”) per share for the trailing twelve months was +0.46. Comparatively, WDC’s free cash flow per share was +1.70. On a percent-of-sales basis, CSX’s free cash flow was 3.46% while WDC converted 2.4% of its revenues into cash flow. This means that, for a given level of sales, CSX is able to generate more free cash flow for investors.

**Liquidity and Financial Risk**

Liquidity and leverage ratios measure a company’s ability to meet short-term obligations and longer-term debts. CSX has a current ratio of 1.70 compared to 2.40 for WDC. This means that WDC can more easily cover its most immediate liabilities over the next twelve months. CSX’s debt-to-equity ratio is 0.98 versus a D/E of 0.97 for WDC. CSX is therefore the more solvent of the two companies, and has lower financial risk.

**Valuation**

CSX trades at a forward P/E of 18.16, a P/B of 4.51, and a P/S of 5.46, compared to a forward P/E of 4.69, a P/B of 1.49, and a P/S of 0.81 for WDC. CSX is the expensive of the two stocks on an earnings, book value and sales basis. Given that earnings are what matter most to investors, analysts tend to place a greater weight on the P/E.

Analyst Price Targets and Opinions

A cheap stock isn’t a good investment if the stock is priced accurately. To get a sense of “value” we must compare the current price to some measure of intrinsic value such as a price target. CSX is currently priced at a -1.41% to its one-year price target of 74.23. Comparatively, WDC is -44.1% relative to its price target of 102.15. This suggests that WDC is the better investment over the next year.

Risk and Volatility

Analyst use beta to measure a stock’s volatility relative to the overall market. Stocks with a beta above 1 tend to have bigger swings in price than the market as a whole, the opposite being the case for stocks with a beta below 1. CSX has a beta of 1.23 and WDC’s beta is 0.94. WDC’s shares are therefore the less volatile of the two stocks.

**Insider Activity and Investor Sentiment**

The analysis of insider buying and selling trends can be extended to the aggregate level. Short interest, which represents the percentage of a stock’s tradable shares currently being shorted, captures what the market as a whole feels about a stock. CSX has a short ratio of 3.80 compared to a short interest of 2.27 for WDC. This implies that the market is currently less bearish on the outlook for WDC.

**Summary**

Western Digital Corporation (NASDAQ:WDC) beats CSX Corporation (NASDAQ:CSX) on a total of 11 of the 14 factors compared between the two stocks. WDC is growing fastly, has higher cash flow per share, higher liquidity and has lower financial risk. In terms of valuation, WDC is the cheaper of the two stocks on an earnings, book value and sales basis, WDC is more undervalued relative to its price target. Finally, WDC has better sentiment signals based on short interest.