General Motors (GM 0.48%) recently reported Q4 2023 financial results that shareholders rallied around. The business raked in $43 billion of revenue during the three-month period and posted adjusted earnings per share of $1.24. Both figures crushed Wall Street estimates.

In the last three months, GM shares are up an incredible 43%. That gain beats the S&P 500's return by a wide margin.

Is it time to buy this top automotive stock and hold it for the long term?

Riding strong momentum

GM's revenue in the fourth quarter was essentially flat compared to the year-ago period. However, net income rose 5.4%. And for the full year, the company's sales of $172 billion climbed 9.6% versus 2022. Management also provided upbeat guidance that pleased Wall Street analysts. Executives forecast net income to increase by 4% in 2024.

It's worth pointing out that GM sold 943,000 units in Q4, which was down from 967,000 in prior-year period. Ongoing macro headwinds, particularly around the affordability of new cars due to higher interest rates, could be negatively impacting volumes. And as a result of industry conditions, management believes there will be pricing pressures in 2024.

The market seems to be shrugging off GM's electric vehicle (EV) division. "The pace of EV growth has slowed, which has created some uncertainty," CEO Mary Barra said on the Q4 2023 earnings call. We're seeing similar trends play out with industry peers, most notably Tesla.

Nonetheless, GM still plans to expand manufacturing capabilities such that the business can produce 1 million EV units in 2025, with this segment posting an operating margin in the mid-single digits at that time. EVs made up less than 3% of the company's volume last year, so it will be a long time until this becomes a meaningful financial driver.

GM generated $11.7 billion of adjusted automotive free cash flow last year. Management used this windfall to repurchase $11.1 billion worth of shares, with plans to continue this capital allocation policy going forward.

The investing perspective

I think expectations for GM have been so low that even the latest quarterly results -- which weren't anything to write home about -- can move the stock higher. Shares still trade at a price-to-earnings (P/E) ratio of just 5.5. That's a steep discount to rival Ford, which sells for a P/E of 11.2.

That valuation is ridiculously cheap, so it makes sense why management has been aggressively buying back shares. But before jumping in to add the stock to your portfolio, there are still reasons for investors to be a bit cautious.

For starters, competition in the automotive industry is intense, with there being domestic and international rivals to fend off. Plus, there are new EV start-ups trying to capture market share. This gives consumers a vast number of options when picking where to spend their money.

This means that the operating environment for GM will continue to be difficult. Just to maintain market share, ongoing capital expenditures will be elevated. And the mature nature of the industry translates into minimal growth prospects and low profit margins.

If these unfavorable traits weren't enough to dissuade you, consider the cyclical nature of GM's business. External factors like supply chains, interest rates, and gas prices can have a profound impact on the company's success, and they're all outside of its control.

In the last 10 years, GM shares have returned 41.9% (including dividends). During that same time frame, the S&P 500 posted a total return of 231.2%. Unless investors have compelling reasons to believe that this trend will be different over the next decade, I think it's best to temper expectations.