Stocks rose on Tuesday amid signs the global economy was recovering and optimism that corporate earnings reports will beat expectations.

Hopes that the global economy was picking up rose after Australia became the first G20 country to raise interest rates since the onset of the financial crisis.

Also, gains in energy and other commodities boosted shares of oil and resource companies as the U.S. dollar fell against a basket of currencies.

Shares of Exxon Mobil Corp was up 1.2 percent at $68.43 and was among the top gainers on the Dow, while the Standard & Poor's energy index <.GSPE> added 1.5 percent.

Shares of industrial companies sensitive to the economy's cycles also rose, including United Technologies Corp , up 1.4 percent at $61.28.

The earnings season is due to kick off on Wednesday, with results from Alcoa Inc . Its shares were up 2.7 percent to $13.78.

Analysts are optimistic that quarterly revenues will be broadly stronger.

I think expectations going into the quarter are for a fairly positive earnings season, said Michael Sheldon, chief market strategist at RDM Financial in Westport, Connecticut. Last quarter about 70 percent of companies beat estimates on ... cost cutting and weak estimates. This quarter, the economy has shown some signs of improvement.

The Dow Jones industrial average <.DJI> was up 87.21 points, or 0.91 percent, at 9,686.96. The Standard & Poor's 500 Index <.SPX> was up 8.84 points, or 0.85 percent, at 1,049.30. The Nasdaq Composite Index <.IXIC> was up 20.31 points, or 0.98 percent, at 2,088.46.

Australia's central bank raised a key lending rate and said it was safe to pull back on stimulus spending. It is the first central bank of the Group of 20 top developed and emerging economies to raise rates.

Among other commodity-related shares, Freeport-McMoRan Copper & Gold Inc advanced 2.5 percent at $69, as benchmark U.S. gold futures hit an all-time high following the dollar's weakness.

On Nasdaq, Microsoft Corp increased 1.3 percent to $24.96 after introducing new software for mobile phones to compete with Apple Inc's iPhone. Apple shares rose 1.1 percent at $188.07.

(Editing by Jeffrey Benkoe)