US shares surged after the Senate announced a deal to end the partial government shutdown and avoid a debt default.
The Dow Jones Industrial Average, Nasdaq, and S&P 500 all closed up by more than 1%.
Senate majority leader Harry Reid said the upper chamber would vote on the bill later on Wednesday.
The deal would fund the government until 15 January, and extends the debt ceiling until 7 February.
The Dow Jones rose 206 points to close at 15,374. The S&P 500 was up 23 points to 1,721 and the Nasdaq rose 45 points to 3,839.
House majority leader John Boehner said that members of the Republican party in the house would support the legislation, all but ensuring that the debt ceiling is raised before the end of day on 17 October.
That is when US Treasury Jack Lew had said the Treasury would exhaust the “extraordinary measures” that are currently being used to fund the government and pay its bills.
Stock markets, accustomed to Washington wrangling after several years of budget brinkmanship, did not react as dramatically during the shutdown as they had during previous budget disputes.
“The market believed in and anticipated a resolution,” says Doug Cote, chief market strategist at ING Investment Management.
“However, we are nonetheless pleased that we got it. It’s a relief.”
Traders on the floor of the New York Stock Exchange were upbeat throughout the day and said they were eager to get back to normal trading.
Benedict Willis, managing director of Alfred Fried & Company, told the BBC that he thought markets would continue to rise as a global recovery can now continue.
He says this upward trend was “interrupted over the last month because of the clowns we have in Congress.”
“Now, we can go back to focusing on what stock markets are good for which is company earnings.”
But many worry that this deal only prolongs the agony, and that there will be yet another fight in January.
“Hopefully in three months [US politicians] will realize the impact they’ve had on the good name and reputation of America,” says Mr Willis.
But he adds: “I would expect some more drama to continue.”