Is General Motors' (GM -0.05%) stock a buy? 

It's certainly drawing a lot of interest lately. Several big-name Wall Street analysts have issued upgrades on GM in recent weeks, and I think they're on to something. Here are 10 reasons shares of the old Detroit giant might be a fit in your portfolio today. 

1. GM's profitability is growing

The U.S. new-car market may have stalled, but GM's profitability is still growing, thanks to smart management moves and new products that deliver higher margins. Excluding the effects of its now-sold European unit, a longtime money-loser, GM earned $12.8 billion before taxes on revenue of $149.2 billion in 2016, good for a 8.6% margin. It expects all three of those numbers to be higher in 2017, despite the sluggish market.

Barra is standing at a podium in front of a GM backdrop.

CEO Mary Barra has pushed GM to focus on profitability rather than market share, a historic change that is paying off. Image source: General Motors.

2. GM CEO Mary Barra has the right priorities

Barra and CFO Chuck Stevens often refer to GM's shareholder-focused "disciplined capital allocation framework." In brief, GM seeks returns on invested capital of greater than 20%, while maintaining an investment-grade credit rating and an $18 billion cash reserve, and returning all excess cash to shareholders through dividends and share repurchases. It's a sea change from GM's past, and a sign that GM is determined to reward its owners. 

3. GM is ahead on electric cars

You probably know that GM's Chevrolet Bolt EV was the first long-range electric vehicle with a mass-market price (under $40,000). The Bolt's sales have been growing steadily since its launch last December.

A bar chart that shows U.S. sales of the Chevrolet Bolt EV rising steadily from 579 in December of 2016 to 2,632 in September of 2017.

Data source: General Motors. Chart shows total U.S. sales of the Chevrolet Bolt EV for every month since it debuted in December of 2016.

GM recently revealed that the Bolt is just the beginning of its electric-car efforts. GM will launch at least 20 more all-electric vehicles by 2023, with the first two coming by the end of next year. Most will be long-range battery-electrics, but a few will have fuel cells -- a zero-emissions technology that has great promise in certain applications, such as military vehicles and first-responder units. 

4. GM could win the self-driving race

As recently as three years ago, the idea that any of the big automakers would lead the self-driving revolution seemed laughable to most. But things are different now: GM has a "mass-producible" Level 4 self-driving vehicle ready to go and could begin cranking them out within months

A white Chevrolet Bolt EV with visible self-driving sensors is parked outside GM's historic Design Dome in Warren, Michigan.

GM's "mass-producible" Level 4 self-driving vehicle is an elaborately modified Chevrolet Bolt EV. Image source: General Motors.

As of right now, it appears that nobody else working on self-driving cars can match the combination of software, hardware, supplier network, and mass-production capacity that GM has brought to autonomous-vehicle development. If there's money to be made in self-driving cars, and there is, GM is an early pick to be making a lot of it. 

5. GM is competing well in today's markets

Year-to-date, the U.S. new-car market is down 1.8%, a sign that it's probably past its cyclical peak. But GM's U.S. sales are up 8.1% this year, thanks to its popular and well-regarded line of all-new crossover SUVs. 

Meanwhile, in China, it's a similar story: After a tough start to 2017, when small-car sales dropped after the Chinese government cut an important tax break, GM has more than recovered. Sales are up 1.1% for the year after an 8.2% third-quarter increase driven by those same crossover SUVs. 

A black Cadillac XT5, a midsize crossover SUV, on a city street.

GM's Cadillac XT5 luxury crossover SUV was all-new last year. Its sales have been strong in both the U.S. and China. Image source: General Motors.

6. GM is well prepared for a downturn

If the U.S. new-car market is past its cyclical peak, that means a downturn is coming. GM is very well prepared for that downturn, whenever it comes. Automakers always get squeezed during downturns, but Stevens said recently that GM's much-improved cost base should keep it profitable even if U.S. sales fall by 25%

And GM won't need to cut spending way back to make that goal: That $18 billion cash reserve is intended to keep GM's R&D and new-product programs funded through a recession. Ford Motor Company (F 0.17%) was able to do that though the last recession, in 2008 and 2009, which is why it was able to gain market share with fresh products as soon as the recovery started. GM has learned well from its old rival's experience.

7. GM's stock is cheap

Historically, healthy automakers have traded around 10 times earnings, maybe a little higher in good times. Times are still good right now, but GM's valuation is low at just 7.7 times its expected 2017 earnings. 

The takeaway: Despite the company's success in recent years, GM's stock is still value-priced. 

8. GM pays a good dividend

Because GM's stock valuation is low, its dividend yield is a nice 3.5%. That's money that an investor will collect and can reinvest no matter what happens to the stock price in the near term. 

9. GM's dividend is sustainable

That dividend won't get cut at the first sign of trouble -- on the contrary. GM's dividend is deliberately set at a fairly conservative level, with the intent that it will be able to maintain payments through a downturn -- unless things get very severe, of course.

10. Wall Street is catching on to GM's story

Take a look at at how GM's stock has performed over the past six months.

GM Chart

GM data by YCharts.

What's driving that? As I mentioned, several big-name analysts have issued bullish reports on GM. They've been citing all the things we've just talked about, including GM's good management, its leadership in future technologies, and its profitability today. 

But as you look at that chart, remember that GM is still undervalued. That upward trend might be just getting started.