Technology stocks led a broad rally on Wall Street Friday, capping another strong week for the market, as investors welcomed solid profits from Apple and other companies.

The S&P 500 rose 2.5% and posted its first back-to-back weekly gains since August. The Dow Jones Industrial Average rose 2.6% and the tech-heavy Nasdaq composite climbed 2.9%. Smaller company stocks also gained ground, lifting the Russell 2000 index by 2.3%.

Apple’s latest quarterly results showed the iPhone maker made even fatter profits during the summer than expected. Its shares rose 7.6% and led a rally in technology stocks that had largely been beat up a day earlier.

Intel jumped 10.7% after delivering much bigger profit than analysts forecasted even though it said it saw “worsening economic conditions.”

Gilead Sciences soared 12.9%, and T-Mobile US gained 7.4% after they also topped Wall Street’s profit expectations.

Investors were also encouraged by a report on consumer spending that came a day after new data showing the economy grew modestly in the third quarter and inflation eased.

“You have an economy that almost refuses to keel over, an economy that at its core is resilient, but a the same time inflation is easing and that is what the Fed wants and that’s obviously what the market wants,” said Quincy Krosby, chief equity strategist for LPL Financial.

That’s helped fuel hopes on Wall Street for a “pivot” by the Federal Reserve, where the central bank dials down the big interest-rate hikes that have shaken the market. Such a move could boost the market, though many analysts say such hopes may be overdone.

The central bank has been very clear about its plan to err on the side of going too far in order to tame inflation, which means the big gains on hopes of a pullback seem premature, said Liz Young, chief investment strategist at SoFi.

“This rally has now gotten a bit irrational and fragile at this level,” Young said.

The S&P 500 rose 93.76 points to 3,901.06. The Dow gained 828.52 points to 32,861.80. The Nasdaq rose 309.78 points to 11,102.45. The Russell 2000 gained 40.60 points to 1,846.92.

Many big U.S. companies have been reporting stronger earnings than expected, though the bag remains decidedly mixed.

Solid earnings on Friday helped to offset a 6.8% drop for Amazon, which offered a weaker-than-expected forecast for upcoming revenue. It was the latest Big Tech company to take a beating this week after reporting some discouraging trends. It’s a sharp turnaround after the group dominated Wall Street for years with seemingly unstoppable growth.

Earlier in the week, Meta Platforms lost nearly a quarter of its value after reporting a second straight quarter of revenue decline amid falling advertising sales and stiff competition from TikTok. Microsoft and Google’s parent company also reported slowdowns in key areas.

Such woes have created a sharp split on Wall Street this week, between lagging Big Tech stocks and the rest of the market. The Nasdaq, which is stuffed with high-growth tech stocks, notched a 2.2% gain this week. It would have had an even worse showing if not for Apple’s boost from Friday. The Dow, meanwhile, jumped 5.7% for the week because it has less of an emphasis on tech.

Rising interest rates have hit Big Tech stock prices harder than the rest of the market, and the pressure increased Friday as yields climbed.

“The markets still seem to not want to believe that we might end up in a place where an earnings recession is possible,” Young said.

Data released in the morning showed the raises that U.S. workers got in wages and other compensation during the summer was in line with economists’ expectations. That should keep the Fed on track to keep hiking rates sharply in hopes of weakening the job market enough to undercut the nation’s high inflation. Other data showed the Fed’s preferred measure of inflation remains very high, and U.S. households continue to spend more in the face of it.

The Fed is trying to starve inflation of the purchases made by households and businesses needed to keep it high. It’s doing that by intentionally slowing the economy and the jobs market. The worry is that it could go too far and cause a sharp downturn.

The Fed has already raised its benchmark overnight interest rate up to a range of 3% to 3.25% up from virtually zero in March. The widespread expectation is for it to push through another increase that’s triple the usual size next week, before it potentially makes a smaller increase in December. Higher rates not only slow the economy, they also hurt prices for stocks and other investments.

The yield on the two-year Treasury, which tends to track expectations for Fed action, rose to 4.42% from 4.28% late Thursday.

The 10-year yield, which helps set rates for mortgages and many other loans, climbed to 4.01% from 3.93%.

Trading in Twitter’s stock has ended, after Elon Musk took control of the company following a lengthy legal battle.

___

Associated Press writers Elaine Kurtenbach, Matt Ott and Mari Yamaguchi contributed.