What happened

Shares of wood-alternative decking and commercial railing manufacturer Trex Company Inc. (NYSE:TREX) started trading on Tuesday down a sharp 10%. As of 10:06 a.m. EDT, they were still down about 9.6%, in very heavy volume. In just over a half-hour of trading, nearly as many shares changed hands as usually trade in a full day. 

Today's sell-off was precipitated by yesterday's third-quarter earnings release, which, frankly, was quite good. Trex announced that sales were up 19% while earnings per share surged 47%. Furthermore, management maintained optimism that its outlook remains very good. 

Man with perplexed expression shrugging.

Image source: Getty Images.

So what

I know, right? The company delivers another stellar result -- it reported sales and earnings growth of 18% and 32% respectively in the first quarter, and 31% and 49% respectively in the second quarter -- only to see investors flee in droves. 

And it gets even better (or maybe worse, depending on your perspective). A few days before earnings were announced, Trex reported that it had added yet another major distributor, expanding its availability in the Midwest and widening its distribution network, which was already industry-leading. 

Now what

If we were texting, I'd send you the "shrug" emoji at this point, because frankly there's just not a clear reason Trex has taken this beating. At one point in 2018, shares were up more than 60%. But at this writing, they're almost the same price as at the beginning of the year. Incredibly hard to explain, considered that EPS is up an incredible 42% so far. To put it another way, you can pay the same price for a 42%-more-profitable Trex today that you would have paid at the beginning of the year. 

If there's any one thing I can point to that may have played some role in the sell-off, it's housing, which is affected by rising interest rates. Over the past few months, existing home sales have weakened, while new housing starts have also been quite weak: TREX Chart

TREX data by YCharts.

The thing is, these aren't necessarily indicators one way or the other for Trex's future prospects. Its prospects are tied to housing, but home sales aren't a good leading indicator, since decks are big-ticket items, not something a new homeowner will necessarily invest in soon after buying a home. Trex's prospects are more about the general shape of the economy, not housing in particular. 

And rising interest rates could see more homeowners decide to stay put and invest in upgrades to their existing homes, like a new deck. The economy continues to chug along relatively strongly, with solid consumer spending, some signs of improved wages, and even more people saving money. Those trends are probably more important to Trex's prospects than fears over housing. 

I know it's a very unsatisfying answer, but sometimes companies do really well and their stocks then fall. That's certainly the case for Trex, after yet another great quarter and with solid prospects heading into 2019. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.