2018 was a rough year for auto stocks: New-car sales have slowed in China and might be slowing in the U.S., pricing pressures are rising in Europe, and trade-war concerns threaten to throw wrenches into many automakers' plans. 

When a whole industry falls out of favor, as autos have over the last year, there are often opportunities for investors. But which automakers are the best bets for new money now, with a potential slowdown on the horizon?

Below, I'll look at two high-performing global auto giants, Toyota (TM 1.17%) and General Motors (GM 0.45%). Which is the better bet today? Read on. 

GM CEO Mary Barra standing at a podium in front of a dark-blue General Motors backdrop.

CEO Mary Barra's goal is to make GM the most profitable automaker in the world. Image source: General Motors.

Valuation and stock performance

Neither Toyota nor GM had a great 2018 in the stock market. But while Toyota's U.S.-traded shares fell almost 9%, GM's fared much worse, dropping just over 18% on the year. 

GM Chart

GM data by YCharts.

When we look at valuation measures based on earnings, both companies are trading below the historical norm for auto stocks in good economic times, around 10 times earnings. At the moment, Toyota is trading at about 7.3 times its trailing 12-month earnings, while GM is trading at roughly 5.1 times its adjusted earnings over the same period. (I'm using adjusted earnings for GM because of a big tax-related noncash one-time item from the fourth quarter of 2017 that would skew our results if included.)

Looking ahead, Wall Street analysts polled by Thomson Reuters expect both companies' earnings to decline next year, which makes both stocks  look a bit more expensive. The analysts currently expect Toyota to earn 835.49 yen per share, on average, in the fiscal year that will end on March 31, 2020, giving us a forward price-to-earnings ratio of about 7.8. They expect GM to earn $5.86 per share in 2019, for a forward price-to-earnings ratio of about 5.9.

Dividends: How Toyota and GM compare

Toyota pays dividends twice a year. In its most recent fiscal year, which ended on March 31, 2018, it paid total dividends of 220 yen per share, an increase from 210 yen per share in the two fiscal years prior. It translates to a dividend yield of about 3.4%.

General Motors pays a quarterly dividend, currently $0.38 per share or $1.52 per year. It was last increased in February of 2016, and GM has signaled that it's unlikely to be increased again in the near future. At current prices, GM's dividend yield is about 4.4%.

Any time we see a dividend yield of more than 4%, we need to look deeper, as a high dividend yield can be a sign that a dividend cut is in the future. (For instance, if a dividend yield is high because a company's share price has fallen sharply recently, we need to be sure that the developments that caused the share price to drop don't raise concerns about the company's ability to maintain the dividend.) 

A silver 2019 Toyota RAV4, a compact crossover SUV.

Huge demand for Toyota's compact RAV4 crossover has helped offset slumping sedan sales. Image source: Toyota.

In this case, we don't need to be too worried, as GM's shares have slumped along with other auto stocks. GM's payout ratio is a fairly conservative 28.3%, though that will rise if GM's profits fall this year as analysts expect. But GM has said repeatedly that it intends to continue to pay its quarterly dividend at the current level through the next recession, at least until it runs through its $18 billion cash reserve. (GM has additional credit lines to tap should that happen, but those credit lines won't be used to continue the dividend.) 

How long would it take GM to exhaust its cash in a downturn? In 2017, GM modeled a typical moderate recession and concluded that it would use about $5 billion from its reserve in the first year of the downturn. For context, over the last 45 years, peak-to-trough economic contractions in the U.S. have lasted an average of 12 months. 

Long story short: GM's dividend probably isn't at risk unless we enter a severe and protracted recession -- but a dividend increase may not happen for a while. 

Growth and potential risk

Both GM and Toyota have plans to increase profitability over the next several years. Toyota's is incremental: Like GM and other rivals, including giant Volkswagen, Toyota is in the process of moving most of its vehicles to a shared, modular architecture that will greatly improve economies of scale while simplifying manufacturing. CEO Akio Toyoda has also been carrying out an extensive cost-reduction effort that has already yielded significant gains. 

CEO Akio Toyoda standing at a white podium with a red Toyota logo.

CEO Akio Toyoda has cut costs while pushing Toyota to create more emotional products. Image source: Toyota.

GM is doing something similar with its vehicle architectures, though it's a few years behind Toyota. But CEO Mary Barra has more plans in the works: The company recently announced a major restructuring of its North American operations that is expected to boost GM's automotive free cash flow by $6 billion a year by the end of 2020. 

GM will give more specifics on its plan later this week, but we already know that the company will use that added cash flow to ensure that it can keep its electric-vehicle and self-driving efforts fully funded through a downturn. 

A GM Cruise self-driving vehicle, a white hatchback with visible self-driving hardware.

GM subsidiary Cruise Automation is aiming to launch a fleet of self-driving taxis in U.S. cities later this year. GM's restructuring is intended to ensure that Cruise and other future-tech efforts remain funded. Image source: General Motors.

With respect to risk, neither company is likely to be in danger of collapse any time soon. Both are major employers in their home countries, and both would likely benefit from government support (as GM did in 2009) if something like another economic crisis put them in danger -- though to be clear, that's not likely: GM is in far better shape than it was in 2009, and Toyota has massive cash reserves available. 

But in the near term, it's important for investors to keep in mind that all automakers are cyclical companies, meaning that their sales and profits rise and fall with consumer confidence. Specifically, both companies will see profits decline sharply whenever the next recession arrives -- but they'll rise again as the economy recovers. 

Which is the better buy today? 

Toyota is the conservative choice: It has a strong credit rating, a fat cash reserve, and a decent dividend yield. It's unlikely to drop too far in a protracted bear market, but it's also unlikely to soar in a recovery. 

GM is far healthier than it was in 2009 (and arguably the healthiest of the three Detroit automakers). It's likely to drop more sharply than Toyota in a recession -- but also likely to pop nicely early in the recovery. And you can reinvest that nice 4.4% dividend to dollar-cost average through that swing down, whenever it happens.

There's another reason to like GM right now: Its self-driving subsidiary Cruise Automation could be headed for a spinoff at some point, an event that could unlock significant value. Taken all together, I think GM is the better buy for new money today.

Check out the latest GM earnings call transcript.