(Bloomberg) -- Both stocks and bonds were rocked by outflows this week as investors fear the global economy could contract amid runaway inflation and hawkish central banks.

About $5.8 billion exited global stock funds in the week through June 29, although US equities saw small inflows of about $0.5 billion, Bank of America Corp. said, citing EPFR Global data. Bonds had redemptions of $17 billion, the data show.

Markets have been roiled this year as investors dumped risk assets on worries of a looming recession while inflation remains sticky even as central banks kick off aggressive rate hikes. Stocks and bonds around the world combined have fallen by the most on record, according to Bloomberg data going back to 1990, with more than $8 trillion wiped off the S&P 500 Index alone in its worst first-half performance in over half a century.

An “inflation shock” is now the consensus among investors, strategists led by Michael Hartnett wrote in the note, adding that while expectations of aggressive rate hikes by the Federal Reserve were peaking, inflation expectations were not. Bank of America’s bull and bear indicator remained at “maximum bearish” for a third week in a row.

In real terms, the S&P 500 is now on course for its worst annual returns since 1872, Hartnett said.

Other seemingly bullish strategists broadly expect stocks to at least partially recover in the second half, according to Bloomberg surveys. But the likes of Michael Wilson at Morgan Stanley have warned of more declines until the market finds a bottom. The upcoming earnings season is also going to be crucial for investors to gauge the impact of high prices and weaker consumer sentiment on corporate profits.

By trading style, US large cap and value led inflows, while small caps saw outflows. By sector, health care saw the biggest inflows, while materials, energy and financials had the biggest redemptions.

©2022 Bloomberg L.P.