Traders on the floor of the New York Stock Exchange on Tuesday. / Richard Drew, AP

by Adam Shell, USA TODAY

by Adam Shell, USA TODAY

NEW YORK - The big bet on Wall Street that fueled Wednesday's stock market rally proved to be correct as top Senate leaders say they have struck a bipartisan deal to reopen the government and extend the nation's debt ceiling.

The Dow Jones industrial average jumped 205.82 points, or 1.4%, to 15,373.83 and the Standard & Poor's 500 index gained 23.48 points, or 1.4%, to 1,721.54. The S&P 500 is now only four points below its record close of 1,725.52 set Sept. 18.

The deal likely marks the end of a debt impasse that has shut down the government for 16 days. It will also remove the threat of the nation defaulting on its debts for the first time in history and reduce the level of market uncertainty.

It also, of course, needs to be ratified by votes in both houses of Congress and signed into law by President Obama. House leaders said they would accept it and allow a vote on the bill.

The deal calls for the government to reopen and be funded through Jan. 15 and the debt ceiling to be extended through Feb. 7.

If the deal closes, investors will breathe a big sigh of relief and refocus their attention on more mundane matters such as corporate earnings and the economy, says Nicholas Sargen, chief investment officer at Fort Washington Investment Advisors.

"If a default is ruled out (by a "Yea vote), the market will say it's time to refocus on business fundamentals," says Sargen, adding that he doesn't think the nearly three-week budget fight will cause "lasting damage to the economy or the nation's financial reputation."

Stocks have held up fairly well during the government shutdown, a sign that Wall Street was correctly betting that Washington would reach an agreement. The market began to price in a positive resolution last week, fueling a big market rally that saw the Dow climb more than 500 points.

Whether stock prices will skyrocket even more is in question, given the market's sharp rise in anticipation of the crisis ending without financial calamity, says Rod Smyth, chief investment strategist at Riverfront Investment Group.

"The market never panicked and never priced in the bad scenario, so it's unlikely to storm away to the upside if we get a resolution," says Smyth.

While stocks shot up, investor fear took a big dive. A closely watched Wall Street fear gauge fell by 20% on news that a deal had been worked out.

The key reason investors thought a deal would get done: the fallout of a U.S. default would be so unpredictable and potentially damaging to the financial system that few people on Wall Street believed Congress would let such a self-inflicted wound occur.

"We have to assume that it is in no one's interest for the government to default," says Rob McIver, co-portfolio manager at Jensen Quality Growth Fund.

The market for U.S. 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, which would have come due around the time a default may have occurred, to be less risky.

This type of short-term bond is typically referred to as a risk-free asset, but investors had been selling these bills because they are the most likely government security to be hit by a U.S. default, according to Boris Rjavinski, an interest rate strategist at UBS.

The yield on the 10-year Treasury note edged down to 2.67% from 2.74% Tuesday. Yields on longer-term U.S. 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.