Stocks climbed to three-week highs on Wednesday and the euro rose to its highest in nearly a month against the dollar after Slovakia reached a deal to strengthen the euro zone rescue fund, boosting investor confidence.

On Wall Street, the S&P 500 traded above 1,200 for the first time in three weeks, taking the benchmark near the upper end of a range where it has been stuck since early August. The S&P has gained over 13 percent from last week's 2011 low while the Dow industrials turned positive for the year.

Brent crude oil rallied for a third straight day , helping the 19-commodity Reuters-Jefferies CRB index .CRB climb again after briefly posting losses earlier in the session.

Government bond prices fell, with 10-year U.S. Treasury notes in a dismal auction as fewer investors took to safe-havens amid a growing appetite for risk. Gold also lost its safety appeal, with bullion trading around $1,679 (1,065 pounds) an ounce, off its intraday high above $1,691.

Investor appetite for risk heightened after lawmakers in Slovakia struck a deal to ratify more powers for the euro zone's rescue fund, effectively ending for now a crisis for the euro, which also weighed on equities and other risky assets.

Slovakia is the last country in the 17-member currency zone left to approve the revamped European Financial Stability Facility.

Europeans feel very comfortable that a plan has been put in place with respect to their banks and Greece, and the EFSF is going to solve the problem for now, said Peter Boockvar, equity strategist at Miller Tabak & Co in New York.

Investors are also looking to the European Union to announce a bank recapitalization plan designed to cushion the impact any default by Greece could have on the region's banks.

Markets are clearly still hoping for a comprehensive plan to tackle the (euro zone) debt crisis. This may continue to support the market over the next couple of months, said Philippe Gijsels, head of research at BNP Paribas Fortis Global Markets.

The euro extended gains, helped partly by surprisingly strong data on the euro zone's August industrial output.

The euro rose 1.3 percent against dollar to $1.38209 after it broke an options barrier at $1.3700. It touched a high of $1.38340 on the EBS trading platform, its strongest since September 16.

The euro also rallied against the yen, up more than 2 percent, peaking at 107.06 yen, the highest since Sept 9.

At 1:45 p.m. (1745 GMT), the Dow Jones industrial average .DJI was up 172.41 points, or 1.51 percent, at 11,588.71. The Standard & Poor's 500 Index .SPX was up 20.82 points, or 1.74 percent, at 1,216.36. The Nasdaq Composite Index .IXIC was up 39.64 points, or 1.53 percent, at 2,622.67.

Bank shares led the advance. Citigroup (C.N) gained 5.4 percent to $29.33.

The MSCI world equity index .MIWD00000PUS gained 1.9 percent to 299.57, its highest since September 19. The benchmark index is nearly 13 percent above a 15-month low hit just a week ago.

The broad FTSEurofirst 300 index of European stocks .FTEU3 rose 1.6 percent to close at a nine-week high of 977.02 points.

U.S. bonds extended losses after the Treasury auctioned $21 billion in 10-year notes. The benchmark Treasury note fell 28/32 in price, to yield 2.2565 percent, up from 2.208 percent at Tuesday's close.

The 30-year bond lost three points in price, yielding 3.24 percent, up from 3.19 percent on Tuesday.