With the US presidential primaries under way, everyone is wondering whether President Donald Trump will be re-elected in November. Opinion polls show that the ability to beat Trump ranks high among Democratic primary voters’ top priorities. Following Trump’s acquittal in the Senate on impeachment charges and a State of the Union address in which he could tout America’s strengths – first and foremost, the economy – the president’s approval rating, at 49%, is the highest since he took office.

But Trump has reason for concern. The acquittal may offer merely a transitory bump, and his approval rating should be much higher than it is, given the state of the economy.

Consider the precedent of President George HW Bush, whose approval rating rose to 91% following the first Gulf war, which had received congressional approval, succeeded in expelling Saddam Hussein’s Iraqi forces from Kuwait, and was partly paid for by America’s allies (including Saudi Arabia, the United Arab Emirates, Germany and Japan). In an Oval Office meeting at the time, I tried to persuade the president’s political team that, despite his recent successes, he needed a better strategy for responding to a mild recession that had begun in the latter part of 1990. I reminded them that even Britain’s victory in the second world war had not spared Winston Churchill defeat in an election held less than three months later.

In the event, Bush, anticipating that massive Democratic majorities in both houses of Congress would block any legislation he proposed, decided to postpone a bolder economic agenda until after the election. He hoped that a Republican revival would improve its chances in Congress. But, owing to a slow recovery and Ross Perot’s third-party candidacy, Bush was defeated by Bill Clinton.

For his part, Trump has escaped most of the blame for presiding over large budget deficits. But that is because the Democrats’ proposals would blow up the deficit even more. At the same time, Trump can tout a historically low unemployment rate, including among minorities, as well as solid wage gains, which have been strongest at lower income levels.

Trump can also point to trade deals such as the US-Mexico-Canada agreement, which will offset some of the damage from his tariffs. He has secured funding to rebuild the military and appointed two conservative supreme court justices and many more federal district and appeals court judges. And he has signed bipartisan criminal justice reform legislation and a major tax-reform package, as well as rolled back some of the excessive regulations of the Obama era.

Political prediction models, based largely on economic conditions, suggest that Trump should win easily in November, as do betting markets, which give him a 60% chance – an increase since the pre-impeachment period. Trump’s problem, of course, is that he consistently steps on his own good news with his daily Twitter attacks, which have turned off some of the voters he needs.

Meanwhile, the leading Democratic contenders to have emerged are US senator Bernie Sanders of Vermont and former New York City mayor Michael Bloomberg. National polls suggest that any of the Democrats currently running would beat Trump. But those predictions could be misleading, because they do not account for Trump’s outperformance among actual voters in the states that he needs to win the electoral college.

The biggest threat to Trump, then, is an economic downturn that reverses the recent job and wage gains and triggers a stock market selloff; but forecasters see low odds for this scenario. Another issue will be the mood among voters in eight to 10 swing states. Trump remains a sharply polarising figure, and a re-election bid is a referendum on the incumbent.

Some of the states that carried Trump in 2016 swung to the Democrats in the 2018 midterm congressional elections. Trump narrowly won Pennsylvania, Michigan, Wisconsin and Arizona in 2016, but he just narrowly lost in Minnesota and New Hampshire. Florida and Ohio, usually the most important swing states, are currently leaning his way, and a few other states that he previously won or lost by three to five points could conceivably come in to play.

Meanwhile, Bloomberg has already spent hundreds of millions of dollars on advertising – more than all the other candidates combined – and is willing to spend $1bn to defeat Trump, even if he does not secure the Democratic nomination. If the Democrats are united and encourage strong turnout, especially among minorities and younger voters, they could win.

After complaints from the Sanders campaign that party rules unfairly favoured Hillary Clinton in the 2016 primary contest, Democratic convention delegates will now be awarded proportionally to all candidates who receive at least 15% of the vote in a given state. Ironically, this means that Sanders may reach the summer convention in Milwaukee, Wisconsin, with a plurality but not the majority needed for nomination.

In that case, party officials, chosen without regard to primary results, will vote on a second ballot. Overall, more Democrats associate with the centre-left than with the far-left. But if they come together to nominate a more moderate candidate, they risk alienating Sanders’s base, whose failure to turn out in November would tip the scales to Trump. Republicans, meanwhile, remain united behind Trump following his impeachment, which enraged his base and which most moderates viewed as unnecessary overreach.

As of now, Bloomberg is untested, Sanders’s odds are lower than they would be in the event of widespread economic distress, and Trump remains both his own best advocate and worst enemy. The outcome might come down to whether the 10-15% of persuadable voters in swing states – most of whom are satisfied with the condition of the country, the economy and their personal finances – decide that they can tolerate another four years of Trump’s tweet storms. Or, they might not “vote their pocketbooks”. They could decide that enough is enough, and accept a leftward policy lurch in exchange for a leader who forgoes the Twitter attacks.

• Michael J Boskin is a professor of economics at Stanford University and a senior fellow at the Hoover Institution

© Project Syndicate