Wall Street capped a milestone-setting week Friday with a mixed finish for the major U.S. stock indexes and the second all-time high in two days for the Dow Jones Industrial Average.An afternoon sell-off erased modest gains for the S&P 500 that had the benchmark index on track to eke out its own record high for much of the day.Losses for technology companies and retailers, two of the market’s hottest sectors this year, offset gains in energy and industrial stocks.“When you have a big up week like we’ve had, we’re at all-time highs, for people to take a little bit of risk off the table going into the weekend isn’t a big surprise,” said Randy Frederick, vice president of trading and derivatives at Charles Schwab.The S&P 500 index dropped 1.08 points, or 0.04 percent, to 2,929.67, just under its latest all-time high set a day earlier. The Dow gained 86.52 points, or 0.3 percent, to 26,743.50, thanks largely to gains in Boeing and McDonald’s.The Nasdaq composite lost 41.28 points, or 0.5 percent, to 7,986.96. The Russell 2000 index of smaller companies gave up 7.87 points, or 0.5 percent, to 1,712.32.The Dow and S&P 500 each ended the week with their 10th weekly gain in the past 12 weeks.Coming off Thursday’s record-setting rally, trading was listless much of Friday. Two factors may have contributed to the market’s late-afternoon pullback. Friday was “quadruple witching” day, when options and futures contracts expire, often resulting in heavy trading.