The megacap safety trade that has ruled stocks for months is slowly giving way to a broader embrace of risk among investors captivated by tentative signs of a turn in the economy.

Small-cap stocks are back in vogue for hedge funds. ETFs tracking economically sensitive sectors are seeing large cash infusions. And investors are bailing from groups that have held up, among them health care.

The positioning is a lens into broader market psychology, with everyone from tiny retail investors to institutions scrambling to get in front of economic data they’re increasingly convinced show the economy has bottomed. A data dashboard tracked by Bloomberg News is showing stabilization or slight improvements in mortgage applications, airline trips and filings for jobless benefits.

“That’s where the opportunity is because those are the parts of the market that haven’t participated as much,” said David Spika, president of GuideStone Capital Management, which has about $12.5 billion under management. “The fear of missing out is definitely a big factor in this.”

While economic data is still awful by any historical comparison, among investors, a consensus is clearly building that the worst is over. The positioning explains days like Monday, when the S&P 500 jumped 1.9% and an index of small caps rose 3.2%. With big groups like tech and health care holding steady, gains in more speculative categories are fueling a second leg of the recovery rally that has restored $6 trillion to share values since the March bottom.

Even the performance of major benchmarks highlights the shift, with the Dow Jones Industrial Average, whose venerable Old Economy names have been a major drag on its returns, handily beating the S&P 500 and Nasdaq 100 on Monday. The Russell 2000 index of small-fry stocks is beating the S&P 500 by more than 3 percentage points this month, the most since May 2018.