NEW YORK (CNNMoney) -- U.S. stocks rallied Wednesday, with the Dow and S&P 500 logging their best gains of the year, as investors grew hopeful that more stimulus for the global economy is around the corner.
"There's a lot of optimism from rumors that there will be some type of stimulus coming really soon," said Ryan Detrick, senior technical strategist at Schaeffer's Investment Research. "This might light the fuse and spark [the markets] higher."
The Dow Jones industrial average () jumped 287 points, or 2.4%, its best one-day jump since Dec. 20. The day's gains pushed the blue-chip index back into positive territory for 2012. The S&P 500 ( ) rose 30 points, or 2.3%, its best daily performance since Dec. 20. The Nasdaq ( ) added 67 points, or 2.4%.
Investors were encouraged after Atlanta Fed president Dennis Lockhart, who is a member of the Federal Reserve's policy-setting committee, said that continuing Operation Twist is now "an option on the table." The policy, which swaps short-term bonds for ones with a longer duration in order to keep interest rates low, is currently set to expire at the end of the month.
Stimulus hopes also grew for Europe. While the ECB left interest rates steady at 1% on Wednesday, the decision was not unanimous.
"A few members would have preferred to have a rate cut today," said bank president Mario Draghi. Many analysts expect the ECB to cut interest rates by a quarter percentage point at its next meeting in July, which would bring rates to a record low.
Draghi also said the central bank will continue to monitor developments closely and stands ready to act if necessary.
The ECB is under pressure to take additional steps to support the economy and restore confidence in financial markets. But Draghi stressed that monetary policy cannot make up for a lack of action by euro-area political leaders.
"There are some problems in the euro area that have nothing to do with monetary policy," said Draghi. "I don't think it would be right for monetary policy to fill other institutions' lack of action."
Still, his comments were enough to spark optimism that leaders will take action as soon as needed.
Meanwhile, the EU also unveiled a plan Wednesday that would call for a Europe-wide banking union, which would deal with future banking crises on the continent rather than leaving them in the hands of their already struggling national governments. A specific size of the rescue fund to be created was not disclosed.
The proposal may take years to be enacted, so it won't do much to address Europe's current banking crisis.
Eurostat, the statistical office of the European Union, did not revise its estimate of first-quarter gross domestic product, the broadest measure of the economy. The agency said the 17 nations that use the euro saw a 0.1% decline in GDP in the quarter, while the 27 nations in the European Union had a combined 0.1% increase. The figures were an improvement from the fourth quarter's decline of 0.3% in both the eurozone and the EU.
U.S. stocks finished higher Tuesday, but gains were limited as investors weighed an upbeat U.S. economic report against Europe's ongoing debt problems.
World markets: Asian markets ended mixed. The Shanghai Composite ( ) slid 0.1%, while the Hang Seng ( ) in Hong Kong added 1.4% and Japan's Nikkei ( ) gained 1.8%.
European markets finished with strong gains. Britain's FTSE 100 () rose 2.2%, the DAX ( ) in Germany gained 2.2% and France's CAC 40 ( ) jumped 2.1%.
Economy: First-quarter productivity was revised to a 0.9% decline from a previous estimate of a 0.5% decline. Analysts were expecting a drop of 0.8%.
The Federal Reserve's Beige Book, a report covering economic activity in the bank's 12 regional districts, suggested that the overall economy expanded at a moderate pace in April and May. While the economic outlook remains positive, the Fed said its "contacts were slightly more guarded in their optimism."
Companies: Nasdaq OMX Group ( ) said it plans to spend $40 million to compensate trading firms for losses caused by glitches in Facebook's IPO.
Facebook (a new low of $25.52. Shares are still about 30% below the IPO price of $38.) shares rebounded Wednesday, after hitting
Chesapeake Energy (Fortune 500) is in advanced talks to sell almost all of its pipeline assets for more than $4 billion to Global Infrastructure Partners, according to a Bloomberg report, which lifted Chesapeake shares.,
Shares of Hovnanian () jumped after the homebuilder posted a second-quarter profit on a rise in home sales.
Tempur-Pedic International () shares lost nearly half their value after the mattress company said it expects its second-quarter profit to plunge 50% amid increased competition. The company also slashed its outlook for the year.
Oil for July delivery rose 73 cents to settle at $85.02 a barrel.
Gold futures for June delivery climbed $17.30 to settle at $1,634.20 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury fell, pushing the yield up to 1.65% from 1.56% late Tuesday.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.63%||3.71%|
|15 yr fixed||2.76%||2.84%|
|30 yr refi||3.63%||3.74%|
|15 yr refi||2.79%||2.89%|
Today's featured rates: