What happened

Shares of Tesla (TSLA -1.92%) had a good month in October even as the overall stock market declined sharply. During October, Tesla soared 27% as the S&P 500 declined 7%.

The stock's big gain came as Tesla CEO Elon Musk settled with the SEC over fraud allegations and the company swung to a meaningful profit.

A red Tesla Model 3.

Tesla's Model 3. Image source: Tesla.

So what

The first big move for Tesla last month came on Monday, Oct. 1, after Musk settled with the SEC over allegations that he had misled investors with tweets about the automaker's potential privatization. Adding even more fuel to the stock's move on Oct. 1, Musk sent an email to employees over the weekend leading up to Monday, saying Tesla was "very close to achieving profitability." 

Later in the month, shares also benefited from Tesla's earnings release, which featured non-GAAP earnings per share that were much higher than expected. Non-GAAP EPS for the period was $2.90, up from a loss per share of $3.06 in the year-ago quarter and obliterating a consensus analyst forecast for $0.17. Tesla also notably achieved positive free cash flow of $881 million during the period.

Now what

For its fourth quarter, Tesla maintained its guidance for 100,000 combined Model S and X deliveries in 2018. In addition, Tesla said it expected Model 3 deliveries during Q4 to be slightly higher than the 56,065 it delivered to customers in Q3.

Management also said it expected to be profitable again in Q4.