The S&P 500 and Nasdaq notched record-high closes on Tuesday, fueled by gains in Nvidia after U.S. Federal Reserve Chair Jerome Powell told lawmakers that more "good" economic data would strengthen the case for rate cuts.

AI chipmaker Nvidia climbed 2.5%, offsetting declines in other chip stocks.

Microsoft dipped 1.4%, while Tesla added 3.7%, bringing its gain in 2024 to 5%.

It was the Nasdaq's sixth straight record-high close and the S&P 500's fifth straight as optimism about the growth of AI across the U.S. corporate landscape offset uncertainty around the Fed's rate-cut path. In testimony before Congress, Powell said that while inflation "remains above" the 2% soft-landing target, it has been improving in recent months and "more good data would strengthen" the case for interest-rate cuts. However, the central bank chief insisted he was not "sending any signals about the timing of any future actions."

Markets have stuck to pricing in 50 basis points of easing for the year, seeing a nearly 72% chance for a 25 bps cut by the Fed's September meeting, according to CME's FedWatch. Those bets were at under 50% a month ago.

"The U.S. economy, and currently the U.S. labor market, have been surprisingly resilient through the course of 2024 and our base case is that a recession is not the highest probability outcome, but rather we should continue to expect moderate growth through the balance of this year and into next," said Bill Northey, senior investment director at U.S. Bank Wealth Management.

Inflation data is also due this week, including Thursday's consumer price index and the producer price index reading on Friday. Shares of JPMorgan and Wells Fargo climbed over 1% and Citi rose 2.8%. The three banks will release quarterly results on Friday, marking the start of second-quarter earnings season. Reuters reported that the Fed was considering a rule change that could save big banks billions of dollars in capital.

Analysts on average see S&P 500 companies increasing their aggregate earnings per share by 10.1% in the second quarter, up from an 8.2% increase in the first quarter, according to LSEG I/B/E/S data.

The S&P 500 climbed 0.07% to end the session at 5,576.98 points.

The Nasdaq gained 0.14% to 18,429.29 points, while the Dow Jones Industrial Average declined 0.13% to 39,291.97 points.

Even as the S&P 500 rose, declining stocks outnumbered rising ones within the index by a 1.5-to-one ratio. Tempus AI rose almost 4% after JPMorgan, Morgan Stanley and other brokerages initiated coverage of the stock with bullish ratings. The genetics testing firm, which receives "immaterial" revenue from its AI business, is down around 7% from the $37 price set in its June IPO.

Volume on U.S. exchanges was relatively light, with 9.6 billion shares traded, compared with an average of 11.6 billion shares over the previous 20 sessions.

(Reporting by Noel Randewich in Oakland, California Additional reporting by Lisa Mattackal and Ankika Biswas in Bengaluru Editing by Pooja Desai and Matthew Lewis)