The artificial intelligence frenzy led to another day of gains in the stock market, as traders became more confident that a deal on the US debt limit would be reached.

The S&P 500 gained 1.3% and the tech-heavy Nasdaq 100 gained 2.6% after Marvell Technology said revenue in 2024 would "at least double" from a year ago due to increased demand from AI, echoing sentiments expressed earlier this week by Nvidia The chipmaker's stock increased 32%.

The gains came as US negotiators appeared to be getting closer to a deal to raise the US debt ceiling and cap federal spending for two years. A US default could have catastrophic consequences, putting markets on edge. However, House Speaker Kevin McCarthy stated last night that he believed progress had been made.

Investors were demanding a lower premium to hold US Treasury bills, which were seen as the most vulnerable to nonpayment if a deal was not reached in time. Securities due to mature in early June, when Treasury Secretary Janet Yellen warned the government might run out of money, all yielded less than 6% on Friday.

Meanwhile, the rate-sensitive two-year Treasury fell as traders considered how a debt deal might affect the Federal Reserve's interest-rate policy. After a report on consumer spending revealed that the Fed still has work to do to bring inflation back to its target, the two-year yield hovered around 4.56%. The personal consumption expenditures price index, one of the Fed's preferred inflation gauges, rose by 0.4% in April, faster than expected.