As of this writing, shares of Tesla (TSLA -1.11%) are up more than 67% year to date, making it the fifth-best-performing stock in the S&P 500.  On the surface, such a swift and outsize gain could lead investors to believe that Tesla is overvalued or, at the very least, vulnerable to a sell-off. But some context is in order.

Let's look at where Tesla stock has been to understand where the electric vehicle (EV) company is today and where it could be headed.

A person with clasped hands and a furrowed brow while sitting at a computer.

Image source: Getty Images.

Using price action to your advantage

Price action is a term that refers to a stock's price movement. It is used by technical analysts to look for key levels in a stock price. But for fundamental investors, it often has a negative connotation. And for good reason.

An argument based on price action could say, "Because this stock was this price a few months ago, it can get back there." This is referred to as "anchoring" to a previous price. Or "If this stock passes $400 a share, what's to stop it from going to $500?" And so on.

In this vein, price action can go hand in hand with speculation. But that doesn't mean price action is entirely worthless. By using price action merely as a tool instead of a guide, fundamental investors can better understand a stock's price without letting the price movement dictate whether to buy or sell a stock.

A pivotal moment for Tesla stock

With Tesla's margins weakening and production growth slowing, now is certainly a vulnerable time for the leading EV maker. So understanding where shares have been over the last year or so could prove useful.

The stock fell 65% last year. But the most brutal decline came in December, when it fell 36% in that month alone. If you take out that final month -- which looks to me like an overreaction -- the stock would have been down less than 45% last year and been around the $195 range heading into the new year -- making its 2023 gain far lower.

A tale of two sell-offs

Of course, some sharp sell-offs can be for a good reason. Consider the 39% decline in SolarEdge Technologies (SEDG 2.81%) stock over the past month. SolarEdge makes inverters and power optimizers for solar energy solutions. The solar industry as a whole has been under immense pressure due to rising interest rates -- which make projects hard to finance -- and years of outsize growth that have left the industry prone to a correction.

On Oct. 19, SolarEdge announced preliminary financial results that caught investors off guard and sent the stock down as much as 36% in a single day. SolarEdge is now down over 71% year to date. It's hard to quantify how much of that sell-off is bad news and how much is panic. But there's no denying that the stock has posted a massive monthly decline for a logical reason.

The same can't really be said for Tesla's December 2022 sell-off, which seems much more panic-induced and wasn't based on new information, but rather emotion. If we take out that December sell-off, then Tesla stock, around $208 today, would be up less than 7% year to date. It would also go from being one of the best-performing S&P 500 stocks to just an average one -- and drastically underperforming the Nasdaq Composite's 20% year-to-date gain.

Where Tesla could be headed

The question now is whether Tesla stock deserves to be higher than that Nov. 30 threshold. If we look back at how Tesla finished 2022 and where it is expected to go in 2023, there's a good argument that things are going worse than expected -- which is bad news in the short term.

In its fourth-quarter 2022 earnings call, Tesla guided for 2023 production of 1.8 million vehicles, and CEO Elon Musk thought it could be as much as 2 million. In its third-quarter 2023 investor presentation, management reaffirmed that it is on track to produce over 1.8 million vehicles this year. That sounds great until you realize that those sales have been heavily dependent on price cuts, which have taken a sledgehammer to the company's once-coveted high operating margin.

TSLA Operating Margin (Quarterly) Chart

TSLA operating margin (quarterly) data by YCharts.

Tesla's third-quarter 2023 operating margin of 7.6% was the lowest since the first quarter of 2021, when it posted a 5.7% operating margin. Investors might have expected production growth to slow, but this kind of margin hit is surprising.

At least in the short term, it's hard to argue why Tesla stock should be up at all in 2023. But that doesn't mean it should go back down to its 2022 close of $123.18 because that December sell-off was unwarranted.

Take a wait-and-see approach to Tesla

The long-term investment thesis for Tesla remains intact, but it would be a mistake to ignore just how concerning the margin declines have been, and how dependent the company is on higher margins to fuel its organic growth with cash.

That said, Tesla still has unbelievable potential upside from robotaxis, artificial intelligence, self-driving cars, and monetization of its charging network. So it is best to take a balanced approach by digesting the short-term negatives within the context of the long-term positives.

The biggest mistake Tesla investors can make is throwing all of the 2023 gains out the window just because the results have been weak. Rather, now is the time to use price action to your advantage and decide how you value the December 2022 sell-off.

If you're like me and you think it was unwarranted, Tesla is probably worth holding but not necessary buying right now. And if we factor out that December 2022 decline, the stock really isn't up that much at all in 2023 -- which is good news if you're a long-term investor because it could mean the stock is less overvalued than its year-to-date performance would suggest.