Tesla's (TSLA -3.40%) stock has had a brutal year, losing 45% of its market capitalization over the last 12 months.

While existing investors cringe, the opportunity to buy Tesla's stock cheaply is probably mouth-watering to potential investors. But is Tesla stock a buy now? Let's explore this further.

Car charging.

Image source: Tesla.

Tesla is firing on all cylinders

Tesla has been on fire lately. It delivered its first-ever profitable year in 2020, as the business sold enough cars that year to offset its huge fixed cost.

Since then, the carmaker has outperformed its result in 2021 with record sales volume, revenue, and profitability -- revenue grew 71% to $54 billion while net income surged 665% to $5.5 billion.

And before the bulls get over Tesla's 2021 success, the carmaker delivered yet another record-breaking year. Revenue rose 51% year over year to $81 billion, and net profit more than doubled to nearly $13 billion  on record sales delivery of 1.3 million vehicles.

Tesla's solid financial performance also contributed to its strong financial position as cash, cash equivalents, and marketable securities hit $22 billion. That's a massive turnaround for a car company flirting with bankruptcy  just a few years ago.

But there are enormous headwinds in the coming quarters

Tesla has significantly benefited from the global shift from internal combustion cars to electric vehicles. In addition, it has also profited from the low-interest rate environment, making car loans affordable for car buyers.

While the long-term tailwind from the EV shift will likely continue for decades, Tesla faces a few significant short and medium-term headwinds. Topping the list is the weak macro environment, thanks to high inflation and high interest rates. The former reduces consumers' discretionary cash, while the latter further impacts affordability by making it difficult and more expensive for car buyers to get a loan.

And that's not all. Tesla faces increasing pressure from competitors like General Motors and Ford in the U.S. and BYD in China. As competition intensifies, consumers now have more choices when buying a new electric car (more often than not at a lower price point).

Still, it is too early for competitors to declare victory since Tesla is still the largest EV player by miles in the U.S. -- its EV market share remained a whopping 65% in 2022, albeit down from 72% in 2021. Besides, it actively responds to external pressures by cutting sales  to boost sales volume.

While Tesla hopes its price cuts can boost sales in 2023, many investors remain skeptical of the effectiveness of such a strategy, especially in a weakening economic environment. If history is any guide, consumers generally stop buying highly priced discretionary products like cars when their finances become tight. Tesla will have a challenging time in the coming quarters if that happens.

So is Tesla a buy?

It's not hard to see that Tesla has done some incredible job over the years of becoming a top dog in the EV industry. And with Elon Musk at the helm, Tesla has a good chance of maintaining its leadership position in the long run.

But in the near term, the company faces some real threats from the weak economy and the high-interest rate. Also, these challenges contradict Tesla's die-hard fans' thesis that Tesla is a technology company, not a carmaker.

And that brings us to the deal-breaker, which is Tesla's high valuation. Even after its recent share price decline, the company trades at a price-to-sales ratio of 7.4 and a price-to-earnings ratio of 49.6. Comparatively, General Motors trades at 0.4 and 6.2 times, respectively.

Overall, buying Tesla's stock today remains risky, especially when the economy is heading toward a down cycle. Except for risk-taking investors who have the stomach the handle the volatility going forward, prudent investors will be best to avoid Tesla stock.