US Treasuries are on course for a record year of inflows as investors chasing some of the highest yields in months pile into cash and bonds, according to Bank of America Corp. strategists.

Cash funds attracted $20.5 billion and investors poured $6.9 billion into bonds in the week through August 9, strategists led by Michael Hartnett wrote in a note, citing data from EPFR Global. Meanwhile, US stocks had their first outflow in three weeks at $1.6 billion.

Flows into Treasuries have reached $127 billion this year, set for an annualized record of $206 billion, BofA said.

The buoyant demand shows how alluring fixed-income markets remain even as the bond rally and economic slowdown many were predicting last year has failed to materialize. The yield on 10-year US Treasuries was trading at around 4.09% on Friday, up from a low of around 3.25% in April, and near a 15-year high touched last year.

“The 10-year benchmark is once again revisiting the top of the range, presenting an opportunity for bond investors focused on longer-run value,” said Steven Major, global head of fixed-income research at HSBC Plc, in a separate note.

Investors are also flocking to money-market funds to capitalize on higher rates as the Federal Reserves keeps pushing up borrowing costs. The total value of money-market funds has climbed to an all-time high.

The Fed began one of the most aggressive tightening cycles in decades last year, bruising bond holders with some of the biggest losses on record. Meanwhile, equity markets have been strong amid resilient corporate earnings, though the S&P 500 rally has stalled over the past two weeks.

Hartnett said the cost of capital, which has risen this year, will not fall without a hard recession, which in turn may hit stocks. The strategist was rightfully bearish last year but his negative outlook on stocks in 2023 is yet to materialize.

--With assistance from Michael Msika and Sagarika Jaisinghani.

This article was provided by Bloomberg News.