Wall St higher on Greece hopes as commodities lead

U.S. stocks rose on Tuesday, led by commodity-related stocks, as speculation Greece would get help from the European Union to cut the country's deficit weakened the U.S. dollar, lifting prices of oil and basic materials.

Earnings results and upgrades of big names, including Coca Cola Co and Caterpillar Inc , gave further support to the advance, though indexes trimmed gains earlier in the session of more than 1 percent.

Caterpillar shares jumped 4.1 percent to $52.87, making it the biggest gainer on the blue-chip index, while Coke added 3.2 percent to $54.33.

Speculation Greece could get help from the EU underpinned the rise in stocks, even after two European Central Bank policymakers reiterated that Greece must get its own house in order.

Concerns over rising debt in some euro zone countries has sapped confidence from equity markets of late.

Morgan Stanley raised its rating on the industrial sector to attractive from in-line, saying those companies' share prices should catch up to an improving business environment. Rockwell Automation Inc rose 1.9 percent to $48.61 and Ingersoll-Rand Inc added 2.3 percent to $33.63, adding to the Caterpillar boost to the sector.

Coke reported a quarterly profit in line with analysts' estimates as strong volume in China, India and Brazil offset a decline in North America, while overseas sales helped lift McDonald's January same-store sales.

McDonald's shares added 0.5 percent to $63.21.

The euro was having its best day against the U.S. dollar in nearly a month, and a weaker greenback boosted commodity prices and resource shares.