NEW YORK — Stocks finished mostly higher Friday, after shifting between gains and losses throughout the trading session, as relief over European progress in combating regional debt helped key indexes score weekly gains.
“When Europe didn’t implode and even came up with a ‘plan’ to fix its pervasive debt problems, that left the shorts with no room to hide,” said Brian Greenberg, owner of wealth-management firm Brian Greenberg & Associates.
The Dow Jones industrial average rose 22.56 points, or 0.2 percent, to close at 12,231.11, with 16 of its 30 components climbing, logging its fifth consecutive weekly gain.
Scoring a 3.8 percent weekly rise, up 12 percent for the month to date, the S&P 500 index added 0.50 points, or 0.04 percent, to 1,285.09. The Nasdaq composite fell 1.48 points, or 0.1 percent, to close at 2,737.15, a level that has it up 3.8 percent on the week and 9.9 percent ahead for October so far.
“Emerging markets such as Russia and China have strongly outperformed, small-cap indices like the Russell 2000 index have advanced more than the S&P 500” and financials had been top performers since last week, said Michael Gayed, chief investment strategist at Pension Partners.
Those factors are what “differentiates the move up in equities” last week from other attempts.
The Dow and S&P 500 are in line to tally double-digit percentage gains for October. Putting the recent surge in context, Dan Greenhaus, chief global strategist at BTIG, wrote in e-mailed commentary that the near-20 percent decline in the S&P 500 seen over July and August came, in his view, on two false assumptions: “First, that the U.S. was in or imminently entering a recession, and second, (that) the euro area was on the verge of collapse.” Greenhaus argues that if neither was accurate, the S&P 500 belongs closer to 1,300 than to 1,100.
Investors would be wise to temper their expectations, especially in the week ahead — the final big one for quarterly earnings and with both the Federal Reserve and the European Central Bank meeting and holding news conferences, he said.



