Stocks closed higher after struggling to find direction much of the day amid light volume and ahead of a week filled with economic data.
The Dow Jones Industrial Averagerose 47.53 points, or 0.5 percent, to close at 10,462.77. The blue-chip index was up 14.84 points for the week, or 0.14 percent. With this week's action, the Dow edged into positive territory for the year, up 0.3 percent.
General Electric , Pfizer and Merck led the Dow higher for the week, while Hewlett-Packard and American Express fell.
The S&P 500 rose 5.37 points, or 0.5 percent, to 1,109.55. The broad index rose 5 points, or 0.5 percent, for the week, but is still lower for the year. The S&P was pushed higher by JDS Uniphase, which rose 11.8 percent for the week, and Oracle, which rose 9.3 percent.
The Nasdaq rose 6.28 points, or 0.3 percent, to 2,242.48. The tech-heavy index rose 8.73 points this week, or 0.4 percent, but is still slightly down for the year. Oracle also pushed the Nasdaq higher, as did Adobe , which rose 9.2 percent.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell below 22.
Energy, health care and consumer discretionary gained, while utilities slipped.
All the major indexes are up more for the month: the Dow rose 4.5 percent, the S&P 500 rose 5.7 percent and the Nasdaq rose 6.1 percent. Volume has been light all week, however, with fewer than 1 billion shares changing hands daily on the New York Stock Exchange.
On Friday, only 756 million shares traded on the NYSE, with advancers outpacing decliners nearly 2 to 1.
"Volume is still very, very light in this market, and news is light as well," said Alan Gayle, senior investment strategist at RidgeWorth Investments. "The market is drifting higher in the absence of any definitive, fundamental news."
Energy stocks were higher all day after oil rose above $76 a barrel, sparked by the shutdown of a major Enbridge pipeline to the Midwest and rising gasoline cash prices in the Chicago region and the U.S. Gulf Coast.
Most of the oil drillers were higher, including Transocean and Diamond Offshore .
Also, PG&E shares plunged more than 7 percent after the electric company's natural gas pipeline explosion ripped through a neighborhood near San Francisco, starting fires that killed at least four and burned more than 50 homes.
And BP was slightly higher after the oil giant said it will delay the release of third-quarter results by a week to add the costs associated with the Gulf of Mexico oil spill.