The bad news in the bond market has been a rare boon for stocks.

Investors pulled nearly $160 billion from money-market funds and $17.5 billion from bond mutual funds and exchange-traded funds in the first seven weeks of the year, according to Refinitiv Lipper. The exodus is already on pace to be the biggest in at least seven years.

About...

The bad news in the bond market has been a rare boon for stocks.

Investors pulled nearly $160 billion from money-market funds and $17.5 billion from bond mutual funds and exchange-traded funds in the first seven weeks of the year, according to Refinitiv Lipper. The exodus is already on pace to be the biggest in at least seven years.

About $50 billion was funneled into stock funds over that period, including nearly $21 billion so far this month.

SHARE YOUR THOUGHTS

What strategies are you using to address stock market volatility? Join the conversation below.

The massive reshuffling of assets comes in the midst of a changing economic and monetary landscape. Worries about surging inflation and the Federal Reserve’s plan to begin raising interest rates as soon as next month have put the bond and stock markets under pressure to start the year.

The yield on the 10-year Treasury note eclipsed 2% earlier this month for the first time since mid-2019, and the S&P 500 is down 8.8% in 2022, including last week’s 1.6% drop.

Investors typically use money-market funds as a relatively safe place to park cash. Now that inflation has returned, their purchasing power is sapped.

“There’s not a whole lot of options for people,” said Jonathan Waite, a senior investment analyst at Frost Investment Advisors. He said he summed up the situation at a recent team meeting on the macroeconomic backdrop with a well-worn four-letter acronym: “TINA. There is no alternative” to stocks.

In other words, even as the stock market struggles to gain momentum, investors have few other attractive choices to put their cash to work, he and other analysts said.

This week, investors will look at a fresh batch of economic data, including measures of consumer confidence, new home sales and personal-consumption expenditures, to assess the market’s trajectory. Markets are closed Monday for Presidents Day.

To be sure, investor sentiment has deteriorated in recent weeks. The share of individuals who say they expect U.S. stocks to rise over the next six months fell to about 19%, its lowest level since 2016, according to the latest survey by the American Association of Individual Investors.

Analysts warn that the tumult will continue as long as investors feel uncertain about the course of geopolitical events in Ukraine and the outlook for monetary policy. That is partly why Goldman Sachs last week trimmed its outlook for the S&P 500, cutting its year-end forecast to 4900 from 5100. The new target represents a 12% gain from current levels.

So far, some investors have shown a willingness to buy the dip in the stock market, softening the pullback. Some $18 billion has flowed into the Vanguard S&P 500 ETF so far this year, along with about $11 billion into a similar fund run by BlackRock’s iShares unit, according to data from FactSet.

When stock prices sell off like they have so far in 2022, investors typically buy bonds to help stabilize portfolios and reduce losses. But right now, bond prices are falling too, leaving investors with nowhere to hide. WSJ's Dion Rabouin explains. Photo: Brendan McDermid/Reuters The Wall Street Journal Interactive Edition

Beyond that, investors appear to be more discerning. They are favoring relatively inexpensive value stocks and those that pay dividends, over pricier shares of fast-growing companies. Value stocks are those that trade at low multiples of their book value, or net worth, whereas growth stocks tend to command heftier multiples based on the prospects of big profits in the future.

Large-cap value funds have pulled in $5.2 billion over the past seven weeks, already more than half of the amount they raised last year, while those focused on dividend strategies have added $13.2 billion, according to Refinitiv Lipper. Meanwhile, large-cap growth funds have lost $18 billion.

David Groman, a global equity strategist at Citi,

says he predicts investors will continue to favor stocks, especially those that fit the traditional definition of value, as long as the valuation gap between growth and value remains as vast as it is. His latest analysis showed value stocks’ forward-looking price-to-earnings ratios trailing growth by as much as 40%.

“The gap is so, so wide,” Mr. Groman said. “We could be just scratching the surface of a rotation into value.”

Calls for a resurgence in value investing are hardly new following more than a decade of dominance by growth stocks. Any outperformance of traditional value sectors like banks, energy firms and manufacturers has tended to be short-lived.

Julian Koski, chief investment officer of asset-management firm New Age Alpha, believes value’s latest comeback is set for a similar fate.

He said he is bearish on value stocks because the valuations of banks and other relatively cheap stocks have already crept up and solid earnings growth will be required to justify higher multiples. At the same time, valuations of growth stocks continue to fall and will eventually be hard to pass up, especially if the economy ends up weakening under the weight of higher rates and inflation, he added.

Indeed, the forward-looking P/E ratio of banks in the S&P 500 has risen this year to nearly 14, above the sector’s five-year average of 13.3, according to FactSet. Communication-services stocks in the benchmark stand at 18.8 times, roughly the same level those companies traded at in late 2019. The latter sector is home to the parent companies of Facebook and Google, among other firms like Walt Disney Co. and AT&T Inc.

“When earnings season comes around and value stocks miss their numbers, they are going to get hit hard,” Mr. Koski said, adding that the pullback in growth stocks will “make it easier for companies to deliver the growth implied in their prices.”

Earnings forecasts support that possibility. Financial companies in the S&P 500 are expected to see earnings shrink 11% in 2022, whereas profits among communication-services companies are predicted to grow 2.6%.

Regardless of how investors divvy up their dollars among stocks, several analysts said the bonds market is in for a rough ride that could put its multidecade bull run on hold. The recent outflows mark a stark reversal from recent years. In each of the past three years, investors added hundreds of billions of dollars to bond funds, with flows peaking at $457.6 billion in 2021.

Now, Deutsche Bank analysts compare the environment with 2013, when a large increase in rates around the taper tantrum led to more than $300 billion flowing into stock funds in the following 12 months and bond funds suffered outflows.

“Far from being an anomaly, this rotation is very much in line with the historical pattern,” Deutsche Bank’s analysts said.

Write to Michael Wursthorn at Michael.Wursthorn@wsj.com