Who would have thought that a smaller Chilean miner would become one of the hottest stocks of 2017? Last year, Sociedad Quimica y Minera (SQM 1.45%) (also known as SQM) more than doubled thanks to one thing: batteries. As one of the world's largest lithium miners, SQM found itself in the midst of the Wall Street hype cycle around anything related to electric vehicles, energy storage, and increased demand for lithium-ion batteries. 

For long-term investors, situations like this one can make for challenging investment decisions. While there are clearly some long-term catalysts, it's hard to distinguish a real investment opportunity from getting caught up in the hype. So let's sort through whether SQM's stock is a buy.

Brine ponds for lithium production

Image source: Sociedad Quimica y Minera.

What's all the hype about, anyway?

For any stock to have a speculative run like the one SQM had last year, there has to be some sort of catalyst that has loads of people excited. For instance, 3D printing is a technology with the potential to completely upend conventional manufacturing. The legalization of marijuana could take a formerly illicit trade worth billions of dollars and make it a viable business. 

For SQM, the catalyst that set off speculators is the expected boom in lithium-ion batteries. According to Bloomberg New Energy Finance, between 2015 and 2030, demand for lithium-ion batteries is expected to grow 68 times to 1,293 gigawatt-hours. As the name for the battery might suggest, ramping up production of batteries is going to require a lot of additional lithium production. Consulting company Roskill estimates 2027 demand for lithium will be more than double current demand. 

Increasing production of a mined mineral by two times in less than a decade doesn't happen that often. Of course, lots of speculative investors in 2017 were saying to themselves, "How can we meed that demand? Lithium prices will go through the roof!" and gobbled up shares of SQM and its peers Albemarle and FMC.

SQM Chart

Data by YCharts.

As is the case with many of these kinds of speculative investments, the hype cycle started to die down when lithium producers began unveiling plans to drastically increase production. SQM alone expects to increase its production from 70,000 metric tons of lithium carbonate to 180,000 metric tons by 2021. The ability to bring on new capacity that quickly goes to show that yes, production of lithium is likely able to meet growing demand.

Separating hype from healthy returns

There is little doubt that demand for batteries is going to grow quickly. The cost of lithium-ion batteries continues to decline, and each day they become more cost competitive with internal combustion engines and as an energy-storage device with renewable energy sources. Even if electric-vehicle penetration doesn't meet the current lofty projections, there is a long growth runway ahead.

The other compelling aspect about investing in SQM is that it's one of the lowest-cost producers of lithium carbonate. SQM's cost per metric ton is in the $5,000-to-$8,000 range, which made for a healthy profit margin when the average selling cost for lithium was $16,000 per metric ton this most recent quarter. 

Another thing working in SQMs favor: It has considerable market share in several other commodity minerals. It produces 35% of the world's industrial iodine and its derivatives, and commands a 54% share of the global market for potassium nitrate, a fertilizer. This added diversity helps keep the company from being tied solely to the fate of lithium-ion batteries. All in all, SQM looks like an attractive business.

The challenge for investors, though, is determining what is an appropriate price to pay for a company like this. Even after a sharp decline in share price in 2018, shares of SQM trade at a price-to-earnings ratio of 25. That is roughly equivalent to the company's historical average and is quite high for a company that is so exposed to commodity prices. So investors who get in on this stock are paying a bit of a premium. 

Good company, not a great price

As can be the case with many high-growth industries, it's quite hard to determine a fair price for SQM's stock. On the one hand, it is a low-cost miner with significant market share in multiple commodities and has done a relatively good job of generating returns for investors. It also has a huge growth opportunity as demand for lithium builds up over the next decade. At the same time, its shares are trading at a relatively high valuation for a company intricately tied to commodity prices, even if it is a low-cost producer of those commodities.

It's probably fair to say that you won't be disappointed if you were to buy shares of SQM today, but investors who are value conscious might want to keep it on a watch list and wait for a time when it's trading at a more attractive valuation. Paraphrasing Warren Buffett, there are no called strikes in the market, so there's no harm in waiting.