Metals distributor Ryerson (RYI 0.82%) is facing cost and demand issues at a time when it is investing heavily in modernizing its business. Profitability is taking a hit, and the stock is down 17% following earnings as a result.

An unexpected loss

Ryerson is in the middle of the metals supply chain, connecting manufacturers who cast parts with end customers. The company keeps tens of thousands of products in inventory via a network of hundreds of company-owned and third-party distribution facilities.

The company announced a first-quarter net loss of $7.6 million, or $0.22 per share, on revenue of $1.2 billion. The revenue figure was within the range projected three months ago, but the company had forecasted a profit of between $0.24 and $0.34 per share.

CEO Eddie Lehner attributed the miss to a tough operating environment.

"The variance from guidance was partially due to lower than expected gross margins as commodity price moving averages for our carbon and stainless product franchises declined through the quarter before inflecting positively toward the end of the quarter," Lehner said. "Additionally, our results differing from guidance expectations was also partially attributable to transitory operating expenses as a by-product of a record investment cycle in fixed assets, digitalization and acquisitions, which is migrating to more normative and targeted levels."

Is Ryerson stock a buy after its earnings miss?

With the decline, Ryerson shares have lost nearly half of their value over the past year. The company is doing what it can to control costs, targeting $40 million in annual cost cuts from modernizing its large distribution centers. But ultimately, Ryerson needs demand and commodity prices to turn their way for the stock to take off.

Lehner sees signs of improvement, saying he is "encouraged by stabilization in the carbon sheet market, improvements in bright metal commodity price indices, and incrementally better quoting and order activity across our network."

But given the cyclical nature of the business and ongoing questions about what becomes of the U.S. economy, investors are understandably reluctant to buy the dip today.