For investments this summer, it was all America First.

Funds that focus on U.S. stocks charged to record heights, bolstered by Apple and other companies reporting tax-cut-fueled profit gains that were even more eye-popping than analysts expected. The U.S. economy also hit its fastest growth rate in nearly four years, and S&P 500 index funds are on track for their best quarter in nearly five years.

Other areas of the market, though, were more restrained. Worries about a trade war, falling currency values and slower economic growth meant many foreign stock funds had more modest gains or were down. Bond funds, meanwhile, struggled in the face of rising interest rates.

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

U.S. Stocks on Top

Expectations were already high when companies began reporting their second-quarter results in early July, with Wall Street penciling in profit growth of about 18 percent for companies in the S&P 500 index. The actual numbers were even better. Profit growth ended up being 25 percent, according to FactSet.

The gains were widespread, and every sector that makes up the S&P 500 index reported bigger profits than a year earlier. That helped vault all types of U.S. stock funds to records. Whether they focus on big companies or small, health care stocks or financials, most U.S. stock funds logged gains during the quarter.

It’s just the latest step in a long run since the bull market was born out of the rubble of the 2008 financial crisis. But after such an extended climb, some fund managers are urging caution, or at least lowered expectations.

“Things feel good now,” said Matthew McLennan, head of global value at First Eagle Investment Management. But the big moves for stocks in recent years mean they’re more expensive than usual, relative to their profits, and the big buildup of government indebtedness around the world is raising risks.

“Now is the time to be preparing yourself for a more difficult environment,” said McLennan, who helps run the $54.7 billion First Eagle Global fund.

Foreign Stocks Lagged

Emerging-market stock funds, which were some of the market’s biggest winners last year, struggled during the quarter. Several factors combined to hold them down, including higher U.S. interest rates, falling currency values, slower growth and worries about trade-war repercussions. The iShares MSCI Emerging Markets ETF, for example, lost 0.8 percent for the quarter, as of Wednesday. It had been down as much as 5 percent earlier in the month.

Stocks from other areas of the world also lagged behind their U.S. peers, and the largest international stock fund by assets was up 1.3 percent for the quarter, as of Wednesday. That’s about a fifth of the 6.7 percent return for the largest U.S. stock mutual fund.

“That makes sense, we have the strongest earnings growth,” said Brian Nick, chief investment strategist at Nuveen. But he also cautioned that earnings growth is likely to fall off for U.S. companies next year.

The effects of the tax cut will be wearing off, and companies will be comparing their profits against some big numbers from a year earlier, starting in the first quarter of 2019. The big divergence in returns between U.S. stock funds and international stock funds may not last for that much longer.

“I think it’s creating a lot of opportunities outside the U.S.,” Nick said.

Breaking Even was a Victory for Bond Funds

The Federal Reserve continued its campaign to gradually raise interest rates off their record lows from the financial crisis. Its latest move came Wednesday, when the Fed raised short-term rates for the third time this year.

Yields have climbed as a result, and the 10-year Treasury’s yield rose above 3 percent during the quarter and approached its highest level since 2011. When interest rates rise, bond funds feel pain because prices drop for the bonds they hold in their portfolios. Those bonds suddenly become less attractive than newly issued bonds, which pay higher yields, and their prices drop accordingly.

The biggest bond mutual fund by assets, Vanguard’s Total Bond Market Index fund, was down 0.2 percent for the quarter, as of Wednesday.

But bond funds will also get a benefit from those higher rates, namely the bigger interest payments they’ll receive from higher-yielding bonds. As long as the rise in rates is gradual, which many analysts expect will be the case, bond funds can eventually offset their price drops with higher income.

© The Associated Press. All rights reserved.