NEW YORK (MarketWatch) -- The U.S. stock market closed higher Friday after an abrupt late-day reversal. The benchmark S&P 500 added 7.01 points, or 0.4%, to 1,877.86 and finished the week roughly where it started it. It touched record levels during the week. Dow Jones Industrial Average rose 44.50 points, or 0.3%, to 16,491.31, limiting the weekly loss to 0.6%. It also notched a new record during the week. The Nasdaq Composite's gain on Friday helped the index to register a weekly gain. The index ended the day up 21.30 points, or 0.5%, at 4,090.59 and gained 0.5% over the week.