Alcoa (AA) investors weathered a good bit of upheaval in recent years as the company battled a slump in commodity markets, rolled up a number of new businesses, and eventually split itself in two. The end result was a business tailor-made for the 2017 global economy, and shares that as of early December were up 51% year-to-date, more than doubling the S&P 500's 18% gain.

Here's why Alcoa is doing so well, and what investors should expect heading into 2018.

Metal in the production process.

Aluminum production. Image source: Getty Images.

Built up, and then torn apart

Alcoa was a one-time industrial powerhouse that last decade found itself on the defensive against cheap aluminum supplies coming from China and other developing markets. The company responded with not one but two multi-year transformations, first via a buying spree that added less-cyclical aerospace and automotive finished products, and then by spinning those businesses, as well as much of its debt, off as an independent. It also shut down much of its highest-cost smelter operations.

When Alcoa split from the finished products business, Arconic, last November it handed Arconic its $9 billion in total debt and more than half of its $5.6 billion in estimated pension obligations, creating an aluminum-focused company with the balance sheet and expense-base better able to compete against foreign rivals.

Alcoa at year-end 2016 said it was in the 38th percentile on the global aluminum cost curve, a 13-point improvement from 2010. The company's bauxite mining and alumina refining operations meanwhile are now pushing into the top 25% in terms of efficiency, both up from second quartile positions less than a decade ago.

Gaining with aluminum

The company once again is closely linked to commodity prices, and for most of 2017 that has been a tailwind. Aluminum prices are up 17% year-to-date on the London Metal Exchange. So it is no surprise that Alcoa in November raised its projection for full-year EBITDA to about $2.4 billion, up from a range of $2.1 billion to $2.2 billion predicted this summer.

Alcoa has added at least $150 million in cash in each of the last two quarters, raising its cash balance at the end of the third quarter to $1.1 billion and earning an upgrade from Moody's in September. That cash cushion is important. CFO William Oplinger told investors in October that the company considers a $1 billion cash balance a minimum requirement to weather market downturns without jeopardizing operations or needing to sell assets.

The business is also growing more efficient: Days working capital, a measure of how long it takes to convert working capital into revenue, has fallen from 19 days in the first quarter to 17 days in the third.

Help from China

Alcoa has also gotten a boost from China, which is suddenly beginning to tighten environmental regulations. The country's National Development and Reform Commission is cracking down on unlicensed smelters, bringing down more than 4 million metric tons of annual capacity by Alcoa's estimates. Meanwhile, for the second straight year, the Chinese Ministry of Environmental Protection has curtailed refining capacity during the winter heating season for environmental reasons.

Alcoa estimates that upwards of 7.6 million metric tons of total annual capacity could come offline in China. China accounts for more than half of the estimated 59.8 million metric tons of aluminum produced globally in 2016, according to the International Aluminum Institute.

It is, of course, hard to predict Chinese policy and how long those curtailments might hold, but Alcoa told investors there is a reason to believe the policies will be enforced through at least 2022, when the Winter Olympics will be held in Beijing, in hopes of improving air quality in the region.

Efforts by the U.S. Commerce Department to impose countervailing duties on finished products coming from China could also help keep a lid on Chinese aluminum production.

What's ahead?

Alcoa's 50% plus gain this year has been great, but the year looked even better back in October when the shares hit a 52-week high and traded up 77% for the year. The recent declines follow a similar move downward in aluminum prices, which at one point in October was up 30% on the year.

Which is just to say that, as expected, the new Arconic-less Alcoa is once again trading up and down in concert with developments in the aluminum market. The hope is that this time around, the company has enough of a competitive cost structure, and a strong balance sheet, to weather an inevitable downturn.

Alcoa expects its core markets to be stable going into 2018. If so expect more muted returns for the stock compared to the explosive gains experienced in 2017. Given the stock has nearly doubled from the $22.50 per share start price when the split was finalized barely a year ago, investors have little reason to complain.