What happened

After a solid rally since June, shares of Trex (TREX 0.23%) started to reverse course in September and are extending their losses this month. According to data from S&P Global Market Intelligence, Trex stock shed 10.5% this week. Blame the carnage on an analyst downgrade.

So what

Shares tumbled after Baird downgraded its rating on the stock with a price target of $108 a share, down from $116. Analyst Timothy Wojs anticipates lower demand for decking in the third and fourth quarters primarily due to labor and materials constraints and seasonality. Although Wojs is bullish on the long-term prospects for the industry, he sees lower end-user sales limiting the near-term upside in Trex shares.

A person installing composite decking boards.

Image source: Getty Images.

Trex manufactures durable decking from scrap wood, and nearly all of its products come with a 25-year warranty. Demand for the company's wood-alternative products soared this year as lumber prices skyrocketed. In its last quarter, sales jumped 41% year over year as volumes soared and the company passed on higher prices to consumers to offset inflation. Trex earned 30% higher net income in the quarter.

Lumber prices, however, crashed in summer, and the market fears Trex's sales growth could decelerate as wood becomes attractive again and we enter a seasonally slow construction period, especially after the boom in do-it-yourself home renovation earlier this year fueled by the pandemic. With inflation in the U.S. also hitting multiyear highs, there are concerns that consumers may postpone discretionary spending like decking.

These factors all added up to put pressure on Trex shares this week.

Now what

Amid the gloom, there's one factor that might give investors in Trex some hope: Lumber prices are on the rise again, with prices recovering more than 20% from their August lows. Industry experts even expect lumber prices to continue to rise through early next year, and though they might not skyrocket like they did earlier this year, any rise in lumber prices bodes well for Trex.

Trex projected 40% growth in its third-quarter sales, but its quarterly numbers won't be out before November. Until then, you might want to track lumber prices, as another rally could help Trex shares regain lost ground ahead of earnings.