The S&P 500 ended nearly flat on Friday, as falling crude oil prices and robust earnings reports counterbalanced a widespread selloff in semiconductor companies. The S&P 500 added just 3.68 points, or 0.05%, to close at 7,411.98. Conversely, the tech-heavy Nasdaq Composite dropped 161.87 points, or 0.64%, to 24,975.82, while the Dow Jones Industrial Average rose 235.60 points, or 0.46%, to 51,947.25. For the week, the S&P 500 fell 0.6% and the Nasdaq lost 2%, both marking their second consecutive weekly decline. The Dow also fell 0.4% for the week, its third straight weekly loss.

The decline in the Nasdaq and the broader tech sector was largely driven by a significant downturn in chip stocks. The Philadelphia SE Semiconductor index plunged 4.5%, with individual chipmakers like Intel seeing their shares sink 7.9% on Friday. This widespread selloff in semiconductor stocks reflects investor concerns about massive spending on artificial intelligence infrastructure and whether these investments will yield commensurate returns. The S&P 500 technology index underperformed the broader market, finishing down 0.88%.

Providing some counterbalance was a substantial drop in crude oil prices, which alleviated concerns about rising consumer prices and potential Federal Reserve interest rate hikes. Brent crude futures fell 3% on the day, with prices dipping below $90 a barrel at one point, although they later pared some losses. This decline was attributed to profit-taking after a recent rally and news of potential US-Iran peace talks, easing Middle East tensions. Analysts noted that swings in oil prices significantly impact consumer and corporate spending. The S&P 500's real estate sector was the strongest performer, gaining 2.4%, driven partly by companies like Digital Realty Trust, which rallied 11% after raising its full-year forecast for funds from operations.

Despite the semiconductor weakness, the overall earnings season has been exceptionally strong. With 27% of S&P 500 companies reporting, 86% have beaten earnings estimates and 80% have exceeded revenue forecasts. FactSet projects 37.9% year-on-year earnings growth for the quarter, a significant increase from 23.2% at the end of June. This robust corporate performance has provided a solid foundation for the market, mitigating the impact of geopolitical headwinds and the tech sector's struggles. However, upcoming earnings from megacap tech companies like Microsoft Corp., Meta Platforms, Apple Inc., and Amazon.com Inc. are highly anticipated, as investors will scrutinize their spending trajectories and monetization strategies for AI investments.