Traders took heart in ongoing talks among Republicans, Democrats and the president to reopen the government and avert a default with the debt ceiling deadline approaching.
Blue chips gained for the third straight session, indicating investors are betting a deal will be struck in Washington during the weekend.
The Dow Jones industrial average closed up 111.04 points or 0.73 percent to 15,237.11. The Standard & Poor's 500 added 10.64 or 0.63 percent to 1,703.20 and the Nasdaq notched a gain of 31.13 points or 0.83 percent to 3.791.87.
On the New York Stock Exchange, 2,277 issues advanced while 814 declined on volume to 3.161 billion shares.
In Asia, Japan's Nikkei 225 rose 210.03 points or 1.48 percent to 14,404.74 and Hong Kong's Hang Seng index rose 267.02 points or 1.16 percent to 23,318.32. In Europe, the London FTSE 100 rose 56.70 points or 0.88 percent to 6,487.19, the German DAX rose 39.06 points or 0.45 percent to 8,724.83 and the French CAC 40 added 1.87 points or 0.04 percent to 4,219.98.
The 10-year U.S. treasury note was flat to yield 2.687 percent.
On currency markets, the euro rose to $1.3549 and the dollar rose to 98.53 yen. On the Comex division of the New York Mercantile Exchange, gold lost $26.80 to $1,270.10 per troy ounce while silver lost 5.91 cents to $21.305.
On the Chicago Board of Trade December corn lost 5 cents to 4.33 1/4 per bushel while wheat gained 6 3/4 cents to 6.92 1/4. November soybeans lost 20 1/4 cents to $12.67 3/4.