U.S. stocks extended three straight days of gains on Wednesday as favorable comments from Goldman Sachs lifted the industrial sector while rising crude prices boosted energy stocks.

If the gains hold for the session, it would put the S&P 500 close to its highest level for the year.

The Nasdaq rose more than 1 percent as Apple Inc hit a year's high share price before a news conference where it is expected to update its line of iPod music players. Chief Executive Steve Jobs was in attendance after suffering a recent illness, according to media reports.

Occidental Petroleum climbed 1.7 percent to $76.36 and the S&P Energy index <.GSPE> rose 0.8 percent as October crude futures gained 1.7 percent to $72.27 per barrel, boosted by a weaker U.S. dollar.

The market is continuing to bet on the reflation trade, said Chip Hanlon, the president of Delta Global Advisors in Huntington Beach, California. As central bankers reiterate their commitment to low rates and stimulus programs, oil, gold and the stock market will all rise in tandem. Everything rises, except the dollar.

The Dow Jones industrial average <.DJI> gained 75 points, or 0.79 percent, to 9,572. The Standard & Poor's 500 Index <.SPX> rose 10 points, or 1 percent, to 1,036. The Nasdaq Composite Index <.IXIC> put on 28 points, or 1.4 percent, to 2,066.

S&P closed at its highest so far this year at 1,030.98 on August 27.

Gold broke through the $1,000 level intraday as the U.S. dollar <.DXY> fell to its lowest in 2009.

Also lifting stocks was Goldman Sachs' upgrade of the multi-industry sector. The bank said the group has a tendency to outperform when the Institute for Supply Management manufacturing index makes a sustainable move above 50, the threshold for expansion.

The ISM said last week its index of factory activity rose to 52.9 in August.

Goldman 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.2 percent to $14.82 while Illinois Tool was up 4.5 percent to $43.74. The S&P Industrials sector <.GSPI> gained 1.6 percent and was the top percentage gainer among S&P sectors.

Limiting the Dow's upside was McDonald's Corp , which reported August same-stores sales below expectations. The stock fell 1.8 percent to $55.16 and was the top drag on the index.

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

The Nasdaq outperformed the other indexes after online auctioneer eBay was upgraded to outperform at Bernstein, lifting its stock 4.2 percent.

Also on Wednesday, data from the Mortgage Bankers Association showed that mortgage applications surged last week, with demand rising to its highest level since late-May.

Investors will get a look at the state of the economy after the Federal Reserve issues the Beige Book, a summary of economic conditions in the 12 Fed districts at 2:00 p.m. (1800 GMT).

(Reporting by Ryan Vlastelica; Editing by Kenneth Barry)