Greece and euro zone finance ministers reached deal on Friday to extend the Greek bailout by four months.
"This obviously is a relief for the markets," said Peter Cardillo, chief market economist at Rockwell Global Capital. "Looks like my 2,125, 2,150 (on the S&P 500) likely to be achieved early next week. (We have) light volume but we're at record highs."
Read MoreDeal reached between Greece, creditors: Reports
"Looks like the agreement ... was already "baked" into the market. Not much of a surprise here," said Lance Roberts, general partner at STA Wealth Management. "The real issue is that this agreement only gets them to the nextbig debt maturity which puts them back at this all over again. A kick the can down the road for now."
The U.S. 10-year Treasury yield rose to trade near 2.13 percent on the Greece news.
"Obviously (we) see safe haven money exit the bond market (and) come flying into stocks," Cardillo said.
Stocks opened in the red on Friday, with the Dow initially falling more than 100 points and only the Nasdaq holding mildly higher.
The Eurogroup of regional finance ministers was expected to make an announcement on Greece's loan extension proposal on Friday. Germany rejected the plan on Thursday and called it a "Trojan horse" with "immense room for interpretation."
Greece faced the risk of default and exit from the euro zone if the country did not obtain enough funding or an extension beyond the Feb. 28 deadline.
In other geopolitical news, the Financial Times reported that NATO forces need to prepare for a major assault by Russia on an eastern European member state.
The euro reached session highs against the U.S. dollar of about $1.14 before paring gains. The U.S. dollar traded lower against major world currencies.
Read MoreNasdaq 5,000: Why this time it's different (really)
"I think this market still has legs ... as long as corporate earnings stay positive," said Doug Cote, chief market strategist at Voya Investment Management.
Deere said it earned $1.12 per share for its latest quarter, well above the 83 cent consensus estimate, with revenue also beating forecasts. However, the farm machinery manufacturer highlighted difficult global market conditions and said it expected a 17-percent drop in equipment sales for 2015.
The outlook cut is "a global macro call," Hogan said. "It's really Brazil. If you think about John Deere and Caterpillar, they're global players."
Barclays downgraded Wal-Mart to "equal weight" from "overweight," saying the retailer is unlikely to see near-term benefits from its just-announced increase in wages that offset the higher expenses.
Newmont Mining earned an adjusted 17 cents per share for its latest quarter, 7 cents above estimates, with its revenue also beating forecasts. Newmont said its "growth projects" are doing particularly well.
The Noodles restaurant chain missed estimates by a penny with adjusted quarterly profit of 13 cents per share, with revenue falling just below estimates as well. It also cut its full-year guidance, as same-restaurant sales growth fails to meet prior forecasts.
In other corporate news, Pacific Investment Management Co. said Paul McCulley is stepping down as chief economist and managing director.
The Markit PMI Manufacturing flash was 54.3, up from 53.9 in January and the highest reading since November but weaker than the 55.9 average for all of 2014. The data also showed production levels rose at their fastest pace in four months.
"That was good but all eyes are on Europe at the moment," said Bill Stone, chief investment strategist at PNC Asset Management.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 14.
High-frequency trading accounted for 47.5 percent of February to date's average daily trading volume of approximately 7 billion shares, according to TABB Group. During the peak levels of high-frequency trading in 2009, about 61 percent of 9.8 billion of average daily shares traded, were executed by high-frequency traders.