(Close): Wall Street closed up, buoyed by fresh hopes that Greece will agree a new bailout deal with its creditors.
But the markets finished down on session highs after Federal Reserve chief Janet Yellen said interest rates may rise this year.
Greece made substantial concessions in its latest proposal to lenders, including new tax rises, in return for $59bn to help cover debts until 2018.
Eurozone finance ministers are meeting on Saturday to discuss a third bailout for Athens.
“Investors are betting that a Greek deal will be struck by this Sunday, and that reduction of risk is boosting stocks today. The removal of the risk of an exogenous shock means better market psychology,” said Jim McDonald, chief investment strategist at Northern Trust in Chicago.
Apple rose 2.7%, breaking a five-day losing streak.