NEW YORK (CNNMoney.com) -- Stocks finished in the red Wednesday, failing to sustain earlier gain in the last hour of trade, as investors ditched energy shares amid ongoing concerns about BP's ability to survive the Gulf oil spill.
The Dow Jones industrial average (INDU) fell 41 points, or 0.4%, with Exxon Mobil's (XOM, Fortune 500) stock down nearly 2%. Earlier, the index surged 125 points and broke through the 10,000 level for the first time this week, reaching 10,065.
The S&P 500 index (SPX) dipped 6 points, or 0.6%, as Anadarko Petroleum (APC, Fortune 500) sank more than 18% and Tesoro Corp. (TSO, Fortune 500) slipped more than 5%. The Nasdaq composite (COMP) lost 12 points, or 0.5%. Both indexes were up more than 1% earlier in the day.
BP (BP) remained in the spotlight Wednesday, Day 51 of the oil spill disaster, as investors continued to worry how the company will weather the costs of leak. The company's stock sank more than 16% Wednesday.
"The focus turned to BP and investors started to sell off energy stocks," said Kenny Landgraf, principal and founder of Kenjol Capital Management.
While most aspects of the BP's business remain strong, Landgraf said investors are also weighing the uncertainty and risks linked to the company as it faces liabilities and lawsuits.
"Analysts are saying BP is going to be able to pay out dividends on schedule, but the liabilities and the constant stream of oil flowing into the Gulf just don't present a positive view," Landgraf said.
He also said recent volatility in the markets continues to rattle investors.
After a choppy session, stocks rallied during the last hour of trade Tuesday, with the Dow Jones industrial average and S&P 500 ending higher thanks to a spike in commodity and financial shares. The Nasdaq also erased most losses to end just 3 points lower in the session.
Stocks extended Tuesday's eleventh-hour spike, with the Dow logging triple-digit gains, but the rally lost steam in the late afternoon as stocks repeated the late-stage turn.
"There's a lot of meandering and indecision among investors," said Art Hogan, chief market strategist at Jefferies & Co. "We'll continue to see gyrations in the market until investors find a level they're comfortable with, given the recent volatility," Hogan said.
The session's earlier gains were supported by Bernanke's comments that Europe's financial woes should have a limited impact on the U.S. economy.
"The actions taken by European leaders represent a firm commitment to resolve the prevailing stresses and restore market confidence and stability," Bernanke said, testifying before the House Budget Committee. "If markets continue to stabilize, then the effects of the crisis on economic growth in the United States seem likely to be modest."
Investors are relieved to hear that the region's troubles likely won't derail the U.S. recovery, although concerns about Europe will likely resurface again, said Paul Radeke, vice president at KDV Wealth Management.
Bernanke also urged lawmakers to make plans to reduce the nation's own deficit.
An unofficial report showing that Chinese exports spiked 50% in May compared to a year earlier also calmed some investor fears Wednesday.
Jefferies & Co.'s Hogan said that while there's been some moderation in China's "explosive economic growth," the surge in exports suggests that Europe's troubles have not softened demand for Chinese goods.
Economy: The Federal Reserve's "Beige Book," a reading on activity in the nation's 12 economic districts, showed that economic activity continued to improve in May, though many districts reported only modest growth.
A report from the Department of Commerce showed that wholesale inventories rose 0.4% in April, below analysts' expectations of a 0.5% increase.
Bernanke will speak again late Wednesday in Richmond, Va., at a forum on the job market.
World markets: Stocks in Europe also rallied. The DAX in Germany and France's CAC 40 finished almost 2% higher. Britain's FTSE 100 increased 1.2%.
Asian markets ended mixed. Japan's benchmark Nikkei index dipped 1% but the Shanghai Composite rallied 2.8% and Hong Kong's Hang Seng index gained 0.7%.
Dollar and commodities: The euro continued to stabilize against the dollar. The greenback fell 0.2% against the shared currency. The buck fell 0.5% against the British pound and slipped 0.3% against the Japanese yen.
U.S. light crude oil for July delivery climbed $2.39, or 3.3%, to settle at $74.38 a barrel.
After closing at a record high Tuesday, gold for August delivery slipped $15.50, or 1.3%, to settle at $1,228.50 an ounce.
Bonds: Treasury prices were slightly lower, pushing the benchmark 10-year note's yield up to 3.24% from 3.22% late Tuesday. Bond prices and yields move in opposite directions.
Trading volume: Market breadth turned mixed. On the New York Stock Exchange, winners beat losers three to two on volume of 1.7 billion shares. On the Nasdaq, decliners topped advancers almost five to two on volume of nearly 2.3 billion shares.
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.60%||3.68%|
|15 yr fixed||2.73%||2.79%|
|30 yr refi||3.64%||3.72%|
|15 yr refi||2.77%||2.82%|
Today's featured rates:
Tesla CEO Elon Musk had said previously that the automaker would become "cash-flow positive" this year. But in a letter to shareholders Wednesday, Musk signaled that won't be the case after all. More
Iris Hu's Taiwanese immigrants who wanted her to become a doctor or lawyer. Instead she found her own path through art. More
Oakland-based tech startup Clef hosts dinners for the local community in a bid to resist gentrification and unite all types of industries that make up the city. More
In 1998, Ntsiki Biyela won a scholarship to study wine making. Now she's about to launch her own brand. More