Markets appear to have got the pandemic right. A plummet in shares as economies locked down gave way to a robust rally: investors trusted in a mix of vaccines, corporate adaptation and central bank stimulus. Mass vaccination programmes in the US and Europe are under way and in countries where they are most advanced like Israel and the UK, economies have unlocked and customers have come flooding back to shops and restaurants.

The virus takes advantage of our social natures to spread but markets had a different, equally human, trait in mind: ingenuity. That includes tech companies whose shares have been among the big winners as they kept businesses operating during lockdowns and new business models allowed shoppers to keep spending. Others too, have adapted, and lockdowns have become less damaging.

Even more important has been pharmaceutical innovation. Researching and developing vaccines has, likely, had among the greatest returns on investment of any human activity. As production accelerates, the need to lock down, with its attendant economic costs, retreats. The next challenge — political rather than scientific — is to ensure a sufficient share make their way to poor countries.

With little experience of pandemics, policymakers looked to the financial crisis. Fresh memories of what was in many countries a “lost decade” of meagre improvements in living standards, spurred central banks and governments to open the floodgates. The unprecedented monetary and fiscal stimulus has been notable for its speed as well as its size compared to the response in 2008, reducing long term damage: America’s vast spending, in particular, has added fuel to the rally and stimulus cheques have allowed retail investors to participate.

Claiming victory would be a mistake. The pandemic has been a story of reversals and countries that once looked to have the virus under control finding themselves overwhelmed. That includes, for example, Germany — lauded for its early response but struggling with a third wave — or eastern Europe, initially less affected than elsewhere but now among the most badly hit regions. Other countries which have reopened in the past had to swiftly lock down again as new waves spread.

In 2009, the main US index rose 66 per cent in the 12 months after the trough but it took far longer, and successive crises in the eurozone, before economies would fully recover. Investors who got into the rally early were unlikely to regret it: cheap money helped power a decade-long bull market. This time the rebound has been similar as investors have learnt there is little to be gained from standing in the way of quantitative easing.

The big question remains the outlook for inflation. With little sign of economies returning to capacity after the financial crisis central banks kept rates low and asset purchases high, flooding the financial system with liquidity. A stronger recovery from the pandemic, thanks to a mix of government stimulus and households spending accumulated savings could see prices and wages start to creep up again — central banks may start to withdraw support too. The pandemic has also disrupted supply chains raising price pressures further.

Record first-quarter growth in China, where the recovery is more advanced, has already shifted the focus to “overheating” and the prospect of rate rises. An end to the persistent “lowflation” of the decade after the financial crisis would be a far better outcome for the whole world but it might mean markets have got ahead of themselves.