President Trump claims he’s responsible for the “best economy in our country’s history.” Democratic presidential front-runner Joe Biden argues Trump lucked out by inheriting a strong economy from the “Obama-Biden administration.”

Who’s right? Did President Obama set the stage for the strong Trump economy? Or has Trump juiced the economy in ways Obama never did?

Since this debate is likely to intensify throughout the 2020 presidential campaign, Yahoo Finance ran the numbers—and we’ll settle the dispute.

Context matters. A deep recession began 13 months before Obama took office in January 2009. It officially ended in May 2009, but the unemployment rate didn’t peak until five months later. Obama started in a hole, and weak jobs, earnings and GDP data for his first term clearly reflect that.

Obama’s second term was notably better, as the economic recovery picked up steam. It strengthened further as Trump took office in 2017. Trump has done two new things that impact the economy: sign a large tax cut into law, and cut regulations. Those boosted growth in 2018, the first year the tax cuts were in effect, but the long-term impact is unclear.

Here are the numbers showing how Obama and Trump compare:

View photos Graphic by David Foster for Yahoo Finance More

Anybody looking for a clear winner won’t find one. Monthly job growth during Obama’s second term was higher than it has been under Trump, and the stock market performed better in both of Obama’s terms. But earnings, GDP growth and manufacturing employment have been better under Trump. Is it a draw?

Maybe. But what the data really show is the economy recovering from a sharp downturn regardless of presidential policies. Job growth went from negative to slightly positive during Obama’s first term, as widespread layoffs abated and companies started hiring again. Since 2011, the pace of job growth has been consistently upward, with little change in the transition from Obama to Trump.

Earnings and GDP growth improved along the way, and Americans, naturally, began to feel better off as job security improved and the unemployed went back to work. Stocks performed well under Obama in large part because a 57% crash in stock values ended two months after he took office. The ensuing bull market, now in its 11th year, transcends both presidencies.

View photos How President Trump's and Obama's economies compare (AP Foto/Andrew Harnik) More

Fiscal and monetary policy under both presidents has mattered. But the spending stimulus and aggressive monetary policy of Obama’s first term probably would have happened under any president faced with the same circumstances. Trump has complained that Obama benefited from Federal Reserve rate-cutting, while he’s had to contend with rate hiking. But that’s because the Fed was trying to repair a wrecked housing market, a massive loss of financial wealth and the worst unemployment since the 1930s. By the time Trump took office, those problems were essentially fixed, clearing the way for a normal path of modest rate hikes.

The problems of each presidency

The right way to compare the Obama and Trump economies is to evaluate each president’s solutions to the unique problems of their presidency. Obama had to prevent a depression and get a recovery on track. It took longer than anybody wanted, but he succeeded in that, which the numbers from his second term clearly show.