NEW YORK (

TheStreet

) -- Stocks fell out of favor on Wednesday as a weaker dollar drove investors to oil and gold.

The

Dow Jones Industrial Average

closed 22 points, or 0.2% lower, at 10,835. The

S&P 500

shed 3 points, or 0.3%, to finish at 1,144, and the

Nasdaq Composite

fell 3 points to 2,376.

Energy prices surged 2%, buoyed by a weaker dollar and an Energy Department report that said crude oil inventories declined by 500,000 barrels in the week ended Sept. 24 -- a more bullish read than the build of 2.2 million barrels that analysts polled by Platts had been expecting, though much less than the 2.42 million draw estimated by the American Petroleum Institute.

The EIA also reported a decrease of 3.5 million barrels in gasoline supplies and a 1.3 million-barrel drop in distillates. Analysts had been projecting increases of 800,000 barrels and 400,000 barrels, respectively.

The November delivery crude oil contract settled 2% higher at $77.86 a barrel. Meanwhile, energy sector outperformed the rest of the market with shares of

Suncor Energy

(SU) - Get Report

and

Marathon Oil

(MRO) - Get Report

more than 1%.

The December

gold contract hit a record $1,314.80 Wednesday on seasonal demand and speculation that governments will intervene in the currency markets. Gold for December delivery settled $2 higher at $1,310.30 an ounce.

Darin Newsom, senior commodities analyst at DTN, said a lower dollar was driving the rally in gold and commodities. "The dollar is getting crushed, and commodities are generally perceived as a good investment when the dollar is weak," he said.

Meanwhile, stocks were pacing themselves ahead of fresh economic data on Thursday, including the initial weekly jobless claims numbers and GDP data.

"We have the latest reading on GDP coming out tomorrow, but based on where it is now, we're not going to be growing employment anytime soon. The rate of growth is slowing and that's causing concern for everyone. I think that's what we saw yesterday with the

drop in the consumer confidence numbers," said Kevin Pianko, audit partner at WeiserMazars, adding that recent cautionary statements from certain large-caps regarding the upcoming holiday season weren't helping sentiment.

"I don't think the government will do anything to support the recovery until after the elections but uncertainty regarding taxes is certainly weighing on people because they can't plan appropriately. They aren't sure if they'll able to hire new people and invest in new equipment," Pianko said.

Earlier, mortgage applications fell 0.8% on a seasonally adjusted basis from the previous week, according to the Mortgage Bankers Association. The decline was milder than the previous week's release showing that applications declined by 1.4%.

Within the Dow,

DuPont

(DD) - Get Report

,

American Express

(AXP) - Get Report

and

Intel

(INTC) - Get Report

were the biggest laggards, while Hewlett-Packard,

Boeing

(BA) - Get Report

and

Chevron

(CVX) - Get Report

were the best performers.

Sandridge Energy

(SD) - Get Report

, an Oklahoma City-based natural gas and oil company, saw shares jump 4.5% higher to $5.50 after it published promising production results from a series of wells in its Mississippi horizontal acreage.

Shares of

Morgan Stanley

(MS) - Get Report

were trading flat at $24.48 after

Goldman Sachs

cut its third-quarter outlook for Morgan since light trading activity is likely to weigh on profits.

AIG

(AIG) - Get Report

is preparing a fast-track plan to pay back taxpayers that includes converting roughly $49 billion in preferred shares into common shares that can be distributed or sold over time, according to a

Wall Street Journal

report. The conversion could occur at $35 a share and will likely take effect in the first half of 2011. AIG's stock fell 0.5% to $37.50.

Green Mountain Coffee Roasters

(GMCR)

plunged 16% to $31.06 following the

disclosure of an SEC inquiry into the company's revenue recognition practices.

Indian tech company

Satyam Computers

(SAY)

tumbled 10% to $4.08 after the company reported a loss for the March 2010 fiscal year. The report was the first one after the company's sale to

Tech Mahindra

following the discovery of a major accounting fraud by its original promoter Ramalinga Raju.

Thor Industries

(THO) - Get Report

soared 14% to $32.95 after it reported late Tuesday that its profits rose 64% to $40.6 million or 78 cents a share, beating analyst expectations of 62 cents.

Shares of

Hewlett-Packard

(HPQ) - Get Report

advanced 2.3% to $42.53 the morning after it issued better-than-expected guidance for 2011. The company anticipates adjusted earnings of between $5.05 and $5.15 a share and sales between $131.5 billion and $133.5 billion, compared with analysts' estimates for a profit of $4.99 a share on sales of $131.42 billion.

Borders

(BGP)

rolled out the Kobo 2, a Wi-fi equipped e-reader selling for $139 representing the bookseller's latest attempt to compete with gadgets from

Amazon

(AMZN) - Get Report

and

Barnes & Noble

(BKS) - Get Report

. Shares of Borders were up 2.5%, to $1.25 while Amazon lost 0.4% to $158.99, and Barnes & Noble was down 0.3% to $16.44.

Senior management at

BP

(BP) - Get Report

got a shake-up ahead of Bob Dudley's start as CEO of the company. Mark Bly will head BP's new safety division, and Andy Inglis will relinquish his role as head of the company's upstream business. BP shares added 1.8% to $40.

Nintendo

lowered its earnings and sales outlooks for the year ending March 2011, citing a swift rise in the yen, current sales performance and expected sales for the upcoming holiday season.

The dollar was trading lower against a basket of currencies, with the dollar index down by 0.3%, while the benchmark 10-year Treasury note fell 10/32, strengthening the yield to 2.497%.

Global stocks earlier in the day were pressured by news of protests against austerity measures throughout Europe. The instability furthered fears about the eurozone amid speculation that more debt downgrades may be in the works after Moody's delivered a three-notch cut to its rating on

Anglo Irish Bank

.

Overseas, Hong Kong's Hang Seng gained 1.2%, and Japan's Nikkei advanced 0.7%. The FTSE in London fell 0.2%, and the DAX in Frankfurt declined 0.5%.

--Written by Melinda Peer and Shanthi Venkataraman in New York

.

Disclosure: TheStreet's editorial policy prohibits staff editors and reporters from holding positions in any individual stocks.