Markets closed out a volatile week quietly, registering modest gains as part of what is shaping up to be the market's best month ever.
After waffling through most of the session, the major averages closed slightly higher, with the Dow registering a 3.4 percent gain that has helped boost the market about 12 percent for October. It was the fifth consecutive weekly gain for the Dow.
The uneventful day came after a 3 percent rally Thursday sparked by an apparent deal regarding the European debt crisis.
As questions started to creep into the details of the deal, traders chose to take some risk off the table as another profitable week wound to a close.
"Time to sell the garbage and buy the winners," Dave Rovelli, managing director of US equity trading at Canaccord Adams, told clients in a morning note.
Materials and energy were the best sectors for the day on the Standard & Poor's 500, while weakness in consumer stocks and utilities limited gains.
On the Dow industrials, Hewlett-Packard dropped plans to spin off its PC unit, sending its shares sharply higher to lead the index. Merck , which reported quarterly profit of 94 cents a share, helped boost the bluechips as did Alcoa .