New York CNN Business  — 

Stocks rallied Thursday after President Joe Biden announced a bipartisan agreement on an infrastructure deal.

The S&P 500 (SPX) and Nasdaq Composite (COMP) hit new record highs and the Dow (INDU) climbed more than 320 points.

“We have a deal,” Biden told reporters Thursday. Even though it is a proposal with support from both parties, it’s still unclear if the deal will get enough support in the Senate.

US stocks were already trading higher before Biden’s comments, but they added onto their gains after the news broke.

The Dow closed 323 points, or nearly 1%, higher, while the S&P finished up 0.6%. The Nasdaq closed 0.7% higher.

“The market seems enthusiastic about the prospect of an agreement being reached on an infrastructure deal,” even though the details are yet to be determined, said Brian Price, head of investment management for Commonwealth Financial Network, in emailed comments.

The plan will amount to $1.2 trillion over eight years, with $559 billion in new spending, multiple sources familiar with the matter told CNN. That means the new proposal would be much smaller than the President’s initial $2.25 trillion plan.

“In my estimation this agreement represents a rare opportunity to lift the long term growth path of the economy, productivity and the living standards of individual Americans,” said Joe Brusuelas, chief economist at RSM US.

Markets received more promising news at the day’s end. The Federal Reserve Board indicated that its annual bank stress test “showed that large banks continue to have strong capital levels and could continue lending to households and businesses during a severe recession.”

“Over the past year, the Federal Reserve has run three stress tests with several different hypothetical recessions and all have confirmed that the banking system is strongly positioned to support the ongoing recovery,” said Randal K. Quarles, the Fed’s vice chair for supervision, in a press release.