Auto stocks as a group were beaten up pretty badly in a broad sell-off in the fourth quarter of 2018. It's not hard to understand why: Auto sales are cyclical, rising and falling with consumer confidence, and the current cycle is quite old by historical standards. There's a growing sense that we're closer to the next recession than the last one, and it's a safe bet that auto sales -- and automakers' profits and share prices -- will decline when it arrives.

That said, when an entire industry is out of favor with Wall Street, there are sometimes good buys for investors willing to be patient. Both Toyota Motor (TM -1.67%) and BMW AG (BAMXF -3.53%) (BMWYY 0.59%) were investor favorites earlier in the decade, when auto sales were growing steadily. Below, we'll look to see if either (or both) are good bets for new money now. 

Valuation and stock performance

Toyota's stock has largely recovered since the beginning of the year, but BMW's share price slumped again in May, after the company cut its full-year margin guidance.

BMWYY Chart

BMWYY data by YCharts.

Historically, healthy automakers have been valued around 10 times earnings during good economic times. Right now, Toyota is trading at about 10.7 times its earnings over the past 12 months, while BMW is at 8.4 times its earnings over the same period.

Both stocks look somewhat cheaper when we compare their prices with future earnings estimates. Toyota is trading around 8.9 times its expected earnings on that basis, while BMW is at 7.8 times its forward earnings.

From a valuation perspective, BMW's shares have the advantage right now.

A black 2019 BMW X7, a large luxury SUV.

New high-profit SUVs like the X7, introduced last year, are key to funding BMW's future-tech efforts. Image source: BMW AG.

Dividends: How Toyota and BMW compare

Toyota's fiscal year ends on March 31. In its most recent fiscal year, it paid total dividends of 220 yen ($2.05) per share, unchanged from the prior year, for a yield of about 3.2%.

BMW pays a dividend once per year, in May after its annual meeting. It paid 3.50 euros ($3.84) per share in May of 2019, down from 4 euros per share in 2018, for a yield of 5.7% at current prices.

Both BMW and Toyota set their dividend payments annually, based on the prior year's results. Both have shown in the past that they won't hesitate to reduce their payouts if profits fall.

Growth and potential risk

Both Toyota and BMW are mature global industrial giants with high fixed costs, meaning that investors seeking dramatic profit growth should probably look elsewhere. But we can sometimes find earnings growth in the automotive sector with companies that are restructuring or realigning their businesses.

BMW is doing that to some extent now. It has been investing heavily in electric vehicles, and is now spending to adapt its factories to build battery-electric, hybrid, and traditional internal-combustion models on shared assembly lines. (The shared lines are a key component of BMW's strategy, which requires the ability to quickly vary the mix of drivetrains it builds as consumer demand shifts.)

BMW is also working with partners including Intel and Fiat Chrysler Automobiles, among others, to develop a series of advanced driver-assist and self-driving systems over the next several years.

Eventually, both efforts should lead to bottom-line growth. But in the near term, both require significant spending, which BMW is hoping to partly offset with a series of new higher-margin SUV models.

Toyota's plan is less drastic. Along with broad-based cost reductions, the company is working to move most of its vehicles to a shared architecture that will increase economies of scale (thus reducing costs) while reducing the time it takes to bring new models to market. Like BMW, Toyota is also making significant investments in electric-vehicle technology and self-driving research, but those investments have less impact on Toyota's bottom line simply because of its size.

In summary, both companies are making significant investments in the technologies that are expected to transform the auto business over the next decade. Those investments should help mitigate the risk of disruption. while positioning both companies to thrive in the decades to come.

If there's an advantage here, it's probably to Toyota, since BMW's smaller size means that the heavy investments required in future technologies have a more dramatic impact on its bottom line.

A blue 2020 Toyota Corolla Hybrid, a compact sedan.

Toyota is building on its dominant position in gasoline-electric hybrids with a series of new models. The first-ever Corolla Hybrid arrived at U.S. dealers in the third quarter. Image source: Toyota.

Which company is the better buy now?

It's a bit of a risk to buy any automaker late in an economic expansion. As noted above, auto sales and automakers' profits (and their stock prices) rise and fall with consumer confidence, and while it's impossible to predict the timing of a recession, it's likely that we're closer to the next one than to the last one. If so, it's tough to recommend betting on an automaker's stock to outperform the market over the next few years.

That said, within the auto sector, Toyota and BMW are both pretty decent bets. Toyota, with its huge scale and deep financial reserves, is probably the less volatile choice, while BMW is likely a somewhat better bet for bottom-line growth over the next several years. BMW's shares also come with a fatter dividend, at least for now.

I don't think you'll lose your shirt on either, but between the two, I think BMW's stock has a slight advantage for new money now.