One thing that attracts people to Boris Johnson is his cheerfulness about Britain’s prospects. Telegraph columnist Liam Halligan and Conservative MP Owen Paterson both praise his “sunny optimism”, while Johnson’s former flatmate Matthew Leeming writes — I kid ye not — that “we need a cheerleader to remind us we are an erect and manly people.” But I wonder: is there a class aspect here?

I ask because of a recent paper by Erin McGuire of the National Bureau of Economic Research. She shows that: “Individuals who begin their lives by observing an economic downturn remain pessimistic and risk averse with respect to investments over the course of their lifetimes.”

This corroborates work by Ulrike Malmendier and Stefan Nagel and by Miguel Ampudia and Michael Ehrmann. And it’s consistent with research by Henrik Cronqvist, of the University of Miami, and colleagues. They show that people who grew up in poorer homes, or who entered the labour market during a recession, tend to avoid growth stocks even years later.

Much the same might also be true for attitudes to unemployment. Memories of the Great Depression suppressed wage militancy in the 1950s, just as memories of the 2008 financial crisis might have caused millennials to be timid today. Wolfgang Maennig and Markus Wilhelm have shown that spells of unemployment depress well-being even after people return to work, perhaps by inducing the fear that it could happen again.

All this suggests that hard times in our formative years make us pessimistic long after those times have passed. Which is where class comes in. Being posh insulates you somewhat from hard times, thus making you more optimistic than the rest of us. Johnson and I are both of an age to have spent our formative years during a time of soaring unemployment. But whereas I saw it close up, Mr J. did so from a safer distance. It is perhaps therefore no accident that he has a “sunny optimism” and I, well, don’t.

The mechanism here was described by David Hume. Our lived experience creates impressions which enter our minds “with most force and violence”, whereas reports are only “faint impressions” of these. Those who have experienced poverty or unemployment, or seen them close up, have therefore a greater fear of it than those who only saw them from a distance, if that.

What I’m describing here is a little different from the tendency for posh people to be more confident than the rest of us, but perhaps connected. My point is that posh folk are more optimistic than others, not just about their personal prospects, but about prospects for the economy generally. Of course, you can think of counter-examples to this — of posh but melancholic people (singer-songwriter Townes Van Zandt?) — but I suspect there is a tendency here. This fits with the fact that leading Brexiteers such as Jacob Rees-Mogg and Nigel Farage, as well as Johnson, come disproportionately from comfortable backgrounds.

Of course optimism is sometimes justified. But this isn’t my point. My point is merely that our attitudes and preferences are not “given” as simplistic neoclassical economics often pretends. They are instead endogenous, shaped by, among other things, culture, gender, history, press pressure and — yes — class.