Stocks rallied Thursday afternoon as reports showing a decline in the pace of foreclosures and a narrowing of the trade gap helped offset a mixed reading on the jobs market and a seesawing dollar.

The Dow Jones industrial average (INDU) rose 62 points, or 0.6%, with more than three hours left in the session. The S&P 500 index (SPX) added 6 points, or 0.6%. The Nasdaq composite (COMP) gained 12 points, or 0.6%.

Gains were broad based, with 26 of 30 Dow stocks rising, led by commodities and consumer names. Gainers included Alcoa (AA, Fortune 500), Chevron (CVX, Fortune 500), Walt Disney (DIS, Fortune 500), Johnson & Johnson (JNJ, Fortune 500) and Wal-Mart Stores (WMT, Fortune 500).

Stocks had risen more sharply in the first minutes of trade, with the Dow adding as much as 107 points on the weak dollar. But the dollar turned positive versus the euro and yen, causing stocks to trim some gains.

The weak dollar has helped stocks rally over the past nine months, with the S&P 500 now up 62% from 12-year lows hit on March 9. The weaker dollar has given a boost to dollar-traded commodity shares and the stocks of companies that do a lot of business overseas and therefore benefit from a weaker greenback.

But in the last few weeks, the dollar has zigzagged and so have stocks. Stocks have also been volatile due to the lighter trading volume this month, with many investors opting to coast through year end rather than shake up their portfolios at the end of the tumultuous year.

"We've come an awfully long way in 12 months, both in terms of equity markets and in terms of bonds," said Mark Travis, president and CEO at Intrepid Capital Funds. "I think at this point people are starting to pause and you're not likely to see much of a change in direction for the last few weeks of the year."

Stocks gained Wednesday as the falling dollar boosted commodity stocks and a rise in wholesale inventories and an upgrade of 3M provided some optimism.

Jobs market: The number of Americans filing new claims for unemployment rose last week to 474,000 from 457,000 in the previous week, the Labor Department reported. Economists expected claims to fall to 455,000, on average, according to a Briefing.com survey.

However, continuing claims, the number of Americans receiving benefits for a week or more, declined more than expected. Continuing claims fell to 5.157 million from 5.460 million in the previous week. Economists expected 5.450 million claims.

Economy: Foreclosure filings fell 8% in November from October, according to RealtyTrac, an online marketer of foreclosed properties. That means November is the fourth month in a row in which foreclosure filings have dropped.

But foreclosures are still up 20% from a year ago.

Treasury Secretary Timothy Geithner is speaking before the Congressional Oversight Panel about the government's bailout of the financial system. On Wednesday, Geithner said the Troubled Asset Relief Program (TARP) will be extended through Oct. 2010. It had been set to expire at the end of this month.

Also Wednesday, the Congressional Oversight Panel said that while TARP helped stabilize the banking system, it failed to boost spending or stop foreclosures.

In other news, the Commerce Department reported that the nation's trade gap narrowed in October to $32.9 billion from a revised $35.7 billion in September, thanks to a jump in exports. Economists thought it would widen to $36.8 billion, on average.

The flow of funds report from the Federal Reserve is due around noon. The report is likely to show that household net worth continued to fall in the second quarter, along with home values.
0:00 /5:17Make money in 2010

Companies: Ciena (CIEN) posted a wider-than-expected fiscal fourth-quarter loss as a result of rising costs. The networking gear maker also forecast better-than-expected revenue in the current quarter. But investors focused on the loss, sending shares lower in active Nasdaq trading.

AOL (AOL) began trading Thursday after completing its spinoff from (CNNMoney.com parent) Time Warner (TWX, Fortune 500) Wednesday, ending what is considered to be one of the worst mergers in corporate history. Shares fell 2%.

Warehouse club operator Costco (COST, Fortune 500) posted fiscal first-quarter earnings of 60 cents per share versus 65 cents a year ago, in line with analysts' estimates.

Market breadth was positive and volume was moderate. On the New York Stock Exchange, winners topped losers two to one on volume of 330 million share. On the Nasdaq, advancers beat decliners by a narrow margin on volume of 690 million shares.

World markets: Overseas markets were mixed. In Europe, London's FTSE 100 rose 0.6%, the German DAX rose 0.6% and France's CAC 40 rose 0.5%. Asian markets ended lower.

Commodities: Gold prices rallied and oil prices dipped, giving up bigger morning gains after the dollar turned positive. Dollar-traded oil and gold prices tend to move in the opposite direction of the dollar.

COMEX gold for February delivery rose $5.70 to $1,126.60 an ounce. Gold closed at an all-time high of $1,218.30 an ounce last week.

U.S. light crude oil for January delivery fell 37 cents to $70.30 a barrel on the New York Mercantile Exchange.

Bonds: Treasury prices fell, raising the yield on the 10-year note to 3.48% from 3.42% late Wednesday. Treasury prices and yields move in opposite directions.