Stocks edged up on Monday as a bounce back in commodities lifted energy and materials shares.

Last week a massive sell-off in materials and oil forced investors out of high-risk assets, pushing stocks to end the week about 1 percent lower, but also leaving room for a further rally.

The energy and materials sectors were the best performers on the S&P 500 as the Reuters/Jefferies commodities index <.CRB> jumped 1.8 percent.

The iShares Silver Trust exchange-traded fund rose 6 percent. Oil futures jumped more than 4 percent and the S&P energy index <.GSPE> advanced 1.6 percent.

Larry McMillan, president of McMillan Analysis Corp said Friday's put-to-call ratio was above 1.00, which is quite unusual.

When it occurs during a declining market phase, it is normally a strong buy signal, he said in a note to clients.

This is usually a sign that 'too many' people have become bearish and -- by contrarian analysis -- the market should be bought.

Stocks seesawed for much of the morning between modest gains and losses after Standard & Poor's downgraded Greece's rating into junk territory on doubts Athens can manage its debt without imposing losses on private bondholders. For details, see

The Greece rating cut weakened the euro against the U.S. dollar, shaving gains off commodities and reducing some risk appetite that had lifted futures.

Europe continues to be a regular cloud on the market, dimming the market's bullish mood, said Christian Magoon, chief executive of Magoon Capital in Lisle, Illinois.

The Dow Jones industrial average <.DJI> was up 73.11 points, or 0.58 percent, at 12,711.85. The Standard & Poor's 500 Index <.SPX> was up 7.77 points, or 0.58 percent, at 1,347.97. The Nasdaq Composite Index <.IXIC> was up 20.07 points, or 0.71 percent, at 2,847.63.

On the S&P 500, 1,340 and 1,333 are key levels that should provide strong support and entice buyers, according to Ryan Detrick, senior technical strategist at Schaeffer's Investment Research.

Despite last week's losses, the S&P 500 held above important technical levels, with the week's low just below 1,330 and Friday's close above 1,340.

Commodities, stocks and the euro have traded in a similar pattern in recent months as low U.S. interest rates boosted risk appetite.

Citigroup Inc , which in recent months accounted for about 6 percent of total composite volume, fell 2.2 percent to $44.19 after the company's 1-for-10 reverse stock split and pressured the market. The S&P financial sector index <.GSPF> was down 0.4 percent.

A group of mortgage bond investors is reaching out for help in a novel bid to force H&R Block Inc's defunct subprime lending unit to buy back billions of dollars in soured home loans, the group's lawyer said on Monday. Shares of H&R Block, best known as a tax preparer, fell as much as 9 percent after Reuters reported the investor campaign. The stock later trimmed losses to 5 percent.

In merger news, Hertz Global Holdings Inc fired a new salvo in a 13-month-long battle for Dollar Thrifty Automotive Group Inc , offering nearly $2.1 billion -- almost double what it offered in April last year -- trying to create the No. 2 U.S. car rental group.

Dollar Thrifty was up 13 percent at $78.70, while Hertz Global lost 0.5 percent to $16.76.

Among companies reporting quarterly results, Sysco Corp gained 11.7 percent to $31.86 after its profit beat analysts' expectations.

(Reporting by Angela Moon; editing by Chizu Nomiyama)