Among others, SLB SLB.N gained 11% after the oilfield services firm beat expectations for second-quarter profit.
Advancing issues outnumbered decliners by a 1.52-to-1 ratio on the NYSE where there were 142 new highs and 156 new lows. On the Nasdaq, 2,172 stocks rose and 2,498 fell as declining issues outnumbered advancers by a 1.15-to-1 ratio.
The S&P 500 posted 16 new 52-week highs and 4 new lows while the Nasdaq Composite recorded 70 new highs and 176 new lows.
Real estate leads sector gains
Eight of the S&P 500's 11 major sectors were gaining ground with real estate .SPLRCR the biggest gainer, up 2.3%. The biggest decliners were technology, down 0.8%, and consumer discretionary .SPLRCD, down 0.3%.
The real estate sector's leading gainer was Digital Realty Trust DLR.N, which jumped 12.8% after the firm raised its full-year forecast for funds from operations.
Providing some support to equities was a 4% drop in crude oil futures while traders booked profits from a massive rally in the last five sessions and after sources said that China was pushing to resume stalled U.S.-Iran peace talks. Still, U.S. missiles struck targets across Iran after President Donald Trump vowed "major military punishment" for Tehran and its Houthi allies in Yemen.
"Whatever the headlines are involving the conflict right now, that drives oil and then oil drives financial markets," said Andersen, adding that swings in oil prices can impact consumer and corporate spending.
Elsewhere in politics, the Trump administration imposed new tariffs of 10% and 12.5% on goods from 60 trading partners, citing lax enforcement of forced-labor bans. The move came as a temporary 10% global tariff expired.
Friday's data showed that activity in the U.S. services sector accelerated in July, aided in part by spending around the FIFA World Cup and the Independence Day holiday, while the pace of growth in the manufacturing sector eased to the slowest since March.
Intel drops despite stronger outlook
Intel INTC.O forecast quarterly profit and revenue above Wall Street estimates and outlined plans to increase spending over the next two years late on Thursday. But the chipmaker's shares tumbled about 6% on Friday while the Philadelphia SE Semiconductor index .SOX fell 4% on Friday.
At 2:45 p.m., the Dow Jones Industrial Average .DJI rose 156.90 points, or 0.30%, to 51,868.55, the S&P 500 .SPX lost 2.91 points, or 0.04%, to 7,405.39 and the Nasdaq Composite .IXIC lost 164.66 points, or 0.65%, to 24,973.03.
Nasdaq falls as investors worry about AI spending
The tech-heavy Nasdaq fell on Friday as investors sold chip stocks on worries about massive AI spending plans ahead of the next batch of megacap earnings reports, but falling oil prices limited losses even as Middle East hostilities continued.
The S&P 500 technology index .SPLRCT fell with the biggest drags coming from chip stocks. Investors awaited results next week from megacaps Microsoft MSFT.O, Amazon.com AMZN.O, Meta META.O and Apple Inc AAPL.O.
After piling into technology companies in recent years, on the promise of growth from AI, investors have become worried about the need for ever-increasing capital outlays, according to Peter Andersen, CEO of Andersen Capital Management.
The money manager said that investors were still worrying about a big hike in capital spending announced by Alphabet late on Wednesday.
"People are thinking, how do we make sense of all this spending, and how much more patient do we have to be before we actually see it translate to actual profits?" Andersen said. "The fear of missing out is becoming more like a fear of massive overbuilding."