‘We have fallen upon evil times, politics is corrupt and the social fabric is fraying.’ Who said that? Donald Trump or Bernie Sanders? Nigel Farage or Marine Le Pen? It’s difficult to keep track. They sound so alike, the populists of the left and the right. Everything is awful, so bring on the scapegoats and the knights on white horses.

Pessimism resonates. A YouGov poll found that just 5 per cent of Britons think that the world, all things considered, is getting better. You would think that the chronically cheerful Americans might be more optimistic — well, yes, 6 per cent of them think that the world is improving. More Americans believe in astrology and reincarnation than in progress.

Johan Norberg and Fraser Nelson discuss the doom delusion:

If you think that there has never been a better time to be alive — that humanity has never been safer, healthier, more prosperous or less unequal — then you’re in the minority. But that is what the evidence incontrovertibly shows. Poverty, malnutrition, illiteracy, child labour and infant mortality are falling faster than at any other time in human history. The risk of being caught up in a war, subjected to a dictatorship or of dying in a natural disaster is smaller than ever. The golden age is now.

We’re hardwired not to believe this. We’ve evolved to be suspicious and fretful: fear and worry are tools for survival. The hunters and gatherers who survived sudden storms and predators were the ones who had a tendency to scan the horizon for new threats, rather than sit back and enjoy the view. They passed their stress genes on to us. That is why we find stories about things going wrong far more interesting than stories about things going right. It’s why bad news sells, and newspapers are full of it.

Books that say the world is doomed sell rather well, too. I have just attempted the opposite. I’ve written a book called Progress, about humanity’s triumphs. It is written partly as a warning: when we don’t see the progress we have made, we begin to search for scapegoats for the problems that remain. Sometimes, in the past and perhaps today, we have been too quick to try our luck with demagogues who offer simple solutions to make our nations great again — whether by nationalising the economy, blocking imports or throwing out immigrants. If we think we don’t have anything to lose in doing so, it’s because our memories are faulty.

Look at 1828, when The Spectator was first published. Most people in Britain then lived in what is now regarded as extreme poverty. Life was nasty (people still threw their waste out of the window), brutish (corpses were still displayed on gibbets) and short (30 years on average). But even then things had been improving. The first iteration of The Spectator, in 1711, was published in a Britain whose people subsisted on average on fewer calories than the average child gets today in sub-Saharan Africa.

Karl Marx thought that capitalism inevitably made the rich richer and the poor poorer. By the time Marx died, however, the average Englishman was three times richer than at the time of his birth 65 years earlier — never before had the population experienced anything like it.

Fast forward to 1981. Then, almost nine in ten Chinese lived in extreme poverty; now just one in ten do. Then, just half of the world’s population had access to safe water. Now, 91 per cent do. On average, that means that 285,000 more people have gained access to safe water every day for the past 25 years.

Global trade has led to an expansion of wealth on a magnitude which is hard to comprehend. During the 25 years since the end of the Cold War, global economic wealth — or GDP per capita — has increased almost as much as it did during the preceding 25,000 years. It’s no coincidence that such growth has occurred alongside a massive expansion of rule by the people for the people. A quarter of a century ago, barely half the world’s countries were democracies. Now, almost two thirds are. To say that freedom is still on the march is an understatement.

Part of our problem is one of success. As we get richer, our tolerance for global poverty diminishes. So we get angrier about injustices. Charities quite rightly wish to raise funds, so they draw our attention to the plight of the world’s poorest. But since the Cold War ended, extreme poverty has decreased from 37 per cent to 9.6 per cent — in single digits for the first time in history.

This has not happened through the destruction of the western middle class. Times have been rough since the financial crisis, yet for all the talk of Americans ‘left behind by globalisation’, median income for low- and middle-income US households has increased by more than 30 per cent since 1970. And this excludes all the things you can’t put a price on, such as advances in medicine, an extra ten years of life expectancy, the internet, mass entertainment, and cleaner air and water.

Speaking of water, Disraeli described the Thames as ‘a Stygian pool reeking with ineffable and intolerable horrors’. As late as 1957, the river was declared biologically dead. Today it is in rude health, with scores of different species of fish. The idea of the environment as a clean canvas being steadily spoilt by humanity is simplistic and wrong. As we become richer, we have become cleaner and greener. The quantity of oil spilt in our oceans has decreased by 99 per cent since 1970. Forests are reappearing, even in emerging countries like India and China. And technology is helping to mitigate the effects of global warming.

Parts of the world are falling to pieces but fewer parts than before. Conflicts always make the headlines, so we assume that our age is plagued by violence. We obsess over new or ongoing fights, such as the horrifying civil war in Syria — but we forget the conflicts that have ended in countries such as Colombia, Sri Lanka, Angola and Chad. We remember recent wars in Afghanistan and Iraq, which have killed around 650,000. But we struggle to recall that two million died in conflicts in those countries in the 1980s. The jihadi terrorist threat is new and frightening — but Islamists kill comparatively few. Europeans run a 30 times bigger risk of being killed by a ‘normal’ murderer — and the European murder rate has halved in just two decades.

In almost every way human beings today lead more prosperous, safer and longer lives — and we have all the data we need to prove it. So why does everybody remain convinced that the world is going to the dogs? Because that is what we pay attention to, as the thoroughbred fretters we are. The psychologists Daniel Kahneman and Amos Tversky have shown that people do not base their assumptions on how frequently something happens, but on how easy it is to recall examples. This ‘availability heuristic’ means that the more memorable an incident is, the more probable we think it is. And what is more memorable than horror? What do you remember best — your neighbour’s story about a decent restaurant which serves excellent lamb stew, or his warning about the place where he was poisoned and threw up all over his boss’s wife?

Bad news now travels a lot faster. Just a few decades ago, you would read that an Asian city with 100,000 people was wiped out in a cyclone on a small notice on page 17. We would never have heard about Burmese serial killers. Now we live in an era with global media and iPhone cameras every-where. Since there is always a natural disaster or a serial murderer somewhere in the world, it will always top the news cycle — giving us the mistaken impression that it is more common than before.

Nostalgia, too, is biological: as we get older, we take on more responsibility and can be prone to looking back on an imagined carefree youth. It is easy to mistake changes in ourselves for changes in the world. Quite often when I ask people about their ideal era, the moment in world history when they think it was the most harmonious and happy, they say it was the era they grew up in. They describe a time before everything became confusing and dangerous, the young became rude, or listened to awful music, or stopped reading books in order to just play Pokémon Go.

The cultural historian Arthur Freeman observed that ‘virtually every culture, past or present, has believed that men and women are not up to the standards of their parents and forebears’. Is it a coincidence that the western world is experiencing this great wave of pessimism at the moment that the baby-boom generation is retiring?

So who did say those words at the start of this article, about how we have ‘fallen upon evil times’? It wasn’t Trump. It wasn’t Farage. A century ago, an American professor found them inscribed on a stone in a museum in Constantinople. He dated them from ancient Chaldea, 3,800 BC.

We've evolved to be suspicious and fretful: fear and worry are tools for survival

Johan Norberg’s Progress: Ten Reasons to Look Forward to the Future is published next week. He also appears on this week’s Spectator podcast: spectator.co.uk/podcast