(AP) -- Technology companies led a rally on Wall Street that powered the S&P 500 to an all-time high and gave the index its best weekly gain since February.
The S&P 500 rose 1%, enough to recoup its losses from a day earlier. The benchmark index closed higher four of the last five days, finishing 3.8% higher for the week.
The Dow Jones Industrial Average rose 0.6% and the Nasdaq composite gained 0.7%, both recovering from declines in the early going. Smaller-company stocks lagged the broader market, leaving the Russell 2000 index 0.4% lower.
A late wave of buying solidified the gains for the market, which had wavered between small gains and losses in morning trading after the government reported another big rise in inflation last month.
The Bureau of Labor Statistics said prices for U.S. consumers jumped 6.8% in November compared with a year earlier. Surging costs for food, energy, housing and other items have left Americans enduring their highest annual inflation rate since 1982. Core prices, which exclude food and energy, rose 4.9% year over year.
Still, markets were relieved to see that the report was in line with expectations.
"Many have felt the effects of inflation in their day-to-day, so this likely isn't a huge shocker to the market," said Mike Loewengart, managing director, investment strategy at E-Trade.
The S&P 500 rose 44.57 points to 4,712.02, a new high. It set its previous record high on Nov. 18.
The Dow gained 216.30 points to 35,970.99. The tech-heavy Nasdaq rose 113.23 points to 15,630.60. The Russell 2000 fell 8.40 points to 2,211.81. The indexes all posted weekly gains.
The latest inflation data comes ahead of the Federal Reserve's two-day meeting of policymakers next week. Rising inflation has prompted the central bank to speed up the pace at which it trims its bond purchases, which have helped keep interest rates low.
Federal Reserve Chair Jay Powell has suggested the central bank could move more quickly to pare back, or taper, the amount of bonds it's been purchasing each month to keep long-term interest rates low.
Analysts say the elevated inflation figures ramp up the pressure on the Fed to follow through on Powell's comments. Many investors also expect the Fed to start raising interest rates from current ultra-low levels starting in the middle of next year.
"The inflation print from this morning will reinforce the Fed's resolve to accelerate tapering. With the strength in the economic recovery, it is time to take the crutches away," said Anu Gaggar, global investment strategist for Commonwealth Financial Network.
Apart from a decline Thursday, stocks have bounced back this week following two weeks of volatile trading that left the S&P 500 with back-to-back weekly losses. The index has now recovered most of the losses after the discovery of the omicron variant of COVID-19 was announced last month. It's now up 25.5% for the year.
Investors' worries over omicron eased this week amid encouraging signs that the variant may be less dangerous than delta. Pfizer said this week that its lab tests suggest the drugmaker's COVID-19 boosters provide protection against the new strain.
More than 70% of the stocks in the S&P 500 rose, with technology companies doing most of the heavy lifting. Business software maker Oracle surged 15.6% for the biggest gain in the S&P 500 after reporting strong quarterly results. Microsoft and Apple each rose 2.8%.
Makers and sellers of household goods also helped lift the S&P 500. Costco climbed 6.6%, while Coca-Cola rose 2.6%.
Energy futures closed higher. The price of U.S. crude oil rose 1%. That helped give a modest boost to energy sector stocks in the S&P 500. Devon Energy rose 2.6%.
The yield on the 10-year Treasury note fell to 1.48% from 1.51% just before the inflation report came out. The yield on the two-year note dropped to 0.66%.