NEW YORK (CNN/Money) -
Stocks posted small gains Friday at the end of a tough week after Fed chairman Alan Greenspan told investors that higher oil prices will have only a limited impact on the economy.
Also helping was a government report that retail sales posted their best gain in six months in September.
The Dow Jones industrial average (up 38.93 to 9,933.38, Charts) gained 0.4 percent, closing off of earlier highs. Gains covered a variety of sectors, with 25 out of 30 Dow components closing higher.
The Standard & Poor's 500 (up 4.91 to 1,108.20, Charts) index and the Nasdaq composite (up 8.48 to 1,911.50, Charts) also rose about 0.4 percent.
For the week, all three indexes declined. It was the second down week in a row.
The major gauges had spent the morning in mixed territory, with blue chips higher on the strong retail sales number and the broader market limited by continued worries about oil prices and earnings.
Stocks started to move higher in the late morning, with many investors willing to jump back in after several sessions of declines. Comments from Greenspan initially fueled a broad advance. But the impact waned as the session wore on.
"I think overall the market is OK, there is still cash coming into the market, but it hasn't been a very good week," said David Briggs, head of equity trading at Federated Investors.
Next week brings a big batch of earnings, with roughly 180 of the S&P 500 companies due to report results. Monday brings earnings from Dow components 3M (up $0.38 to $77.98, Research) and IBM (Research) in the evening. (For a look at the key reports due next week, click here.)
Fed soothes some oil worries
The Fed chief acknowledged the impact oil prices have had on the economy, which hit a soft patch over the summer. But he also said he believed the economy could handle the rise in energy prices.
Greenspan spoke at a luncheon sponsored by the National Italian American Federation.
"Greenspan sparked a reaction," Briggs added. "I guess people like to be verbally reassured that we can get through the oil prices."
On the economic front, retail sales jumped 1.5 percent in September, the Commerce Department said, the biggest gain in six months. Sales fell a revised 0.2 percent in August. Economists surveyed by Briefing.com thought sales would rise just 0.7 percent.
Sales excluding autos rose 0.6 percent in September versus a gain of 0.2 percent in August. Economists thought sales would rise 0.3 percent.
The reports provided some comfort to investors concerned about the impact of higher oil prices on consumer spending and the economy.
"Overall, the retail sales report was a strong suggestion that the economy remains robust, particularly when you take out the autos component," said Michael Darda, chief economist at MKM Partners. "It suggests that we're going to see a good read on GDP growth, even with the higher oil prices."
But oil prices remain a thorn in the market's side, Darda said, noting that concerns about oil prices, and the weakness of the dollar, limited the stock rally.
Stocks slumped Thursday as oil prices hit new all-time highs and GM's weaker earnings brought out fears about the economic recovery.
After slipping Friday morning, oil prices turned around, closing at new all-time highs Friday. U.S. light crude for November delivery rose 17 cents to settle at $54.93 a barrel on the New York Mercantile Exchange.
The biggest gainers on the Dow included Caterpillar (up $1.59 to $81.09, Research), Procter & Gamble (up $0.72 to $53.69, Research) and American Express (up $0.79 to $52.50, Research).
Tech gainers included Oracle (up $0.24 to $12.24, Research), up 2 percent.
However, some negative corporate news continued to drag on select stocks.
Insurers fell for a second day after New York Attorney General Eliot Spitzer sued insurance broker Marsh & McLennan (down $5.65 to $29.20, Research) for bid-rigging in a complaint that also named AIG and others in the sector.
Additionally, two executives from AIG pleaded guilty to criminal-fraud charges for their involvement, Reuters reported. After tumbling 10 percent Thursday, AIG (down $2.15 to $57.85, Research) lost another 3.6 percent Friday and was the Dow's biggest decliner.
Marsh & McLennan sank 16.2 percent and was the New York Stock Exchange's most active issue.
Pfizer (down $0.58 to $28.50, Research) lost close to 2 percent after the company said it would need to conduct more studies on its Bextra arthritis drug when taken by patients who undergo certain surgeries. The whole class of drugs has been under scrutiny since Merck withdrew its treatment Vioxx earlier in the month, due to serious health concerns.
Netflix (down $7.13 to $10.30, Research) plunged nearly 41 percent in active Nasdaq trading after cutting its subscription price and its 2005 earnings projections.
The online DVD rental firm announced the move in a bid to meet increased competition, particularly from Amazon.com (Research), which Netflix CEO Reed Hastings said could enter the market soon.
Market breadth was positive. On the New York Stock Exchange, advancers beat decliners by more than two to one on volume of 1.64 billion shares. On the Nasdaq, winners topped losers by more than four to three on volume of 1.64 billion shares.
Econ news mixed
Aside from retail sales, the economic news was more mixed.
The Dow briefly dropped to unchanged early Friday and the Nasdaq turned negative after the release of the University of Michigan's consumer sentiment index around 9:45 a.m.
The sentiment index sank to 87.5 in October, according to Reuters, down from 94.2 in September and well below expectations for a dip to 94.
Industrial production grew less than expected and capacity use slipped. Separately, a gauge of New York state manufacturing fell to 17.4 in October from a downwardly revised 27.3 in September. Economists thought it would slip to 25.
Treasury prices fell, pushing the 10-year note yield up to 4.05 percent from 4.01 percent late Thursday. Bond prices and yields move in opposite directions.
In currency trading, the dollar fell versus the euro and the yen.