You may never have heard of the chemical titanium dioxide -- sometimes abbreviated as TiO2 -- but you've probably used it yourself at some point. This versatile chemical is used as the white pigment in most white paints, a UV light absorber in sunscreens, a food coloring, and a thickening agent, among other things. 

TiO2 manufacturing companies Kronos Worldwide (KRO -4.34%)Tronox (TROX -2.71%), and Chemours (CC -4.62%) had a great year in 2016. All of their stocks more than doubled -- Chemours more than quadrupled. And other companies that manufacture the chemical like Huntsman (HUN -2.64%) and Allegheny Technologies Incorporated (ATI -6.58%) also handily beat the market. But before you jump in, there are a few things you should know about those impressive gains and why they occurred for practically all the companies in this industry.

Picture of Titanium oxide in powder form

Image source: Getty Images

Big gains

The stocks of all of these companies handily beat the market in 2016, from Allegheny Technologies' 38.6% gain (more than three times the S&P's gain for the year) to Chemours' 303.1% gain (27 times the S&P's gain):

TROX Chart

TROX data by YCharts

But that performance looks a lot less impressive when we go back to the beginning of 2015. 

TROX Chart

TROX data by YCharts

I've excluded Chemours from the above chart because it wasn't spun off from DuPont until July 2015, but since that time it has underperformed the S&P as well, for a host of reasons.

Jan. 1, 2016, represents almost the low point for all of these stocks, making their 2016 performances seem artificially impressive. However, the more important question is what caused these stocks' precipitous fall in 2015, and their partial recovery in 2016...and whether the recovery will continue into 2017.

The hot commodity

Titanium dioxide is a commodity like any other, and as a result, its market is cyclical. Because the majority of titanium dioxide is used in paints -- 60% of the global supply -- sales are primarily affected by the housing and automotive industries. Both fared well in 2016.

In 2016, new home sales hit their highest levels since 2008. Home prices are also at record highs. And real estate stocks like online broker Zillow and homebuilder KB Home had banner years last year. Likewise, the U.S. set a new record for new vehicle sales in 2016. 

So that's the simple explanation for these stocks' outperformance in 2016: a bad 2015 coupled with a recovering market in 2016. The question is, what does 2017 look like for these companies?

Two roads diverged

Nobody can predict the future, of course, and with a new presidential administration just beginning, there's truly too many variables to foretell with any confidence where the housing and auto markets will go from here. Obviously, though, if the U.S. economy continues to improve, so too, probably, will housing and auto markets. Indeed, the auto industry is predicting that 2017 sales will be close to 2016's record-high levels. 

The recent rate increase announcement by the Federal Reserve may help to keep the housing market humming. Mortgage rates have slowly been ticking upward as the housing recovery continues, but when rates get too high, it can cause housing prices to drop, prompting some homeowners to put their homes on the market ahead of schedule to avoid losing money when rates increase. 

It's also worth noting that even with their strong showings in 2016, none of these stocks -- with the exception of the recently listed Chemours -- are anywhere near their record highs, which may mean that they still have room to run. Of course, unforeseen domestic or geopolitical events could upend the housing and automotive markets -- or even just the titanium market -- sending stock prices back down. 

Investor takeaway

How you should feel about these stocks' futures depends on where you think the U.S. economy is heading. If you think there's a rocky road ahead, you should probably just steer clear. If you predict continued growth, they may be worth a second look. Keep in mind, though, that there are plenty of other companies and industries poised to benefit from a recovering economy. All of these companies' balance sheets are loaded up with debt. 

If I had to pick just one of these stocks to consider, I'd suggest Kronos because of its current 4.6% dividend yield. That will at least give you a reward while you wait to see how things shake out.. Meanwhile, Chemours is the stock I'd avoid on this list, not only because of its paltry 0.5% dividend yield, but also because of its continuing legal troubles.