The past year felt dismal for investors. Even worse, the gloom was all-encompassing.

Mutual funds of all types sank. Even those funds that are typically steadier during turbulent markets struggled through what became the worst year since the Great Recession for many investors.

Stock, bond and commodity markets all succumbed to worries about rising interest rates, a predicted slowdown in economic growth and the potentially painful effects of the global trade war. That meant losses not only for investors who went all-in on U.S. stock funds, which looked unstoppable after notching their best January in two decades, but also for those who hewed to the traditional advice and diversified their 401(k) accounts across many different markets.

The largest stock fund, Vanguard’s Total Stock Market Index fund, lost 5.3 percent for the year, including dividends, its first loss since the financial crisis crushed the global economy in 2008. At the same time, the largest bond fund, Vanguard’s Total Bond Market Index fund, lost 0.4 percent, and the price of gold fell 2 percent. It’s the first year all three dropped at the same time since 1994.

By the last few months of 2018, the losses were also coming painfully fast, with indexes regularly swinging between big gains and big losses within the span of a couple hours.

“Fears are certainly growing that the good old days of the last several years are coming to an end,” said Frances Donald, head of macroeconomic strategy at Manulife Asset Management. “This is a trader’s market, where you want to pick your sectors very carefully,”

Unfortunately, that was difficult for many to do successfully in 2018. Only two of the 11 sectors that make up the S&P 500 index were able to rise: health care and utilities. And nearly two-thirds of the stocks that make up the index fell.

Conditions seemed to favor managers of actively managed mutual funds, who say they can offer a steadier ride through such volatility by picking the best stocks and avoiding the worst. But they also had a rough 2018. Only 42 percent of active fund managers beat their index in 2018, according to Jefferies.

Here’s a look at some of the trends that shaped the year for funds:

  • U.S. stock funds got walloped, but foreign funds got hit harder.

S&P 500 index funds sank to their first down year in a decade after including dividends, losing 4.4 percent or more. But they were actually among the market’s leaders.

Funds that focus on small U.S. stocks dropped even more on worries that higher interest rates will hurt their growth, among other challenges. The largest such fund, Vanguard’s Small Cap Index fund, lost 9.3 percent and plunged more than 20 percent in the months following its late August peak.

Funds that specialize in stocks from other countries fared even worse, hurt by worries about slowing economic and profit growth due in part to rising trade tensions with the United States.

Emerging-market stock funds lost an average of 16.1 percent in 2018, and Chinese stock funds were down an average of 19.9 percent, according to Morningstar.

  • Bond funds struggled.

Stock funds have a long history of sharp price swings, so volatility shouldn’t come as a big surprise. That’s why many investors, even those with a long time horizon, keep some of their savings in bond funds.

Bonds are supposed to offer a steadier ride with their regular payments and offer ballast to overall portfolios. But many bond funds also lost ground in 2018, the result of rising interest rates. The Federal Reserve raised short-term rates four times during the year.

When rates are rising, the lower interest payments paid out by older bonds suddenly look less attractive, so their prices drop. Bond mutual funds have to account for those declines in their fund prices, and investors feel it.

The average intermediate-term bond fund, the most popular type of bond fund, lost 0.5 percent last year.

Funds that focus on corporate debt fared even worse as worries rose that a possible recession could lead to more defaults and downgrades. The average corporate bond fund lost 2.5 percent, and the average high-yield bond fund dropped 2.6 percent.

  • Gold funds didn’t shine.

When markets are turbulent, investors often turn to gold for safety. But even gold funds struggled last year, and the largest gold ETF lost 1.9 percent last year.

Again, blame interest rates. The price of gold often moves in the opposite direction of the U.S. dollar’s value, and the dollar climbed against the euro and other rivals as the Federal Reserve raised rates throughout the year.

© The Associated Press. All rights reserved.