I don't think there was a single analyst out there who said buying shares of frack sand producers at the beginning of 2016 was a good idea. Between their bloated balance sheets and the rapid decline in oil and gas drilling activity, many of these stocks looked almost toxic.

Yet here we are more than a year later and the four largest publicly traded frack sand producers -- U.S. Silica Holdings (SLCA 3.10%), Fairmount Santrol Holdings (NYSE: FMSA), Hi-Crush Partners (HCRS.Q), and Emerge Energy Services (NYSE: EMES) -- all posted triple-digit gains in 2016.

After such a fantastic year, investors do have to wonder whether there is any room left for these companies to grow in 2017 or if it's time to cash out on these gains. Let's take a look at what happened to allow these companies to have such a great year and what investors can expect from this esoteric subset of the oil and gas industry in the coming year.

Image source: Getty Images.

Easy hurdle to jump over

To understand how these companies have been able to post such fantastic gains, you have to look at what was happening as we came into 2016. At the time, the price of a barrel of oil was on an epic 18-month slide and was trading below $30 a barrel in January. On top of that, drilling activity was drying up fast in the U.S. The active rig count in the U.S. had declined from a peak of around 1,900 rigs in late 2014 to just 650 as of last January. 

These things have impacted sand producers in two ways: Less drilling activity in the oil patch means less sand demand overall, especially from the independent exploration and production companies that have driven the shale drilling revolution. Also, as demand for frack sand has dried up, these sand producers have had to fight tooth and nail for their share of a diminished market, which inevitably had an effect on sand prices. The result of lower volumes and prices meant stock prices heading into 2016 were way down from 2014. 

Brent Crude Oil Spot Price Chart

Brent crude oil spot price data by YCharts.

If dealing with a tough commodity environment was the only thing, then perhaps shares of each would have not taken such a hard decline. However, growth in shale drilling pre-crash meant these companies were plowing money into new sand mines that would fill future demand. That left each with pretty poor looking balance sheets. U.S. Silica, arguably the best capitalized business of the bunch, was even forced to slash its dividend and relied heavily on sales to industrial and chemical producers to prop up the business. 

2016: Better times and better balance sheets

There were three catalysts that played a large role in each company last year. One was the turnaround in drilling activity. As oil prices started to gain steam, producers found the stomach to head back to the oil patch and start drilling or even completing several wells that were drilled but not yet producing. 

The second catalyst was the amount of sand that is being used in wells today. The combination of several changes to the hydraulic fracturing process has led to massive increases in total sand used per well. This chart from Emerge Energy Services shows how total sand per well in just about every shale basin in the U.S. has more than doubled in the past couple of years:

Image source: Emerge Energy Services investor presentation.

The third thing that helped to fuel this growth were gradual balance sheet improvements across the board. Through a combination of asset sales, equity issuances, or both, Emerge, Hi-Crush Partners, and Fairmount Santrol have all either paid down debt or padded their cash balances such that the immediate threat of default isn't as likely.

HCLP Financial Debt (Quarterly) Chart

HCLP financial debt (quarterly) data by YCharts.

The one exception here is U.S. Silica, but that is because it was in much better financial shape headed into 2016 than the rest of the gang. That's how U.S. Silica was able to acquire a sand mine from a private company as well as a sand logistics provider. These two moves enabled it to increase its market share as well as provide mine-to-well logistics for sand. 

Tally all of these things up and you get 150% or more returns from everyone in this group.

HCLP Chart

HCLP data by YCharts.

Room to run in 2017?

After such an incredible run in 2016, you do have to wonder if sand producers' stocks have any more juice left in them for this coming year. After all, we're talking about companies that are still posting losses on an EBITDA basis and valuations across the board for these businesses are starting to look a little frothy.

HCLP PS Ratio (TTM) Chart

HCLP P/S ratio (TTM) data by YCharts.

From a business perspective, there is certainly a lot of room to grow from where each company is today. We're likely going to see continued marginal gains in drilling activity in the U.S. as long as oil prices stay in this range of $50-$60 a barrel. There's no guarantee that it will happen, but things like OPEC's decision to cut production and the natural decline of reservoirs support the idea of staying in this price range for a while.

At the same time, the increased amount of sand used in each new shale well means that there will be a multiplier effect on the amount of wells drilled and total sand demand. Therefore, it won't take a return to 2014 drilling activity to get back to the same amount of sand consumption. 

For each of these companies, we will get a much better gauge when fourth-quarter earnings come out in the next several weeks. If we see a pickup in sale volumes, sales prices, and a return to profitability for all of these companies, we could see another decent year of growth for this industry. We may not get back to the euphoric times pre-oil crash, but that doesn't need to happen for 2017 to be another decent year for frack sand stocks.