“Democrats need to be on high alert. If history is any guide and we get typical turnout, they are going to lose,” said Mark Zandi, chief economist at Moody’s Analytics and lead architect of the model. “They need to be at DEFCON 1 or it’s likely Trump will be reelected.”

The model, which Moody’s plans to present to clients this week, called every election since 1980 correctly until missing in 2016 and predicting Hillary Clinton would defeat Trump.

In response to the miss, Moody’s expanded the range of potential voter turnout and made several other changes to how it assesses voter reaction to economic conditions. If applied now, Moody’s says the altered models would have called 2016 for Trump.

Another Moody’s model, focused mainly on the stock market, finds Trump would win with 298 electoral votes. A third, which focuses on state-specific unemployment rates, finds Trump would win with 332 electoral votes. In an average of its three models, Trump would also win with 332 electoral votes to 206 for the Democratic nominee.

But despite all this, Trump is far from a lock.

The key for Democrats to overcome Trump’s advantages on the economy: generating massive turnout. And high turnout in the 2018 midterms — coupled with strong enthusiasm among Democrats to oust Trump — suggest that voting in 2020 could hit historic highs.

Moody’s found that if turnout among non-incumbent voters — Democrats and independents — were to match historical highs, the Democratic nominee would win under the stock market and employment models as well as an average of the three models.

And plenty could still change between now and next November that would move state-level economic models away from Trump, especially in the critical states of Pennsylvania, Michigan and Wisconsin.

Further trade war damage hitting employment in those states would be the biggest risk for Trump, which could help explain why Trump appears eager to at least call a truce in his bruising trade battle with China.

The economy is already slowing this year with growth expected to hit only around 2 percent, well below Trump’s promises of robust growth of 3 percent or more every year. Job creation has also slowed to 157,000 per month over the last three months from over 200,000 per month last year. And the impact of tariffs has hit particularly hard in industrial states key to Trump’s reelection. Manufacturing has declined in each of the last two months and further deterioration could shift economic models away from Trump.

“Pennsylvania is particularly critical, and it comes down to just a handful of counties,” said Zandi. “The stock market also matters a lot. If you get a 10 percent correction in stock prices, the picture changes dramatically and Democrats win under a typical turnout scenario.”

Moody’s also does not attempt to account for the personal characteristics of candidates, relying instead on typical voter behavior for generic nominees of either party. And Trump is about as far from a generic candidate as it is possible to be.

“It could be that this election may be so out of bounds with history that the models just aren’t going to work,” said Zandi. “It could turn out this thing runs on a dynamic you just can’t model.”