Major stock indexes on Wall Street drifted to a mixed finish Friday, capping a rare bumpy week for the market.

The S&P 500 ended essentially flat, down less than 0.1%, after wavering between tiny gains and losses most of the day. The benchmark index posted a loss for the week, its first after three straight weekly gains.

The Dow Jones Industrial Average slipped 0.2%, while the Nasdaq composite rose 0.1%, ending just below the record high it set on Wednesday.

There were more than twice as many decliners than gainers on the New York Stock Exchange.

Gains in technology stocks helped temper losses in communication services, financials and other sectors of the market.

Broadcom surged 24.4% for the biggest gain in the S&P 500 after the semiconductor company beat Wall Street’s profit targets and gave a glowing forecast, highlighting its artificial intelligence products. The company also raised its dividend.

The company's big gain helped cushion the market's broader fall. Pricey stock values for technology companies like Broadcom give the sector more weight in pushing the market higher or lower.

Artificial intelligence technology has been a focal point for the technology sector and the overall stock market over the last year. Tech companies, and Wall Street, expect demand for AI to continue driving growth for semiconductor and other technology companies.

Some tech stocks were a drag on the market. Nvidia fell 2.2%, Meta Platforms dropped 1.7% and Google parent Alphabet slid 1.1%.

Among the market's other decliners were Airbnb, which fell 4.7% for the biggest loss in the S&P 500, and Charles Schwab, which closed 4% lower.

Furniture and housewares company RH, formerly known as Restoration Hardware, surged 17% after raising its forecast for revenue growth for the year.

All told, the S&P 500 lost 0.16 points to close at 6,051.09. The Dow dropped 86.06 points to 43,828.06. The Nasdaq rose 23.88 points to 19,926.72.

Wall Street's rally stalled this week amid mixed economic reports and ahead of the Federal Reserve's last meeting of the year. The central bank will meet next week and is widely expected to cut interest rates for a third time since September.

Expectations of a series of rate cuts has driven the S&P 500 to 57 all-time highs so far this year.

The Fed has been lowering its benchmark interest rate following an aggressive rate hiking policy that was meant to tame inflation. It raised rates from near-zero in early 2022 to a two-decade high by the middle of 2023. Inflation eased under pressure from higher interest rates, nearly to the central bank's 2% target.

The economy, including consumer spending and employment, held strong despite the squeeze from inflation and high borrowing costs. A slowing job market, though, has helped push a long-awaited reversal of the Fed's policy.

Inflation rates have been warming up slightly over the last few months. A report on consumer prices this week showed an increase to 2.7% in November from 2.6% in October. The Fed's preferred measure of inflation, the personal consumption expenditures index, will be released next week. Wall Street expects it to show a 2.5% rise in November, up from 2.3% in October.

The economy, though, remains solid heading into 2025 as consumers continue spending and employment remains healthy, said Gregory Daco, chief economist at EY.

“Still, the outlook is clouded by unusually high uncertainty surrounding regulatory, immigration, trade and tax policy,” he said.

Treasury yields edged higher. The yield on the 10-year Treasury rose to 4.40% from 4.34% late Thursday.

European markets slipped. Britain's FTSE 100 fell 0.1%. Britain’s economy unexpectedly shrank by 0.1% month-on-month in October, following a 0.1% decline in September, according to data from the Office for National Statistics.

Asian markets closed mostly lower.