NEW YORK — Stocks ended mostly higher Friday as major indexes extended gains for a fourth week in a row, a rare stretch for this year.
After flitting between tiny gains and losses for most of the day, the Standard and Poor’s 500 index rose just two-hundredths of 1 percent to close at a record high. The Dow Jones industrial average ended slightly lower, but the losses were limited by a gain in energy shares, which have been falling sharply in recent months as oil prices drop.
As of Friday, the S&P 500 is up 10 percent so far this year.
“The market has continued to surprise me with its strength,” said Uri Landesman, president of Platinum Partners, an investment fund in New York. “It’s been almost a six-year party … and it takes a lot to upset that momentum.”
The S&P 500 rose 0.49 points to 2,039.82. The Dow slipped 18.05 points, or 0.1 percent, to 17,634.74. The Nasdaq composite rose 8.4 points, or 0.2 percent, to 4,688.54.
Stocks have been mostly rising since Oct. 15, when the S&P 500 nearly fell into a “correction,” a trading term for a drop of 10 percent or more from a recent peak. Generally strong corporate earnings results and solid U.S. economic data have lifted shares sharply since then.
On Friday, investors got more good economic news. The Commerce Department reported that retail sales rose 0.3 percent in October after a drop in September.



