The S&P 500 rose 2.5 per cent and posted its first back-to-back weekly gains since August. The Dow Jones Industrial Average rose 2.6 per cent, and the tech-heavy Nasdaq Composite climbed 2.9 per cent. Smaller company stocks also gained ground, lifting the Russell 2000 index by 2.3 per cent.
Apple's latest quarterly results showed the iPhone maker made even fatter profits during the summer than expected. Its shares rose 7.6 per cent and led a rally in technology stocks that had largely been beat up a day earlier.
Intel jumped 10.7 per cent after delivering a much bigger profit than analysts forecast, even though it said it anticipated “worsening economic conditions”.
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 at 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 has helped fuel hopes on Wall Street for a “pivot” by the Federal Reserve, where the central bank dials down the big interest rate rises that have shaken the market.
Such a move could boost the market, although many analysts said such hopes may be overdone.
The central bank has been very clear about its plan to err on the side of going too far 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,” Ms 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 US companies have been reporting stronger earnings than expected, though the bag remains mixed.
Solid earnings on Friday helped to offset a 6.8 per cent drop for Amazon, which offered a weaker-than-expected forecast for revenue.
It was the latest Big Tech company to take a beating this week after reporting some discouraging trends. It is 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 important 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 per cent 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 per cent for the week because it has less of an emphasis on technology.
Rising interest rates have hit Big Tech stock prices harder than the rest of the market, and the pressure increased on 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,” Ms Young said.
Data released in the morning showed the raises that US workers received in wages and other compensation during the summer was in line with economists' expectations.
That should keep the Fed on track to keep increasing 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 US 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 is 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 per cent to 3.25 per cent, up from virtually zero in March.
The widespread expectation is for it to push through another increase that is triple the usual size next week, before it may make 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 per cent from 4.28 per cent late Thursday.
The 10-year yield, which helps set rates for mortgages and many other loans, climbed to 4.01 per cent from 3.93 per cent.