Auto factories in North America are shut down, and it isn't clear when they'll reopen. Both Ford Motor (NYSE:F) and General Motors (NYSE:GM) are scrambling to cut costs, hoping that their cash hoards will hold out until the coronavirus outbreak is under control.

It's a rough time to be in the auto business. So why would we even think about buying GM or Ford stock right now?

First of all, as a general rule, buying good companies in hard times can be a great move for investors. More specifically, buying automakers during recessions can be a particularly great move, because auto stocks tend to make big moves up early in recoveries.  

Look at how Ford's stock surged after the 2008-2009 economic crisis. It dropped below $2 in late 2008 -- but by the end of 2010, it was over $16.

F Chart

F data by YCharts. Chart shows the price of Ford's stock from the beginning of 2006 through the end of 2010.

I think we can probably agree that -- at least as of the end of 2019 -- Ford and GM were both good companies. Both had rock-solid balance sheets, strong positions in high-profit market segments, capable management teams, and good future-product pipelines.

But now, both stocks are cheap. Which is the better buy under the circumstances? 

Is Ford or GM a better value right now?

In normal times, we start these kinds of comparisons by looking at the stocks' prices and recent history, hoping to get a sense of whether one might be a better value than the other at the moment. 

But in this case... well, here's how the two have performed over the past year through this past Friday, April 10.  

F Chart

F data by YCharts.

Let's try this: If we assume -- just for the sake of discussion -- that much of the world will recover from the coronavirus pandemic (and whatever economic mess it leaves in its wake) to about where things were before it started, then perhaps we can learn something by looking at the stocks' relative valuations using last year's earnings.

Because the two companies use different accounting methods to report their pension-funds valuations, we'll use "adjusted" earnings per share, excluding one-time charges (in particular, the hefty pension-related accounting charges that Ford took at the end of 2019.)

On that basis, Ford earned $1.19 per share in 2019, and GM earned $4.82 per share. Taking Friday's closing prices for the two stocks, that gives us price-to-earnings ratios of... about 4.5 for Ford and 4.9 for GM.

Advantage: Ford, but probably not by enough to matter.

A blue 2020 Ford Explorer Hybrid, a 7-passenger crossover SUV.

Early production snags slowed the rollout of Ford's all-new Explorer last summer, but production was up to full speed and Ford was selling a lot of them just before the coronavirus hit. Image source: Ford Motor.

The state of play before the coronavirus

Before the COVID-19 outbreak, both companies were making changes to reduce costs over the long term and to improve their profit margins in sustainable ways. Both were, and still are, also investing aggressively in electric-vehicle development, as well as in efforts to develop and commercialize self-driving vehicles.

As of the end of 2019, GM's margin-boosting effort was further along than Ford's. GM's adjusted operating margin was 6.1% in 2019, versus just 4.1% for Ford. GM was having success with its crossover SUVs and new full-size pickups, while Ford was in the midst of launching its own new SUVs and looking ahead to an all-new F-150 expected by the end of 2020.

At that time, GM was looking forward to launching all-new versions of some of its most important profit drivers, its full-size SUVs, later this year. GM also had, and presumably still has, new versions of its midsize pickups on the way, and a new electric SUV for Cadillac that we expected to see in March. GM has put its launch on hold for now. 

Ford was also looking ahead to other new models that would have helped its margins, most notably an all-new Bronco SUV and the electric Mustang Mach-E. If the pandemic hadn't happened, Ford might have shown off the new Bronco and the smaller Escape-based Bronco Sport last week, at the now-canceled New York International Auto Show.

As of right now, we don't know which of those upcoming products will be delayed, or for how long. GM and Ford may not know for sure either.

To sum up: As of the end of 2019, Ford had a credible plan under way to boost its performance by the end of 2021 or so -- but GM was already performing better. Advantage: GM. 

A 2020 GMC Sierra Denali HD, a heavy-duty luxury pickup truck.

GM completed the rollout of its all-new pickups last year. Sales were strong in the first quarter of 2020, despite the pandemic. Image source: General Motors.

Where do things stand now?

For the most part, GM and Ford have moved in parallel during the crisis. Both companies have shut down their factories in North America and elsewhere. (Outside of China, South Korea, and Japan, most auto factories around the world are closed right now.) Both companies have suspended their share-repurchase programs, drawn down their lines of credit, implemented salary deferrals for some of their salaried workers, and both have said that more detailed cost-reduction plans will be announced soon. 

Their post-pandemic recoveries are likely to happen in rough parallel, too. Because both employ union-represented factory workers in the U.S. and Canada, it's a safe bet that GM and Ford will reopen their factories in North America at about the same time and under similar conditions and limitations, because the unions will have to agree to the plans. 

There's one big difference, though: Ford has suspended its dividend for the time being, while GM hasn't. How much does that matter?

It's important. But I'm not sure it's super-important, for two reasons: First, GM could still suspend its dividend at any time; second, Ford will almost certainly reinstate its dividend as soon as it can. 

If we get to the end of May and GM's factories in North America are still closed, I'll be surprised, and worried, if the company hasn't cut its dividend. 

As for Ford, remember that the company is still controlled by the descendants of founder Henry Ford. As a group, the Ford family tends to take a long-term view of what's right for the company -- but they also like getting the dividend. 

I think it's a safe bet that Ford will reinstate its dividend as soon as CEO Jim Hackett thinks it can do so without risk.

But GM is still paying, and it has the advantage here -- at least for now. 

Is GM or Ford the better buy?

Where does this leave us? We've seen that before the coronavirus outbreak, GM was in better shape than Ford. Both have made similar, and good, moves as the pandemic has unfolded, though GM -- unlike Ford -- has managed to hang on to its dividend for now. And we've seen that both have plenty of new products on the way to help boost their margins once we recover. 

I think that by the standards we use for these kinds of comparisons, GM is the winner here -- but if you want to buy Ford instead, I won't argue. I own both and have no plans to sell.

Here's my real answer: I think if both companies can get through this mess without a trip through bankruptcy court, which seems like a good bet right now, both will reward investors relatively early in the recovery, when auto sales start to rise. Choose your favorite and hold on tight.