Quarterly results helped boost the S&P consumer discretionary sector index, with TJX (TJX.N) up 7.4 percent at $42.65 and Dick’s Sporting Goods (DKS.N) up 9.2 percent at $51.59. The S&P retail sector index .RLX rose 1.5 percent. U.S. retail sales rose 0.1 percent in April, slightly below expectations. However, details in the Commerce Department’s report indicating underlying strength in demand and a rebound in manufacturing activity in New York State calmed concerns that the economy was stalling. “Earnings have been pretty good and supporting the market to a certain degree,” said John Manley, chief equity strategist at Wells Fargo Funds Management in New York. “People are still worried about things, but earnings surprises are more positive than not, and that is encouraging them to stay in stocks – if not move into stocks.” Data showing an index of home builders’ sentiment at a five-year high in May helped lift the sector’s shares. The PHLX housing index .HGX rose 1.8 percent. Amazon (AMZN.O) shares also lifted retailers and gave a boost to the Nasdaq after Credit Suisse upgraded the stock to “outperform” and raised its price target to $270 from $190. The stock jumped 2.6 percent to $228.72. The Dow Jones industrial average .DJI gained 32.88 points, or 0.26 percent, to 12,728.23. The S&P 500 Index .SPX added 3.63 points, or 0.27 percent, to 1,341.98. The Nasdaq Composite .IXIC rose 21.83 points, or 0.75 percent, to 2,924.41. Attempts to form a government in Greece collapsed, sending European equities lower on the prospect that those opposed to the terms of an EU/IMF bailout and a German-led push for austerity could sweep to victory in new elections. “The Greeks and Germans seem to be playing an enormous game of chicken. It is unsettling to the market that those who would rather renegotiate the existing agreement seem to be gaining strength after the election,” said Wells Fargo’s Manley. On Monday, the S&P 500 index closed at its lowest level since February. Concerns about Greece have been a primary reason for the S&P 500’s weakness. Groupon Inc (GRPN.O) reported its first quarterly profit after the closing bell on Monday. Its stock climbed on Tuesday, rising 12 percent to $13.14. JPMorgan Chase & Co (JPM.N) rose 3.2 percent to $36.92, mostly unchanged this week after falling more than 11 percent last week after disclosing a trading loss of at least $2 billion. Pressure mounted on the bank to reclaim some of the millions of dollars it paid to the executives who oversaw the wrong-way trades.