For all the talk of a comeback for big tech shares in January, tracking the cash shows the rotation into riskier names not only continued—it got stronger.

Billions of dollars fled exchange-traded funds focused on growth, quality and low-volatility stocks, creating the worst month of flows on record for smart-beta products focused on these segments. At the same time ETFs tracking value—equities that appear cheap—notched the second-best inflows ever.

Broad-based funds bled cash. The SPDR S&P 500 ETF Trust (ticker SPY) lost roughly $11.8 billion in the fund’s biggest monthly drawdown in almost a year. Over $4 billion was pulled from the tech-heavy Invesco QQQ Trust Series 1 (ticker QQQ), the largest monthly outflow since 2014.

By contrast, the iShares MSCI EAFE Value ETF (ticker EFV) lured $3.3 billion in January—a record haul—while the Financial Select Sector SPDR Fund (ticker XLF) attracted nearly $4.2 billion in its biggest monthly inflow since 2016.

The divergence shows macroeconomic optimism abounds among stock traders. While megacap tech names were all the rage at the height of the pandemic last year as investors leaned into the stay-at-home economy, small cap and value shares are now looking like the more attractive bet amid optimism on further U.S. fiscal aid and an economic reopening as vaccine distribution picks up.

“Investors are continuing to reallocate their portfolios to small caps and value within equities,” said Chris Zaccarelli, the chief investment officer at Independent Advisor Alliance. “As the economy continues to reopen and the virus’ impact on consumer behavior becomes less and less, those companies that have underperformed economically will revert to the mean or possibly outperform.”

The S&P 500 Index dropped 1.1% in January, while the tech-heavy Nasdaq 100 managed a gain of 0.3%. Meanwhile, the small-cap Russell 2000 climbed 5%, following big gains in December and November, when a flurry of coronavirus vaccine breakthroughs first kicked off the rotation trade.

Those performance figures and the magnitude of money on the move are a reminder that while the retail trading frenzy that enveloped GameStop Corp. and other heavily-shorted stocks last week absorbs attention, the rotation into the less-loved areas of the market is gaining steam.

But in some ways, the Reddit drama and the hunt for the market’s most-hated shares may be helping fuel the rotation trade, according to Wells Fargo Investment Institute’s Sameer Samana.

“The rotation is still underway and the retail participation is focused mainly on the areas that have been left behind,” said Samana, senior global market strategist at the firm. “Those laggards tend to have lower stock prices, tend to be cheaper, and have lower float, all of which seems to be attracting the interest of social media.”

With assistance from Vildana Hajric.

This article was provided by Bloomberg News.