NEW YORK: U.S. stocks rose sharply on Wednesday, fueled by optimism over a potential deal on the $31.4 trillion federal debt ceiling and as a rebound in regional bank shares eased concerns about an escalation in the sector's troubles.

President Joe Biden and top U.S. congressional Republican Kevin McCarthy on Wednesday reiterated their determination to strike a deal soon to raise the debt ceiling and avoid an economically catastrophic default.

If an agreement is not reached by June 1, the U.S. Treasury has said it could begin to run out of funds to pay the government's bills, potentially igniting a recession.

A jump in regional bank shares lifted sentiment, led by a 10.19% surge in Western Alliance Bancorp a day after the bank said deposits grew by more than $2 billion in the quarter ended May 12.

The KBW regional bank shot up 7.28% to notch its biggest one-day percentage gain since Jan. 6, 2021 to close at its highest level since May 1. The S&P 500 banks index also surged 4.46% for its biggest daily percentage gain since Nov. 10.

"It is optimism over the debt ceiling. It is continued optimism the banking crisis is in the rear-view mirror. Every day we go without a new problem, the closer we get to maybe putting it behind us," said Rick Meckler, partner at Cherry Lane Investments in New Vernon, New Jersey.

"Definitely the catalyst is when you get both Biden and McCarthy to say that we are close the assumption is they probably will go with some kind of agreement."

The Dow Jones Industrial Average rose 408.63 points, or 1.24%, to 33,420.77; the S&P 500 gained 48.87 points, or 1.19%, to 4,158.77; and the Nasdaq Composite added 157.51 points, or 1.28%, at 12,500.57.

The gains marked the biggest one-day percentage climb for each of the three major indexes since May 5.

Also providing support was a 4.41% advance in Tesla shares after its annual shareholder meeting on Tuesday.

Top boss Elon Musk downplayed market speculation he may step down as CEO of Tesla, touched upon two new mass-market models the company is developing, and reaffirmed that deliveries of its long-delayed Cybertruck pickup would start this year.

In addition, a source with direct knowledge of the matter told Reuters the electric vehicle maker has proposed setting up a factory in India for domestic sale and export.

With the rally the S&P is once again near the top of a recent trading range, at about 4,160, which has acted as a resistance point. Analysts said a major catalyst such as a debt ceiling agreement or clarity on the path of interest rate hikes from the Federal Reserve would be needed to push stocks much higher.

Recent data has indicated slowing in the U.S. economy following a string of Fed rate hikes to fight high inflation. That, along with recent negotiations over the U.S. debt ceiling, has focused attention on when the central bank will pause hiking, or cut interest rates.

While the market is pricing in a rate cut by the year-end, recent comments from Fed officials suggested they are not ready to cut rates soon.

Retailers Target Corp and TJX Companies Inc forecast current-quarter profit below expectations despite beating estimates for the first quarter.

Shares of Target rose 2.58%, while TJX Companies closed 0.93% higher after a choppy session. The gains, along with Tesla's rally, helped lift the consumer discretionary sector about 2%.

Volume on U.S. exchanges was 10.35 billion shares, compared with the 10.59 billion average for the full session over the last 20 trading days.

Advancing issues outnumbered decliners on the NYSE by a 2.95-to-1 ratio; on Nasdaq, a 2.45-to-1 ratio favored advancers.

The S&P 500 posted 20 new 52-week highs and 14 new lows; the Nasdaq Composite recorded 69 new highs and 123 new lows.

(Reporting by Chuck Mikolajczak; Editing by Richard Chang)