After several years of strong growth, auto sales in the U.S. and other major markets are showing signs of slowing. At this point in the economic cycle, profits at many automakers are shrinking, rather than growing -- and that has put pressure on their stock prices. 

For long-term-minded investors, that pressure creates some opportunities. Both Ford Motor Company (NYSE:F) and BMW -- or Bayerische Motoren Werke AG (NASDAQOTH:BMWYY) -- drew investors' attention earlier in the cycle, when sales and profits were growing and their management teams appeared to be executing better than most. But shares of both companies have since fallen into slumps, as investors worry about declining profits and traditional automakers' ability to compete as new technologies transform the industries.

Both are still good companies, and I wouldn't recommend that investors sell either. But which is the better buy for new money now? Let's take a look.

How Ford and BMW compare on valuation and stock performance

BMW and Ford have both had a tough year when it comes to stock performance, but Ford's stock has been hit much worse than its German rival's. While BMW's stock is down about 18.8% from October of 2017, Ford's has been hit much harder, losing 30.4% of its value over the same period. 

F Chart

F data by YCharts. Chart shows the relative performance of Ford (F) and BMW (BMWYY) stock over the 1-year period ended Oct. 18, 2018.

When we look at valuation measures based on earnings, both stocks look cheap by historical standards. Right now, Ford is trading at about 5.1 times its trailing 12 months' earnings, while BMW is trading at a slightly richer 5.7 times trailing earnings. 

Because analysts expect earnings at both automakers to fall in 2019, both look a little more richly valued when we look at today's price compared to next year's earnings: BMW is trading about 6.8 times its expected 2019 earnings right now, while Ford is trading about 6.4 times its expected 2019 result. 

A black 2019 Ford F-150 Limited, a luxurious full-size pickup, on a coastal road.

Ford's massively popular F-Series pickups are its most profitable products. Ford is determined to keep them relevant as technology changes: A hybrid F-150 is due in 2020. Image source: Ford Motor Company.

Dividends: Both are good, one is better

Both Ford and BMW pay dividends that look quite generous at today's stock prices, but Ford's lower valuation gives it the higher yield. While BMW's dividend over the last year yields a rich 5.4%, Ford's looks positively lush at a hefty 6.8%.

The two companies follow different strategies when it comes to increasing dividends. BMW has increased its dividend every year since 2009, from just 0.30 euro during that difficult year to 4.00 euros in 2017. In contrast, Ford has chosen to hold its regular dividend steady at $0.60 per year ($0.15 per quarter) since 2015, though it did pay supplemental dividends of $0.25 in 2016 and $0.05 in 2017.

Ford has been clear on why it hasn't raised its regular dividend: It intends to show investors that it can maintain steady dividend payments "through the cycle" -- that is, through a recession. The company has said that it will use its hefty cash reserve ($25.2 billion as of June 30) to fund operations if its profits are squeezed during a downturn, including future-product development -- and including its regular quarterly dividend payments.

That might cause some strain. BMW's payout ratio is a sustainable 30.2%, while Ford's is close to 40% (39.9%, to be exact). But Ford executives say they are confident that they will be able to maintain dividend payments at current levels through the next recession, unless it is unusually severe or protracted by historical standards.

A 2018 BMW X3, a compact luxury SUV, on a dirt road.

Luxury crossover SUVs are white-hot all over the world. Few are hotter than BMW's X3, which was completely overhauled last year. Image source: BMW AG.

Growth and potential risk

These aren't growth stocks, of course. Ford and BMW are both mature industrial companies in a cyclical industry. That should frame how we view them as investments. 

What does that mean? New-car sales follow a cycle: They rise and fall with consumer confidence. Because automakers have high fixed costs, their profits have historically tended to shrink drastically -- or disappear entirely -- when sales fall, as they do during recessions. When new-car sales pick up, as they tend to do early in economic recoveries, automakers' profits and margins pick up as well. 

The challenge for any automaker is to make hay while the sun shines -- while keeping costs under control to minimize losses during downturns. Both BMW and Ford are in good shape on that front, thanks to lessons learned during the 2008-2009 economic crisis. Both are working to cut costs further now, while making significant investments in future technologies. 

Like most of their global rivals, Ford and BMW are facing an additional challenge right now. New technologies and new models of "mobility" have put the business of autos on the cusp of drastic changes, and the established automakers will have to fight to stay relevant. Both Ford and BMW are investing heavily in electric-vehicle drivetrains and self-driving systems, and both are experimenting with urban-mobility business models that could disrupt private-car ownership. 

BMW has chosen to develop its self-driving system with a team of partners, including Intel (NASDAQ:INTC) and Aptiv (NYSE:APTV), and expects to launch its first vehicle with self-driving capabilities -- an advanced luxury crossover SUV -- around 2021. BMW has warned that its profit margins will be squeezed a bit over the next few years by the investments necessary to support its research and development efforts. It has been adding high-margin SUV models to its portfolio to help offset the costs. 

Krueger is shown on an auto-show stand with BMW's i Vision Dynamics concept car, a preview of an electric BMW sedan expected in 2021.

BMW CEO Harald Krueger is adeptly balancing heavy investments in future technologies with products intended to maximize profits in today's markets. Image source: BMW AG.

Ford is taking a different approach. Rather than joining a partnership, it took a big stake in a promising self-driving start-up, Pittsburgh-based Argo AI, and essentially put it in charge of the software side of its in-house self-driving effort. Ford also expects to launch its first self-driving vehicle around 2021, but it will be very different from BMW's: Ford's first self-driving vehicle will be aimed at commercial-fleet applications.

As part of its preparation for the future, Ford is undertaking a larger and more expensive restructuring in an effort to maximize the profitability of its legacy businesses while expanding into new business lines enabled by these new technologies. That effort should pay off eventually, but it will cost $11 billion over the next three to five years, Ford said in July.

Long story short: Both Ford and BMW are well prepared for an economic downturn, and both expect to spend a lot of money over the next few years on efforts to position themselves for the future. 

A white Ford Fusion with visible self-driving hardware is shown in front of a Domino's Pizza restaurant. A Domino's worker is loading a pizza into the vehicle.

Ford is exploring a wide range of commercial applications for self-driving technologies, including pizza delivery. Image source: Ford Motor Company.

Is BMW or Ford the better buy right now?

I like both companies a lot as investments. I think both are well-run, both have great products that have built up loyal followings, and they're both taking sensible steps now to thrive in the high-tech near future. 

But of the two, I like Ford a little better right now. Ford's stock has been beaten up by investor concerns over that restructuring plan -- or more accurately, around Ford's efforts to explain the plan. Ford CEO Jim Hackett has been keeping his cards close to his chest, frustrating Wall Street analysts who want to see the plan and hear how Ford expects it to pay off. 

I think those concerns are overblown. Ford's sales have slipped as its product portfolio has aged, but the company has a slew of promising new products set to hit the market over the next couple of years. It's taking the right steps to maximize profitability and to be well-positioned (with plenty of options) as self-driving technologies roll out over the next several years. 

Last but not least, there's that dividend: I think Ford will be able to maintain it through the next downturn, whenever it arrives. I think investors who buy Ford stock here and reinvest that dividend will likely be pleased with the results five to seven years from now. 

John Rosevear owns shares of Ford. The Motley Fool recommends BMW and Ford. The Motley Fool has a disclosure policy.