Economic uncertainty has hit the S&P 500 like a wrecking ball this year, sending the benchmark index spiraling into a bear market. But the drawdown has been especially devastating for electric car company Tesla (TSLA 0.79%). Its share price has plummeted 72% year to date, which makes it the second-worst-performing stock in the S&P 500.

For context, Tesla has never suffered a sharper share price decline at any point in its history, and six analysts have downgraded the stock in the last two weeks alone.

Is that meltdown a once-in-a-decade buying opportunity? Or should investors avoid this beleaguered stock?

The bear case for Tesla

Tesla has experienced a number of setbacks of late. The company missed delivery estimates in the third quarter, and while management had previously guided for 50% growth in annual deliveries, CFO Zachary Kirkhorn recently said deliveries would fall just short of that figure this year.

Tesla places the blame on its batch shipment strategy, which creates logistics bottlenecks near the end of each quarter. The company is working to resolve that problem by smoothing regional builds and spreading shipments more evenly throughout each quarter. But investors are afraid the delivery shortfall is a symptom of a larger problem: decreased demand. And Tesla stoked that fear last week when it doubled its discount on Model 3 and Model Y vehicles.

Additionally, Tesla has temporarily shuttered Gigafactory Shanghai in response to a surge of COVID-19 cases in China, which arose following the government's easing of zero-COVID policies. Gigafactory Shanghai is Tesla's largest factory as measured by car output, according to The Wall Street Journal, so its closure could cause fourth-quarter deliveries to fall even shorter than previously expected.

Finally, many analysts have expressed concern about Twitter, noting that CEO Elon Musk may be neglecting Tesla and its shareholders at a time when the electric car company desperately needs his leadership in order to focus on issues facing the social media platform.

As a whole, the bear case is compelling and worth consideration, but it centers around short-term problems. If Tesla is indeed struggling with weak demand, it almost certainly stems from high inflation and rising interest rates, not an underlying problem with its vehicles. That means demand should rebound as economic conditions improve. Additionally, Gigafactory Shanghai will reopen in time, and Musk plans to step down as CEO of Twitter.

Red Tesla Model Y speeding down the open road.

Image source: Tesla.

The bull case for Tesla

Despite delivery shortfalls and softening demand, Tesla sold more fully electric cars than any other automaker through the first nine months of the year, capturing an 18.5% market share. Moreover, Tesla once again reported an industry-leading operating margin in the third quarter, as its focus on manufacturing efficiency continued to bear fruit.

Better yet, Tesla is set to become more efficient in the future. The company already pays less to build battery packs (the most expensive part of an electric car) than other automakers, and its latest 4680 battery cells promise to reinforce that edge by cutting costs in half. Tesla is also ramping up output at new plants in Texas and Germany. Gigafactory Berlin is particularly noteworthy because it will localize vehicle production in Europe, the second-largest electric car market in the world, thereby lowering logistics costs for Tesla.

More broadly, Tesla still believes it can achieve 50% average annual growth in vehicle deliveries over a multiyear horizon, even if it falls short of that guidance this year. That leaves the company well positioned to capitalize on a large and growing addressable market. According to Transparency Market Research, global electric vehicle sales will grow at nearly 30% annually to a total of $1.9 trillion by 2031.

However, Musk and other members of management have said full self-driving (FSD) technology will eventually be the most important source of profitability for Tesla. The company recently launched its FSD beta software across North America, and pending regulatory approval, Europe and other parts of the world will follow. Additionally, Tesla plans to produce a robotaxi in 2024, moving one step closer to its ultimate goal of operating an autonomous ride-hailing network.

On that note, Precedence Research says the global autonomous vehicle market will grow at 39% annually to reach $1.8 trillion by 2030, and Ark Invest estimates that autonomous ride-hailing platforms will generate $2 trillion in profits by 2030. That puts Tesla in front of another large market opportunity, and with more autonomous driving data than any other automaker, the company is particularly well positioned to be a leader in self-driving cars.

Investors need to understand the risks

Even after its share price meltdown, Tesla still commands a market capitalization of $355 billion, meaning the company is worth nearly twice as much as the next closest automaker. Additionally, a portion of its valuation is based on FSD technology, which faces regulatory hurdles and uncertain development timelines. That makes Tesla stock risky.

However, with shares currently trading at 5.2 times sales -- a big discount to the historical average of 11 times sales -- the sell-off has created a good buying opportunity for risk-tolerant investors.