Stocks climbed back from lows after minutes from the last major Fed meeting were released. The Standard & Poor's 500 index, down most of the day, eked out a gain of 0.32 point to 1,413.49.
The price of gold rose, as it sometimes does when investors think the Fed is about to pump money into the economy. Gold climbed $14 an ounce to $1,657, its highest level since early May, in trading after the day's official close.
When investors expect stimulus from the Fed, they sometimes buy gold in anticipation of a weaker dollar or because of inflation fears.
The minutes, from a meeting July 31 and Aug. 1, showed that "many members" of the Fed's Open Market Committee felt that additional action would be warranted unless the economic recovery shows "substantial and sustainable strengthening."
The minutes also showed that many officials favored pushing any increase in short-term interest rates beyond the Fed's current target of late 2014. Many economists think the target will be pushed to mid-2015.
Doug Cote, chief market strategist at ING Investment Management, wondered why the Fed needed to act. He said major economic data recently, including on jobs and consumer spending, have showed the recovery picking up.
"Why do an extraordinary form of stimulus in a moderately recovering economy?" he said.
On Wednesday, the National Association of Realtors reported that Americans bought more homes in July than in June and prices rose, evidence of a recovering housing market. The 2.3 percent increase in sales from June was the first gain in three months.
But the rate of home sales, at 4.47 million annually, was below the pace of April and May and well below the rate of roughly 5.5 million that economists consider healthy.
The dollar fell sharply against most major currencies after the Fed minutes came out. Additional bond purchases by the Fed could push interest rates lower and weaken the dollar.
The euro rose to $1.2530 in late trading from $1.2467 late Tuesday. The euro jumped as high as $1.2538 after the minutes were released, its highest against the dollar since July 5.
Earlier in the day, Asian markets closed down after Japan posted a trade deficit for July, reversing a year-ago surplus and adding to signs of a global economic slowdown.
Bond traders have become skittish about the Asian slowdown and the debt crisis in Europe. Investors returned to the haven of U.S. Treasurys, sending the yield on the benchmark 10-year down to 1.72 percent from 1.81 percent late Tuesday.
Riding an improving housing market, high-end homebuilder Toll Brothers reported 46 percent growth in its quarterly net income after delivering more homes at higher prices to its customers. Its stock rose $1.20, close to 4 percent, to $33.01.
Toll Brothers caters to the luxury sector, which has withstood the economic downturn better than others. Its target market includes households that making more than $100,000 a year, with better credit and more job security.
The Commerce Department reported last week that applications for building permits rose to their highest level since August 2008, which signals that construction companies are growing more confident about the housing landscape.
Other homebuilder stocks also made big gains: PulteGroup gained 50 cents, or close to 4 percent, at $13.29 and Lennar rose $1.17, or close to 4 percent, at $32.35.
Among other stocks making big moves Wednesday:
— Dell slumped more than 5 percent and traded near a 52-week low. It was the worst-performing stock in the S&P 500. The computer maker said PC sales remained weak in its fiscal second quarter, and it forecast a disappointing third quarter and lowered its full-year profit forecast. Its stock slid 66 cents to $11.68.
— Williams-Sonoma jumped close 12 percent after the kitchen and home store chain reported a 10 percent jump in profit. Its stock rose $4.45 to $42.68.
— Fifth Third Bancorp's stock shot to a 52-week high after the Fed allowed the bank to raise its dividend and buy back more of its own stock. The Cincinnati regional bank's stock was up 3 percent to $14.81, a jump of 42 cents. The stock had reached $15.02 in morning trading, a high for the past year.
— Discover Financial Services stock gained 4 percent, or $1.43, to $38.43 after announcing a partnership with PayPal. More than 7 million stores that take Discover cards will be able to process PayPal payments beginning next year.