Pedestrians walk past an American flag displayed outside of the New York Stock Exchange (NYSE) in New York. Michael Nagle | Bloomberg | Getty Images

Risk-averse investors keep pouring money into bonds even though it means they've missed out on a big stock rally and face substantial danger ahead. The market just saw its best August in four years, but again witnessed a large disparity in where money found a home, with the bulk again going to fixed income. That trend continued even though many on Wall Street worry that inflation and rising interest rates will cut into returns. Indeed, domestic stocks have easily outperformed bond funds this year, but that hasn't been reflected in cash deployment. Investors poured just over $19 billion into bond funds for August, compared with a net withdrawal of $1.4 billion for U.S. stock-focused funds, according to data this week from Morningstar.

Over the past year, flows in mutual funds and exchange-traded funds combined have told a disparate story — $293.2 billion has gone into bonds, while just $4.5 billion has found its way into U.S. equities. The S&P 500 has gained 17.4 percent during the 12-month period, and government bond funds tracked by Morningstar have collectively returned less than 1 percent. Morningstar analyst Kevin McDevitt attributes the flow trend to investors looking for "risk reduction." Many investors have been turning to so-called ultra short-term bond ETFs in an effort to brace against higher interest rates. The JPMorgan Ultra-Short Income ETF, for instance, though only on the market for a little over a year, has taken in $2.2 billion of investor cash in 2018 but is barely positive in returns. "Ultrashort funds offer better protection from rising interest rates, while long-government funds have long been one of the best diversifiers for U.S. equities," McDevitt said. "They have often had a negative correlation with U.S. stocks, particularly in equity downturns." Bond funds generally fare poorly in rising rate environments, as prices move opposite yields. Shortening duration is one way of bracing against inflation.