By Anora Mahmudova and Carla Mozee, MarketWatch

Main indexes set to record quarterly losses

U.S. stocks were modestly higher on Tuesday with the main indexes attempting to recover from the steepest declines of the year.

Monday's 2% fall erased year-to-date gains by the S&P 500 and the Dow industrials. The key benchmarks are on track to post monthly and quarterly losses.

The S&P 500 added 8 points, or 0.4%, to 2,066. The Dow Jones Industrial Average rose 63 points, or 0.4%, to 17,660. The Nasdaq Composite gained 25 points, or 0.5% to 4,983.

Tuesday's bounce appeared to be fueled by news that Greece and its lenders may find a last-minute measure to avert a default, after Greece proposed a two-year deal using the eurozone bailout fund, according to The Wall Street Journal. Market reaction to domestic economic reports was muted.

Also read: Athens considers last-minute bid to secure a deal (http://www.marketwatch.com/story/greek-debt-crisis-athens-considers-last-minute-bid-to-secure-a-deal-2015-06-30)

Frank Cappelleri, executive director at Instinet LLC, said Monday's selloff did a lot of technical damage on the charts.

Here's what technical analysts are watching after the year's biggest selloff (http://www.marketwatch.com/story/heres-what-technical-analysts-are-watching-after-the-years-biggest-selloff-2015-06-30)

"This is a holiday-shortened week and with Greece news driving the markets, we expect some erratic trading. The concern here is the kind of pullback we last saw in October. Traders will be watching the 2,040 level on the S&P 500 very closely," Cappelleri said.

Greece on Tuesday is slated to miss its 1.54 billion euro ($1.71 billion) payment to the International Monetary Fund, and the country's bailout program also expires the same day. Questions remain about the future of the country as it heads toward a referendum (http://www.marketwatch.com/story/yay-or-nay-greeces-referendum-will-be-complicated-2015-06-29) Sunday that is being framed as a vote on whether Greece should stay in the eurozone.

Data: Investors digested a trio of mixed economic reports. U.S. house prices rose in April, supported by the spring sales market, with gains in all the cities tracked by the Case-Shiller 20-city composite index released Tuesday, however the gain fell short of expectations.

Chicago PMI rose in June but remained under the 50 level, indicating a slight contraction in conditions. That's the fourth month below 50 this year.

Separately, U.S. consumer confidence jumped in June, according to an index released by The Conference Board on Tuesday, topping forecasts.

Stocks to watch: ConAgra Foods Inc. (CAG) shares rose 0.9% after the company reported fiscal fourth-quarter earnings and said it's planning to exit the private-label business as it focuses more on growing its consumer and commercial foods segments.

Pentair PLC (PNR) shares jumped 5% after Trian Fund Management L.P. revealed a 7.24% stake in the companies. Trian is asking the maker of pumps and valves to buy rivals and consolidate fragmented market.

General Electric Co. (GE) has agreed to sell its European private-equity finance business to Japan's Sumitomo Mitsui Banking Corp. for about $2.2 billion. The stock added 0.5%.

For more on today's notable movers read Movers & Shakers column (http://www.marketwatch.com/story/microsoft-apollo-education-conagra-in-spotlight-2015-06-29).

Other markets: Chinese shares bounced back from heavy selling (http://www.marketwatch.com/story/china-shares-fall-as-rest-of-asia-is-calm-2015-06-29) seen Monday, pulling the benchmark back from losses that had put it in bear-market territory. Japan's Nikkei ended higher by 0.6%. But European stocks extended their losses (http://www.marketwatch.com/story/european-stocks-mired-in-red-with-greek-default-expected-2015-06-30) as investors continued to wrestle with Greek-related worries.

Oil prices were higher, while gold futures lost ground.

Subscribe to WSJ: http://online.wsj.com?mod=djnwires