to pass the measure by day's end. Without a debt deal, the US will hit a Thursday deadline after which it could no longer borrow money to pay its bills, increasing the chance of a default on government debt.
The Dow Jones industrial average rose 174 points, or 1.2%, to 15,342 as of 2:08 p.m. (1808 GMT).
Despite the gridlock in Washington, investors have stayed largely calm throughout the twists in the current fiscal drama in Washington. Even before Wednesday's news, the S&P 500 and the Dow were up for the month.
"The market believed in and anticipated a resolution," said Doug Cote, chief market strategist at ING Investment Management. "However, we are nonetheless pleased that we got it. It's a relief."
The Standard & Poor's 500 index rose 19 points, or 1.2%, to 1,718, just seven points below its all-time high of 1,725 set Sept. 18.
The Nasdaq composite rose 42 points, or 1.1%, to 3,835.
The Senate proposal called for extending the government's borrowing authority through Feb. 7 and reopening the government through Jan. 15.
A view of the US Capitol building at dusk in Washington. (AP Photo)
The market for US Treasury bills reflected relief among bond investors. The yield on the one-month T-bill dropped to 0.13% from 0.40% Wednesday morning, an extraordinarily large move. The decline means that investors consider the bill to be less risky.
The yield on the 10-year Treasury note edged down to 2.68% from 2.74% Tuesday. Yields on longer-term US government debt haven't moved as much as those on short-term debt because investors believed that the government would work out a longer-term solution.
The feeling among stock traders in recent days was that panicking and pulling money out of stocks could leave them missing out on a rally after Washington finally came to an agreement. Investors are also becoming inured to Washington's habit of reaching budget and debt deals at the last minute.
"Investors have become, unfortunately, accustomed to some of the dysfunction," said Eric Wiegand, a senior portfolio manager at US Bank. "It's become more the norm than the exception."
In the summer of 2011, the S&P 500 index plunged 17% between early July and early August as lawmakers argued over raising the debt limit and Standard & Poor's cut the US credit rating from 'AAA,' its highest ranking. The market later recovered.
Stocks also slumped in the last two weeks of 2012 as investors fretted that the US would go over the "fiscal cliff" as lawmakers argued over a series of automatic government spending cuts. Stock also rebounded and embarked on a strong rally that has pushed the S&P 500 up almost 21% this year.
Some were glad that investors could now turn their focus back to the traditional drivers of the stock market such as company earnings, the economy and interest rates rather than worrying whether the latest dispatch from Washington would shake stocks.
"It's a little bit silly in the short term for markets to go down so much on press conferences and then to go up so much on rumors," said Brad Sorensen, director of market and sector research at the Schwab Center for Financial Research. "We've urged investors to pull back a little bit and look at the longer term."
Among stocks making big moves:
- Mattel gained 83 cents, or 2%, to $42.38 after the company's third-quarter net income rose thanks to high demand for dolls like Monster High, Barbie and American Girl. The results were better than Wall Street analysts had forecast.
- Bank of America rose 30 cents, or 2.1%, to $14.54 after the second-largest US bank reported a surge in third-quarter earnings.
- Stanley Black & Decker plunged $12.90, or 14.5%, to $76.54 after the tool maker lowered its profit forecast for the year, citing slower growth in emerging markets and a hit from the US government shutdown.
US Speaker of the House John Boehner pumps his fist as he emerges from a meeting with Republican House members in the US Capitol in Washington. (Reuters Photo)