The stock market extended a streak of erratic trading Wednesday, rebounding from early losses and rising moderately after a drop in oil inventories lifted hopes for an economic recovery.
All of the major stock indexes finished with gains of less than 1%.
The day began with a sharp slide driven by a plunge in China's biggest stock market and followed a trading pattern seen in markets around the world this week. Stocks have alternately advanced and retreated as investors shuttle between worries about the economy's challenges, namely consumer spending and high unemployment, and nascent signs of healing.
While the surprising decline in crude inventories was reassuring, there is still plenty of caution among investors. Even as stocks recovered, Treasury prices held on to most of their gains. Government debt is a safe-haven investment in a struggling economy.
News from the Energy Department that the nation's oil inventory fell by more than 8 million barrels in the past week sent oil prices and then stocks higher, as investors bet that the decline in stockpiles is an indication that energy demand is rising and the economy is improving.
Stocks' sharp turn shows just how sensitive investors are to the latest bits of news, hungry for any positive signs about the economy and confirmation that the more than 40% surge in stocks since March has been warranted.
Analysts say the financial markets are likely to bounce around in the near term as investors try to reconcile their hopes for an economic recovery with the reality that it might not come as fast or be as strong as many people expected.
"Volatility is creeping up," said Brian Nick, investment strategist at Barclays Wealth. "For a while we were seeing volatility steadily declining and maybe we thought we were completely out of the woods when we were not completely out of the woods."
The Dow Jones industrials rose 61.22, or 0.7%, to 9,279.16. The Standard & Poor's 500 index rose 6.79, or 0.7%, to 996.46, while the Nasdaq composite index rose 13.32, or 0.7%, to 1,969.24.
About three stocks rose for every two that fell on the New York Stock Exchange, where volume came to a light 4.35 billion shares, up from Tuesday's 4.28 billion.
The Russell 2000 index of smaller companies rose 5.22, or 0.9%, to 561.65.
The yield on the benchmark 10-year Treasury note, which moves opposite its price, fell to 3.46% from 3.52% late Tuesday. It was trading at about 3.44% before the oil report.
Light, sweet crude jumped $3.23 to $72.42 a barrel on the New York Mercantile Exchange.
Analysts said Wall Street's gains on Wednesday were likely magnified by short-covering, in which investors have to buy stock after having earlier sold borrowed shares in a bet they would fall. That rush to cover ill-timed bets can quicken the market's climb.
At the same time, money managers and investors are still afraid of missing out on a rally that began last March and has continued despite period setbacks.
"I think people would like to buy (stocks) lower, but as the market creeps higher, people are kind of forced to buy," said Nick Kalivas, vice president of financial research at MF Global. "The action today especially has been much stronger than I would hope and it is making me nervous about my bearish view."
Still, the advance in bond prices is one sign that investors don't feel secure.