France’s far-right National Front (FN) movement has never seemed closer to power. In first-round polling, Marine Le Pen, the party’s leader, is now comfortably ahead of her likeliest rivals, Emmanuel Macron and François Fillon. Mr Fillon is embroiled in scandal over payments to his wife and children for what critics call fictitious work. And Mr Macron’s description of French colonial stewardship over Algeria as a “crime against humanity” while visiting the North African country did not do him wonders at the polls. Still, those hoping for a Madame Présidente come May should not uncork the champagne just yet.

To assess Ms Le Pen’s chance of victory, The Economist has compiled current and historic French presidential polls, and used them to build a statistical prediction model. We find that if the first round were held today, Ms Le Pen would receive 26.1% of the vote. The runners-up, jostling for a place in the runoff, would be Mr Macron at 20% and Mr Fillon at 19.5%.

There is uncertainty in every projection, and Ms Le Pen’s current lead is no guarantee that she will finish first. But this uncertainty can itself be measured, taking into account the historic polling error in France, the pattern of vote-trading between each pair of candidates and published hypothetical runoff polls. Based on this data, we ran 10,000 computer simulations of the election and counted how often each candidate won.

The results are quite favourable to the FN—for the first round. Ms Le Pen wins a place in the runoff in 93% of our simulations, usually facing off against Mr Macron or Mr Fillon—though Benoît Hamon, the unexpectedly exciting Socialist candidate, occasionally manages to sneak in.

However, far more difficult terrain awaits the would-be populist president in the second round. Voters of every political allegiance are telling pollsters they would band together to stymie her bid, much as they did when Ms Le Pen’s father, Jean-Marie Le Pen, reached the 2002 run-off. Surveys of head-to-head voting intentions against her likeliest opponents suggest she would need to surmount daunting deficits—15 percentage points if she faces Mr Fillon, and a thumping 21 points versus Mr Macron. If run-off polling remains as reliable as it has been in previous French elections, Ms Le Pen’s implied chances of becoming president rest under 5%.

After betting markets were surprised by the Brexit vote and the unexpected victory of Donald Trump, punters are playing Ms Le Pen’s odds cautiously, putting them anywhere between 28-43% (the wide gap in price between different markets represents manna for arbitrageurs). They may be trying to price in “unknown unknowns” not reflected in the polls—the chance of another terrorist attack, a second bout of scandal for Mr Fillon or even the timely release of hacked information.

People often think brief streaks of improbable events are likely to continue into the future, and gamblers can be particularly prone to this instinct. Following the unexpected successes of anti-globalisation forces in 2016, a victory for Ms Le Pen might seem inevitable. However, polls for both of those votes showed a far tighter race than surveys of this year’s French run-off do. The FN’s history is replete with hopes dashed at the last minute, as shown both by the defeat of Ms Le Pen’s father and by the party’s disappointing performance in regional elections in 2015. Disappointingly for the FN, history may repeat itself yet again.