NEW YORK — Stock markets around the world sagged on Friday after Amazon and other big companies reported quarterly results that underwhelmed investors.

The Standard & Poor’s 500 index lost 3.32 points, or 0.1 percent, to 2,472.10 and closed a week packed with corporate earnings reports almost exactly where it started. It set a record during the middle of it.

The Dow Jones industrial average gained 33.76 points, or 0.2 percent, to 21,830.31 and set another all-time high. The Nasdaq composite fell 7.51, or 0.1 percent, to 6,374.68.

A little more than half the companies in the S&P 500 have now shown how much profit they made during the spring, and the results have been mostly encouraging. Earnings for the index are on pace to be about 9 percent higher than a year earlier, according to FactSet. But expectations were high coming into the reporting season, and the few companies that have fallen short of forecasts have seen their stock prices punished.

Amazon dropped $25.96, or 2.5 percent, to $1,020.04 after its profit missed expectations. Its forecast for operating income this fiscal year was also below many analysts’ forecasts, though revenue for the latest quarter beat expectations.

Earnings reports were the main focus for markets during a busy week, where the Federal Reserve also decided on Wednesday to hold interest rates steady and the government on Friday gave an update on the economy’s health.

The economy grew at an annual rate of 2.6 percent in the second quarter, revved up by a rise in consumer spending, the Commerce Department reported. Last quarter’s growth rate was more than double that of the year’s first quarter, which was revised down to 1.2 percent. The faster growth, though, was still a shade below the 2.7 percent that economists expected.

“Overall, the economy continues to move along, but it’s hard to see where the fuel is going to come from for further acceleration,” said Rich Weiss, chief investment officer of multi-asset strategies at American Century Investments. He says the economy reminds him of what golfers call a “son-in-law” shot, one that’s not bad but not great.

“We’re not throwing new money into the stock market at this point,” Weiss said. Instead of U.S. stocks, he prefers foreign markets where he says economies have more potential for improvement. Many other investors have shifted their money using a similar philosophy, and the falling value of the dollar against other currencies has helped boost foreign stocks’ returns.

Excitement about the U.S. economy had been higher earlier in the year, when many investors expected the Republican takeover of Washington to lead to more pro-business policies. But inaction in the Capitol, capped by the Senate’s latest failed attempt to revamp the nation’s health care system, is raising doubts about whether tax reform or a big infrastructure plan will happen.

Tobacco stocks were some of Friday’s worst performers after the U.S. government said it’s considering limiting the amount of nicotine in cigarettes so that they’re no longer addictive. Altria Group, which sells Marlboro and other cigarettes in the U.S., fell $7.02, or 9.5 percent to $66.94. It had been down as much as 18.9 percent shortly after the Food and Drug Administration’s announcement.

Flowserve, which sells pumps, valves and other parts for the oil and gas industries, dropped to the biggest losses in the S&P 500 after reporting weaker earnings for the latest quarter than Wall Street had forecast. It sank $5.06, or 10.9 percent, to $41.30.

Starbucks fell $5.50, or 9.2 percent, to $54.00 after it lowered its forecast for earnings this fiscal year, and Goodyear Tire & Rubber sank $2.97, or 8.4 percent, to $32.51 after it gave a forecast for 2017 operating income that fell short of analysts’ expectations.

The yield on the 10-year Treasury note fell to 2.28 percent from 2.32 percent late Thursday. The two-year yield dipped to 1.34 percent from 1.36 percent, and the 30-year yield dropped to 2.90 percent from 2.93 percent.

Stock markets around the world were weak. Japan’s Nikkei 225 index dropped 0.6 percent, South Korea’s Kospi lost 1.7 percent and the Hang Seng in Hong Kong fell 0.6 percent.

France’s CAC 40 lost 1.1 percent, the FTSE 100 in London fell 1 percent and Germany’s DAX dropped 0.4 percent

The dollar fell to 110.60 Japanese yen from 111.09 yen late Thursday. The euro rose to $1.1760 from $1.1681, and the British pound rose to $1.3149 from $1.3070.

The price of oil capped off its best week since early December with another gain. Benchmark U.S. crude rose 67 cents to settle at $49.71 per barrel and touched its highest level since May. Oil gained nearly 9 percent over the week.

Brent crude, the international standard, gained $1.03 to $53.53 a barrel Friday. Natural gas fell 3 cents to $2.94 per 1,000 cubic feet. Heating oil rose 4 cents to $1.64 per gallon, and wholesale gasoline gained 3 cents to $1.68 per gallon.

Gold rose $8.80 to settle at $1,275.30 per ounce, silver added 12 cents to $16.70 per ounce and copper was close to flat at $2.88 per pound.