The longest government shutdown in US history could end this week after a compromise that would restore federal funding cleared an initial Senate hurdle late on Sunday, though it was unclear when Congress would give final approval.
Heavyweight tech stocks rebounded from some recent losses. Last week, the S&P 500 technology sector index tumbled 4.2 per cent.
Nvidia, the world's most valuable company, AI data analytics firm Palantir and Tesla all surged.
According to preliminary data, the S&P 500 gained 103.48 points, or 1.54 per cent, to end at 6,832.28 points, while the Nasdaq Composite gained 520.29 points, or 2.26 per cent, to 23,524.82. The Dow Jones Industrial Average rose 385.12 points, or 0.82 per cent, to 47,372.22.
Airlines came under pressure as government-directed flight cuts and air traffic staffing absences disrupted US air travel. United Airlines and American Airlines both dipped.
On betting website Polymarket, the probability of an end to the shutdown this week stood at 88 per cent.
The longest federal shutdown in history has created a data gap for the Federal Reserve and markets alike, leaving them dependent on private data that has given a mixed picture of the economy.
Some Fed officials reiterated their caution regarding the monetary policy decision at the central bank's next meeting, while Fed Governor Stephen Miran repeated his call for a big rate cut.
Optimism around artificial intelligence has fuelled a bull run in US stocks this year, but concerns around monetisation and circular spending within the sector drove a bout of selling recently. The Nasdaq last week marked its worst performance in over seven months.
Meanwhile, third-quarter earnings season is nearly complete. Of the 446 S&P 500 companies that have reported, 83 per cent have delivered better-than-expected earnings, according to data compiled by LSEG.
Shares of health insurers dropped after the US Senate struck a deal to end the 40-day federal shutdown without extending Affordable Care Act subsidies, setting up a December vote on the issue instead.