Now, fund investors will be tested.

As stocks continued to hit records through the summer, investors poured money into both stock and bond portfolios. But as the third quarter ended, stocks were pulling back.

In the end, the average U.S.-stock fund fell 1% in the quarter, owing to a 4% drop in September, according to Refinitiv Lipper data....

Now, fund investors will be tested.

As stocks continued to hit records through the summer, investors poured money into both stock and bond portfolios. But as the third quarter ended, stocks were pulling back.

In the end, the average U.S.-stock fund fell 1% in the quarter, owing to a 4% drop in September, according to Refinitiv Lipper data. That trimmed the year-to-date advance to 14.5%.

International-stock funds were down 1.8% in the quarter, after being down 3.8% in September, to leave their year-to-date gain at 7.1%.

Fund-flow data shows that investors have been putting only modest faith in continued gains for U.S. stocks, while staying heavily invested in the comfort of bonds. Investors put a net $8.9 billion into U.S.-stock mutual funds and exchange-traded funds in the quarter, and $59.0 billion into international-stock funds, based on Investment Company Institute estimates. But they continued to invest even more—a net $129.1 billion in the quarter—in bond funds.

As the economy recovers from the pandemic and lockdowns, the Federal Reserve has signaled it might reverse its stimulus efforts and raise interest rates next year.

“Most fixed-income investors are not sure how to prepare for the end of a 40-year bull market in bonds,” said Tom Roseen, head of research services at Refinitiv Lipper, in a recent report. “Until recently bond investors have benefited from declines in interest rates and low relative inflation, leading to both capital gains and income distributions contributing to total returns for bond funds. And that is possibly on the verge of change.”

Bond funds tied to intermediate-maturity, investment-grade debt (the most common type of fixed-income fund) rose a tiny 0.01% in the quarter to leave them with a 1.1% decline so far this year.

No fund category had a robust third quarter. Financial-services funds was a rare Lipper category with a positive performance—up nearly 3%, and now up 27.9% for the year to date.

Gold-oriented funds, always volatile, dropped 12.3% in the quarter, including 8.9% in September, to leave them with a 17% decline for the year to date.

Mr. Power is a Wall Street Journal features editor in South Brunswick, N.J. Email him at william.power@wsj.com.