What happened

Shares of General Motors (GM -0.17%) were gaining last month after the automaker turned in a strong earnings report and rode the broader recovery in the stock market. According to data from S&P Global Market Intelligence, the stock jumped 22% in October.

As you can see from the chart below, the stock charged higher in the last week of the month after its earnings report came out.

GM Chart

GM data by YCharts

So what 

The first piece of good news GM got came in the beginning of the month when the company reported U.S. vehicle sales had increased 24% to 555,580. The company said it was No. 1 in full-size SUVs, pickups, and large luxury SUVs.

The stock jumped 9% on the news, though it gave up those gains over the subsequent days on some negative analyst notes, including a downgrade from UBS that predicted GM's earnings would be halved next year due to the deteriorating macroeconomic environment.

On Oct. 10, the company said it had sold 630,000 vehicles in China, indicating a slight rebound from the first half of the year as China's COVID-19 restrictions begin to lift.

The stock then climbed 3.6% on Oct. 25 as it reported strong third-quarter earnings. Revenue jumped 56% year over year to $41.9 billion as it rebounded from the supply chain challenges of a year ago. That was actually slightly below estimates at $42.2 billion, but earnings per share jumped from $1.52 to $2.25, ahead of expectations at $1.88.

The company said its market share in electric vehicles rose to 8%, and it led the market in full-size SUVs and full-size pickups.

Guidance for the year was also strong, calling for adjusted earnings per share at $6.50 to $7.50, also ahead of the consensus at $6.79, making the stock look cheap at a price-to-earnings ratio of less than 6.

Now what

Used vehicle prices have fallen in recent months, a sign that the auto market is normalizing after the supply crunch. Additionally, the weakening economic environment is likely to impact auto demand heading into 2023. 

The auto sector is highly cyclical as consumers tend to cut back on expensive durable purchases during tough times, so there's a good chance that profits will fall next year.

However, the stock still looks like a good value play for investors, especially considering its growing position in electric vehicles.