Tesla's (TSLA  ) stock price hit a new, all-time high on Thursday, crossing the $390 mark which was the stock's previous high set in September 2017. In the interim, the stock dropped more than 50% before bottoming around $185 in June. The major issue in terms of operations was doubt over whether the company would be able to ramp up production while maintaining quality to meet its sales targets and justify its lofty valuation.

Of course, this period contained a number of high-profile controversies as well. Some memorable ones included CEO Elon Musk smoking weed on a live YouTube (GOOGL  ) broadcast, tweeting that "funding secured" at $420 per share in an effort to incite a short squeeze, and publicly battling with the SEC over the fallout from his tweets. Many skeptics saw the company's struggles and the CEO's reckless behavior as an indication that the company was going to crumble.

Impressive Gains

In hindsight, it's clear that Tesla's steep slide and public controversies were an exceptional buying opportunity. Since its June bottom, the stock has basically slingshotted to new highs with a 100% gain in less than six months. Notably, it's less than 5% away from Musk's $420 target. It's a rare example of a prophecy emerging from a bad and very expensive joke. Musk's joke was considered as fraud by the SEC and resulted in a $40 million fines and giving up his Chairmanship.

The catalyst for the stock's turnaround was increasing production in line with its targets. Another catalyst has been strong earnings. For example, the stock was up more than 20% following third-quarter earnings in which the company showed a surprise profit. Its progress in setting up a Chinese factory is ahead of schedule and expects to hit target production goals by early 2020 which is about six months ahead of schedule. Tesla is also cutting prices in China which indicates that it's confident that production goals will be met, and the company is focussing on market share in the Chinese market rather than short-term earnings.

Tesla has a huge market opportunity in China given the country's growth rate and commitment to reducing pollution by bolstering electric-powered vehicles. And in the EV space, Tesla remains the indisputable leader in terms of market share, public perception, and technology. Competitors like Ford (F  ), General Motors (GM  ), BMW (BMWYY  ), and Mercedes (DMLRY  ) are aggressively investing to remain in the race.