U.S. stocks clawed back some of this week's losses as a tech rally buoyed risk sentiment and comments by Federal Reserve officials dialed back fears of overly aggressive policy moves.

The S&P 500 Index rose for the first time in four days in a broad-based rally, with all but one of the 11 sectors in the green. The tech-heavy Nasdaq 100 jumped more than 2%. Google parent Alphabet Inc. gained after revealing a plan to cut 12,000 jobs. Netflix Inc. surged after reporting stronger-than-expected subscriber numbers.

Benchmarks climbed to session highs on Friday after Fed Governor Christopher Waller said policy looks pretty close to sufficiently restrictive. Earlier, Philadelphia Fed President Patrick Harker repeated his view for more incremental steps in rate hike, while Kansas City Fed chief Esther George said the economy can avoid a sharp downturn.

Equity markets rallied despite a push higher in Treasury yields, suggesting that the 60/40 portfolio model could be making a comeback. Earlier this week, higher rates and hawkish comments from Fed and European Central Bank officials had weighed on risk sentiment.

"It's notable that yields are up today yet Nasdaq is outperforming," said Jonathan Krinsky, chief market technician for BTIG. "While this could be perceived as a short-term positive, if we are shifting to a 'bad news is bad' narrative where lower rates coincide with lower stocks, then it would make sense to see the inverse."

Earnings have also been in focus. Of the 55 S&P 500 companies that have reported results so far, only two-thirds have beaten analysts' estimates, compared with the 80% positive surprise seen over the past several quarters.

"Fears of a recession seemed to be overriding sort of optimism from some companies which have reported better-than-expected results," said Fiona Cincotta, senior financial markets analyst at City Index. "There is this understanding that earnings are probably going to be weaker, but I think a lot of that's being priced in."

Oil contracts rose for a second day, with West Texas Intermediate crude heading for a weekly advance. Traders were emboldened by Chinese demand that's been picking up after the nation abandoned harsh virus restrictions.

Copper held on to its fifth weekly increase in London, its best run since May 2021, with global supply risks persisting and inventories near historic lows.

Stephen Kirkland reports for Bloomberg News.

Copyright 2023 Bloomberg. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.