-too-impressively in the morning and then mostly laying around for the rest of the day.
Positive news from retailers was the main reason U.S. indexes posted small gains. Apple helped too by hitting a new high.
Traders in both the U.S. and Europe are on vacation, so volumes were low. And the dog days continued for Facebook. A 4 percent decline left it shares at about half the price of its May initial public offering.
The Dow Jones industrial average rose 25.09 points to close at 13,275.20. The Standard & Poor's 500 index rose 2.65 points to close at 1,418.16. The Nasdaq rose 14.20 points to close at 3,076.59.
The modest gains put some indexes close to their highs for the year. The Dow is now within four points of 13,279, its high for the year set on May 1. The S&P 500 is within one point of its four-year high set on April 1.
The Dow has now risen eight out of the last 11 days and finished the week up a half-percent. The Dow is sporting a gain for the year of almost 8.7 percent for the year, while the S&P 500 is up almost 12.7 percent.
Next week is likely to be more eventful. Investors will get Chinese housing reports, minutes from a closely-watched Federal Reserve meeting, and jobless claims. And Europe's problems, which were mostly off center stage in recent days, return front-and-center as German Chancellor Angela Merkel meets in Berlin with Greek Prime Minister Antonis Samaras to talk about progress in overcoming Greece's debt crisis.
"Next week, you have somebody say something that no one expects, in thin trading it could really move markets around," said John Canally, investment strategist at LPL Financial.
Strong retail earnings and outlooks drove Friday's gains. Gap Inc. shares rose 4.8 percent after it boosted its outlook and posted a 29 percent jump in net income. That suggests the operator of Gap, Old Navy and Banana Republic stores is finally on the way to a turnaround.
Shares of Ann Inc., the parent of retailer Ann Taylor, jumped 20 percent after its second-quarter profit rose 24 percent. Foot Locker rose 1.7 percent after quarterly profits leaped 59 percent, boosted by higher sales, cost controls and a small tax-related gain.
A few retailers did struggle. Sears Holdings Corp. fell 1.3 percent, giving back some of Thursday's big gain.
Expectations for retailers were low, but they beat them, said Lawrence Creatura, portfolio manager at Federated Investors.
"Nobody going into the summer expected a vibrant consumer, so expectations were muted," he said.
Technology stocks saw both highs and lows on Friday.
Apple hit an all-time high, rising almost 2 percent to $648.11. It now has a market value of about $608 billion, almost 50 percent higher than No. 2 Exxon Mobil Corp. at $408 billion.
But declines continued for Facebook and Groupon, the online coupon company.
Facebook closed at $19, about half the value of its initial public offering price of $38. Investors are worried that mobile ads won't bring in as much money as those seen on desktop computers. And Facebook's short-term problems include the expiration of a lock-up period on Thursday that had kept early investors from selling.
Groupon lost another 5 percent to close at $4.75. It has now set a new low every day since Tuesday. Its woes include foreign-exchange rates in Europe and a worry that its business isn't very hard for competitors to copy.
Health care stocks declined a half-percent, the biggest drop among the 10 industry groups in the S&P 500. Pharmaceutical companies led the decline. Pfizer fell 1 percent, and Merck dropped 1.4 percent.
Computer chip maker Marvell Technology Group Ltd. stock dropped 14 percent after a revenue decline sliced its quarterly net income by more than half. Its CEO cited a slowing economy for the trouble.
Global markets edged higher after German Chancellor Angela Merkel gave a new pledge of support for the euro. On Thursday she said that "we feel committed to do everything we can to maintain the common currency." Germany is Europe's economic powerhouse, so its support is critical to the euro's survival. The German DAX rose 0.6 percent.