NEW YORK (TheStreet) -- Greece saved the day on Friday, helping to turn around what looked to be a down week for Wall Street.

A Greek debt deal appeared increasingly likely after the country's government offered concessions to its creditors, pushing stocks into rally mode to close the week out with slight gains.

Over the session, the Dow Jones Industrial Average gained 1.2%, or 211 points, the S&P 500 increased 1.2%, and the Nasdaq climbed 1.5%. All benchmark indexes closed with weekly gains, a surprising feat after posting losses in five of the past six sessions.

Investors cheered after Greek Prime Minister Alexis Tsipras submitted the latest proposal of spending cuts. His plan mirrored suggestions from eurozone leaders that Greek voters rejected in a referendum over the weekend. The plan includes cuts to government spending, including pensions, and increased taxes.

"As far as we can gather the 'new' Greek proposal isn't markedly different from the ideas on the table when the Greeks overwhelmingly voted against the thing over the weekend," said David Ader, analyst at CRT Capital. "We suppose that poses political problems on the domestic front ... or is couched as an attempted, but failed, effort to get a better arrangement, but as far as the markets seem concerned is all a moot point."

Athens is seeking 53.5 billion euros ($59.9 billion) in bailout money. If approved, the deal would mark the third bailout loan for Greece. It already has received 240 billion euros in funds since 2010. Eurozone leaders will review the proposal and make a decision on the plan in meetings over the weekend.

Equities maintained highs even in the face of more comments from Federal Reserve Chair Janet Yellen that interest rates could rise later this year. In remarks to the City Club of Cleveland on Friday, Yellen said the economy is improving and the labor market tightening, which could prompt the central bank to raise rates soon.

"Based on my outlook, I expect that it will be appropriate at some point later this year to take the first step to raise the federal funds rate and thus begin normalizing monetary policy," Yellen said.

"Yellen's comments were fairly neutral and kept the Fed's policy options wide open," said Laura Rosner, analyst at BNP Paribas. "A key detail was the mention of two-sided risks around the timing of lift-off. Her forecast is that a rate hike will be appropriate later this year, but 'unanticipated developments could delay or accelerate that first step.'"

Prior to the comments, expectations for a hike had largely been pushed out to 2016 after the minutes from the Fed's June meeting suggested a September hike was off the table given international risks.

TD Ameritrade (AMTD) was the latest organization to experience technical difficulties in a week plagued by blackouts and glitches. The brokerage firm confirmed it experienced "widespread" issues executing orders but said on its Twitter page that the situation had been resolved.

Apple (AAPL) snapped a five-session losing streak on Friday, adding 2.7%. Since the beginning of the month, shares have dropped 1.7%, hard hit by a market selloff tied to worries over instability in Chinese markets and uncertainty in Greece.

Gap (GPS) shares fell 0.5% after the retailer reported a 1% decline in same-store sales in June compared to an expected 0.5% drop. Total sales were flat at $1.54 billion, though rose 2% excluding currency.

Costco (COST) shares added nearly 3% after Oppenheimer upgraded the stock to "outperform" from "perform" and set a $160 price target. The firm said the retailer would likely raise membership fees and cut back on technology spending.

Earnings season kicks into high gear next week with major banks reporting their most recent quarter. JPMorgan (JPM) and Wells Fargo (WFC) will report on Tuesday; Bank of America  (BAC) on Wednesday; and Citigroup (C) on Thursday. 

Also reporting next week, Yum! Brands (YUM) and Johnson & Johnson (JNJ) are due on Tuesday; Delta Air Lines (DAL), Intel (INTC) and Netflix (NFLX) are Wednesday; Google (GOOGL) and eBAY (EBAY) on Thursday; and General Electric (GE) on Friday.