Tesla CEO Elon Musk smiles as he addresses guests at the Offshore Northern Seas 2022 (ONS) meeting in Stavanger, Norway on August 29, 2022.

Carina Johansen | AFP | Getty Images

Tesla shares surged 33% this week, marking their best weekly performance since May 2013 and second best on record.

The stock rose 11% on Friday to close at $177.88. The rebound followed a six-month period in which Tesla shares had declined more than 40%. The stock’s 65% plunge in 2022 was its worst in Tesla’s 12-plus years as a public company.

Tesla’s rally this week was aided by an upbeat fourth-quarter earnings report. During the call with shareholders and analysts, CEO Elon Musk said the company was on target to potentially produce 2 million vehicles in 2023, and he suggested demand would support sales of those cars as well.

Official guidance called for production of 1.8 million vehicles this year. The company has not revised its longstanding target for 50% compound annual growth rate over a multi-year horizon.

Tesla’s five day performance charted against Rivian and Ford Motor Company.

Tesla beat on both the top and the bottom lines, recording total revenue of $24.32 billion, including $324 million of deferred revenue related to Tesla’s driver assistance systems. The company cut prices for its cars dramatically in December and January, leading to concern about demand and a buildup of inventory.

Analyst reaction to Tesla’s numbers was mixed.

“For bulls, the growth story is alive and well,” Bernstein’s Toni Sacconaghi, who has an underperform rating on the stock, wrote in a note on Thursday. “For bears, the numbers don’t lie.”

In early January, Tesla reported fourth-quarter vehicle deliveries and production that fell shy of expectations.

Tesla’s stock jump came amid a broader market rally. The S&P 500 was up 2.2% for the week and the Nasdaq gained 4.3%.

Other U.S.-based electric vehicle makers saw their shares climb higher. Rivian rose 22% during the week, while shares in legacy automakers Ford and General Motors each gained more than 7%.

Rival electric car manufacturer Lucid spiked on Friday as well, rising 43% on reports of rumors that Saudi Arabia’s sovereign wealth fund, the Public Investment Fund, intended to take the company private.

Some of Tesla’s underperformance last year was attributed to Musk’s shift of focus to Twitter, which he acquired for $44 billion in October. Under Musk’s leadership, Twitter has experienced mass layoffs and fleeing advertisers, gutting morale.

Tesla remains the second most-shorted stock in U.S. markets, behind only Apple, meaning that a large numbers of investors are betting on a decline. Over 94 million of the automaker’s shares are shorted, according to data from S3 Partners.

Despite the rally, active short selling continues, S3 managing director Ihor Dusaniwsky told CNBC. Short sellers view Tesla’s appreciation as having created “an overheated and overbought stock that is due for at least a short-term reversal,” he said. In the last week, S3 Partners said it’s seen a 3.9% increase in total shares shorted, while investors shorting the stock lost $4.3 billion over that stretch.

WATCH: Tesla still in league of its own