A late afternoon surge pushed stocks higher for the third day straight. The Dow Jones industrial average finished with a gain of almost 144 points Wednesday, but only after veering much of the day from gains to losses and back again.
Gold plunged $104 an ounce, and government bond yields rose as investors became less fearful.
An encouraging increase in orders for cars, aircraft and other long-lasting goods in July helped ease worries that the U.S. was headed for another recession. The government said durable goods orders rose 4 percent, the biggest increase since March. Orders fell in June.
The stock market spent most of the day looking like a driver given bad directions. The Dow headed lower at the start of trading, turned up 115 points by 10 a.m., then pulled another U-turn and was down 48 points shortly after midday.
Near the end of the day, the Dow retraced its route and rose steadily in the last 90 minutes of trading to end up 143.95 points, or 1.3 percent, at 11,320.71. The Dow had surged 322 points the day before, the biggest gain since Aug. 11.
The Standard & Poor's 500 index rose 15.25 points, or 1.3 percent, to 1,177.60. The Nasdaq rose 21.63, or 0.9 percent, to 2,467.69.
The yield on the 10-year Treasury note jumped to 2.29 percent from 2.15 percent late Tuesday. The yield had fallen below 2 percent last week, a record low, as investors piled into lower-risk assets. Bond yields fall when demand for them rises.
Large swings in the stock market have been commonplace this month. In the week after Standard & Poor's stripped the U.S. of its AAA rating on Aug. 5, the Dow alternated between 400-point gains and losses four days in a row.
That never had happened before.
The stock market often takes sudden turns in late August because fewer traders are at their desks, said Dan Greenhaus, chief global strategist at the brokerage BTIG.
Lower trading volumes often make for a more volatile market.
"It's kind of crazy. I blinked, and in 15 minutes the market had turned," Greenhaus said. "But in the last two weeks of August, wild swings like this are not out of the ordinary."
Another reason for the recent jumpiness is the debate over the possibility of another U.S. recession. Investors have said they are scouring each economic report for evidence.
In this climate, weak economic figures can look encouraging if they're not as bad as most people had feared, Greenhaus said.
Weak economic data can also be seen as a call for the Federal Reserve to announce another rescue effort for the economy, said Abigail Huffman, head of research for Russell Investments.
Indexes had jumped sharply Tuesday as investors brushed off a pair of weak economic reports and an earthquake that shook the East Coast. The Dow has recovered 503 points in three days after a four-week losing streak. Even after this week's rally, the Dow remains 11 percent below the recent peak it reached on July 21 and is down 2 percent this year.
The S&P 500 index, the measure used by most money managers, has surged 4.8 percent this week.
It's still down 8.9 percent this month and 6.4 percent for the year.