The economic mood in the United States has changed quickly over the past six months. At the end of last year, the stock market suffered a steep decline, consumer spending tanked, and economists were forecasting a recession around the corner.

Now it’s May, and by most measures, the country is back on an even keel. So why did the dark cloud pass so quickly?

Increasingly, economy watchers wonder whether uncertainty and pessimism — captured in a number of regularly released surveys that tend to be grouped under the squishy term “sentiment” — might be driving economic performance more than it used to do.

On Wednesday, Richmond Federal Reserve president Tom Barkin delivered a speech advancing this theory, noting the shock to business confidence brought on earlier this year by factors like the government shutdown and a simmering trade war. The risk: Consumers could delay big purchases and businesses could cancel expansion plans, creating a spiral that the economy couldn’t self-correct.

Assessing health, wealth of US economy: Forget recession, at least for now

“We could talk ourselves into a recession,” Barkin said. “Some economists have studied the spread of information from a disease perspective, where the information spreads slowly at first but quickly gains steam. I would argue that in today’s media climate, the ‘disease’ spreads faster.”

The economic jitters from late 2018 didn’t end up snowballing into a downturn this time, thanks in part to help from the Federal Reserve’s shift toward patience on raising interest rates. But Barkin worries that weak expectations could become a self-fulfilling prophecy down the line.

Execs believe recession to strike in late 2020, Duke survey finds

The economy is more subject to variations in sentiment now, Barkin said, because both businesses and consumers are getting nervous after a recovery that will soon become the longest on record, and smartphones allow everyone to absorb every piece of economic news several times a day.

Oxford Economics chief US economist Greg Daco and University of Oregon economics professor Tim Duy have also warned of a “recession bias” among stock analysts, which could tip the US economy from stable into a downward slide even when the fundamentals like job creation and wage growth remain basically sound.