"It feels just like Brexit day to me," said Nigel Farage, while Donald Trump predicted: "It's gonna be Brexit plus, plus, plus." At one level, this is simply descriptive of the shock political analysts felt following the surprise results of the UK referendum and the presidential election. And in both cases the vote was clearly a rejection of the consensus view of the political establishment. But it obviously goes deeper than that. So to what extent is it really meaningful to draw analogies between two different elections in two very different countries; and what, if anything, does the comparison tell us about what happens next, particularly for the global economy?

Since the UK referendum, there has been a lively debate about the extent to which the result was driven by immigration. Immigration was indeed a central issue in the campaign, and there is some evidence that at least some areas which have seen rapid growth in migrant populations saw large votes to Leave. But other explanations are available; Leave was particularly strong in areas which suffered most from the decline of manufacturing industry in the 1980s, long before the recent rise in immigration. One analysis suggested that one of the strongest predictors of a Leave vote at a local level was the degree to which the economy was exposed to competition from Chinese imports.

And a similar debate will surely ensue on Trump's victory. As with Leave, immigration and indeed nativism were central to his campaign. But the key surprise victories in swing states came not in areas where immigration is the biggest issue, but rather in the Midwest "rustbelt" states where well-paying manufacturing jobs have been shrinking for decades.

So one popular thesis is that in both countries those who have been "left behind" by globalisation have chosen to reject its political manifestations: the EU and the political establishment which supports it in the UK, and the Clinton dynasty and the political centre in the US. But what this economic perspective ignores is that in neither the US nor the UK are the losers from globalisation anything like a majority. True, some of the largest Leave majorities were in depressed northern areas, like Middlesbrough or Barnsley; but Leave also won in much of the prosperous south-east, in areas like Aylesbury and Chichester, and it did far better with Conservative than Labour voters. Similarly, in the US, the evidence suggests that Clinton voters are if anything poorer than Trump ones.

But this does not mean that globalisation – or at least its perceived manifestations – was not the main factor. In fact, the key common denominator in both campaigns appears to be their success in putting together a coalition; of those who perceive themselves to have been disadvantaged (at least relatively) in economic terms, and those who don't like the broader social and cultural direction of Western society. In the UK, about 70% of those who thought "multiculturalism" and "social liberalism" were forces for good voted Remain; about 80% of those who thought the opposite voted Leave. We don't have the data yet, but I would be astonished not to find a similar divide in the US.

The key common denominator in both campaigns appears to be their success in putting together a coalition; of those who perceive themselves to have been disadvantaged in economic terms, and those who don't like the broader social and cultural direction of Western society

So what does this mean for economic policy in both countries – and indeed globally? It is difficult not to see Trump's victory, like Brexit, as a defeat for economic liberalism; a turn away from free trade, open markets and a broadly positive attitude to migration. The difference is that Trump's rejection of free trade and free markets is far more explicit than that of the Leave campaign.

And the effects are likely to be much more profound. The UK is still a major economy, but UK developments have a relatively limited global impact, as the behaviour of global markets since Brexit shows. The economic impact of Brexit will be felt mostly in the UK and to a lesser extent elsewhere in Europe; and will in any case take many years to materialise. The US, by contrast, is still the largest and most important economy in the world.

Donald Trump
Republican president-elect Donald Trump delivers his acceptance speech during his election night event at the New York Hilton Midtown in the early morning hours of November 9, 2016 in New York City. Getty Images

However, for what it's worth, I think (or at least hope) that those economists who are predicting that Trump's election will trigger an immediate global recession may be too pessimistic. One lesson from Brexit is that financial markets may overreact to political developments, and that "uncertainty" in the general sense is less economically damaging than one might think. In practice, while businesses and consumers certainly don't like uncertainty, they tend nevertheless just to carry on. So we may find that little changes over the next few months.

But over the medium term the potential downsides are huge. For the reasons set out above, the political expectations raised by Trump's election will be huge; and, once he takes office, there will be substantial pressure on him to deliver meaningful change. Trump could – if he chooses – take rapid unilateral actions (for example, raising tariffs on imports from China or Mexico) that would have an immediate and damaging impact on the global economy. Trump can't sack Janet Yellen, the chair of the Federal Reserve, but it would not be hard for him to make her position untenable. Changes to tax or budget policy will need to go through Congress; but Republicans control both houses. Large tax cuts, especially for the wealthy, and major changes to Obamacare seem inevitable. It's going to be a very bumpy ride, not just for the US, but for the world.

Jonathan Portes is Senior Fellow of the UK in a Changing Europe. His new book, "Capitalism: 50 things you need to know" is published by Quercus.