FiveThirtyEight’s polls-only and polls-plus are now in pretty close agreement: Donald Trump has a 32 percent chance of winning in polls-only and a 33 percent chance in polls-plus. But the polls-plus model has tended to be more favorable to Trump. That’s in large part because it factors in how well the economy is doing, which has historically been a decent predictor of the election.

How does the model judge how well the economy is doing? It calculates an index, which may seem complicated but is actually relatively intuitive. We combine the change over the past year in six measures of economic health — jobs (nonfarm payrolls); manufacturing (industrial production); income (real personal income); spending (personal consumption expenditures); inflation (the consumer price index); and the stock market (S&P 500) — into a single index. Each part of the index is compared to how well the economy was doing by that metric in previous presidential election years to understand whether the economy is strong or weak according to the measure. Then we can contrast the overall index to previous election results to understand what chance the incumbent party has of winning re-election.

So when Hillary Clinton was leading Trump by about 8 percentage points in national polls in mid-August, the polls-plus model saw an average economy, or maybe slightly above average, and so expected the race to tighten (which turned out to be right).

In 2012, FiveThirtyEight’s economic index largely agreed with the polls — both showed President Obama with a small lead over Mitt Romney. This year, however, the polls have generally been better for Clinton than the economy would predict. A forecast based solely on the economic index shows Clinton ahead, but only barely:

Clinton leads in an economy-only forecast by just 1 point. But fundamentals-based forecasts are prone to large errors. (That’s why we use polls.) Moreover, how you measure the economy makes a big difference. In our model, for example, the inflation and stock market metrics point to Clinton’s being a favorite, while income and manufacturing point in the opposite direction. Accordingly, different fundamentals models have varied widely this year.

As the race has tightened over the last couple weeks, it’s come more in line with the fundamentals. Whether that’s because Trump is getting his act together, making this race more like a “normal” election, is hard to say. But the more Trump can make this campaign conform with the fundamentals, the better his chances.