U.S. stocks closed higher for a fourth straight day on Wednesday, sending the Standard & Poor's 500 index to its best finish so far this year as industrial and technology companies gained from a weak dollar.

The dollar's fall to a 2009 low helped to make U.S. products more competitive in overseas markets. Industrials, such as earth-moving equipment maker Caterpillar Inc , rose 3.07 percent to $48.41.

Tech stocks were among the big gainers, with Google Inc up 1.2 percent at $463.97.

But Nasdaq's advance was limited by Apple Inc , which fell 1 percent to $171.14. Chief Executive Steve Jobs appeared at a company event after recovering from a liver transplant, and some analysts remarked on how thin the 54-year-old chief executive looked.

The weak dollar seems to be the new catalyst in the market, said Chad Morganlander, portfolio manager at Stifel, Nicolaus & Co in New Jersey.

The Dow Jones industrial average <.DJI> was up 49.88 points, or 0.53 percent, at 9,547.22. The Standard & Poor's 500 Index <.SPX> was up 7.98 points, or 0.78 percent, at 1,033.37. The Nasdaq Composite Index <.IXIC> was up 22.62 points, or 1.11 percent, at 2,060.39.

The dollar's fall pushed oil up, allowing U.S. crude to settle at $71.31 a barrel and helping gold to trade near $1,000 an ounce.

Dow's top boost was Boeing , which rose 2.1 percent to $50.53 after a senior executive said the planemaker expects global air cargo traffic to return to growth next year.

Goldman Sachs upgraded Illinois Tool Works to conviction buy and lifted its price target on Dow components General Electric , United Technologies and 3M Co .

GE shares gained 2.6 percent to $14.87 while Illinois Tool was up 5 percent to $43.93. The S&P Industrials sector <.GSPI> gained 1.55 percent and was the top percentage gainer among S&P sectors.

Also among tech shares, Ebay Inc was also up 3.9 percent at $22.98 after Sanford C. Bernstein upgraded the company, citing the turnaround in its core businesses and in used-auto sales.

The Federal Reserve's Beige Book survey showed half of Federal Reserve districts saw evidence the U.S. economy had improved by the end of August, but labor markets remained weak and retail sales were flat overall.

(Reporting by Angela Moon, Editing by Kenneth Barry)