What happened

October was another fantastic month for Trex Company Inc. (NYSE:TREX) investors. with shares finishing October 21.5% higher than they started. So far this year, Trex stock is up a remarkable 60%.

The biggest catalyst for Trex's stock in October was also what's helped drive it higher all year: solid, expectations-beating earnings results.

So what

Trex reported its third-quarter results on Oct. 30, crushing Wall Street analyst estimates with sales up 32%, earnings up 262%, and solid guidance for the rest of the year. Trex's results were so far above the market's expectations that its shares surged more than 25% in the first day of trading following the earnings release.

Trex's strong sales growth was the product of two things: 23% sales growth from its core decking business, and $9 million in incremental revenue from SC Company, which it acquired about one month into the third quarter.

Friends having a barbecue on an outdoor deck.

Image source: Getty Images.

Earnings were up for two main reasons. First, Trex took a $9.8 million nonrecurring warranty reserve charge last year, which depressed its quarterly earnings comp. Second, outside of that nonoperational benefit, the company continues to generate higher incremental margins as its sales volumes grow. So Trex continues to benefit from higher volumes that don't require expenses to climb as much.

Now what

Trex's business appears to be in wonderful shape. There has been strong demand for home improvement spending over the past couple of years, and as long as the housing market stays relatively healthy, along with the overall economy and job market, that should bode well for Trex to continue delivering steady revenue and profits.

But can it keep up the double-digit revenue growth? Trex is dominant in wood-alternative decking, commanding more than 40% of segment sales and growing that share for a number of years now. But to only consider its position within the alt-wood segment ignores the far bigger opportunity. In terms of total decking market share, Trex accounts for less than 10% of the board-feet of decking sold in North America.

In other words, there's still a huge segment of the market that's not buying Trex yet.

So in the short term, an unexpected slowdown in the economy or in home improvement spending could impact Trex's results and slow its growth. But long-term investors should note that Trex is dominant in its niche, and incredibly well-positioned to grow its total market share for decades to come. Furthermore, younger homeowners are beginning to prioritize environmentally responsible products when they make home improvements. That could give Trex an even bigger advantage over wood (and the chemicals necessary to maintain it) in the future.