What happened

Shares of Trex (NYSE:TREX) rose 19.9% in June, according to data from S&P Global Market Intelligence, both as the broader markets climbed and as the decking-products leader announced a new strategic capital-expenditure program. Keep in mind that Trex stock had plunged more than 22% between its last quarterly report in late April and the beginning of June, so it helped that the broader markets rebounded -- including a 7% gain for the S&P 500 -- as trade tensions eased last month.

So what

Likely aiding Trex's rise was the new multiyear capital-expenditure program that management unveiled on June 6, 2019 -- an effort to expand production a year earlier than expected to meet projected future demand.

Stock market data and charts on a colorful display.

IMAGE SOURCE: GETTY IMAGES.

More specifically, Trex intends to put $200 million to work -- primarily funded by its cash from operations -- between now and 2021 to install new production lines at its Nevada facility and build a new decking facility at its existing Virginia site. The latter should start to come on line by the first quarter of 2021, and the former will commence production starting in the third quarter of 2019, with additional lines to be installed by the first half of next year. Altogether, the expansions will increase Trex's capacity by 70%.

According to Trex CEO James Cline, the company was prompted to initiate the program given "robust" demand for both its legacy Transcend decking varieties and its recently launched Enhance line of decking products, which have collectively accelerated consumers' conversion from wood to Trex at a faster-than-expected pace.

Now what

Trex elaborated that current production rates at both sites have already reached their previously planned levels, and each have shifted to operating efficiency improvements consistent with guidance provided in April. That said, given the accelerated schedule of the expansions, Trex now expects capital expenditures this year to be roughly $75 million to $80 million, up from its previous target of $45 million.

Given Trex's climb last month in response, however, you won't find too many investors willing to complain about this enviable problem of investing to meet accelerated growth in demand.