Stocks rose moderately Friday as a stronger-than-expected retail sales report and a slight drop in oil prices boosted investor sentiment, but another surge of oil prices to a fresh record of $55 a barrel kept gains in check.

The Dow Jones industrial average (searchended up 38.93 points, or 0.39 percent, at 9,933.38. The Standard & Poor's 500 Index (searchwas up 4.91 points, or 0.45 percent, at 1,108.20. The technology-laced Nasdaq Composite Index (searchwas up 8.48 points, or 0.45 percent, at 1,911.50.

Earlier in the session, the Dow was up nearly 1 percent.

For the week, the Dow declined 1.21 percent, Nasdaq fell 0.44 percent and the Standard & Poor's 500 was down 1.24 percent. All three indexes have ended lower for two consecutive weeks.

Wall Street had worried that soaring oil and gasoline prices would prompt consumers to spend less. But the Commerce Department (search) reported that retail sales jumped 1.5 percent in September, much more than the 0.6 percent gain economists forecast.

The strong retail sales figures, suggesting solid economical growth, especially in consumer spending, helped other sectors sensitive to news on the economy like Dow components United Technologies Corp. (UTX) and Boeing Co. (BA). United Technologies' shares rose 43 cents to $91.13. Boeing edged up 24 cents to $50.49.

Reassuring words from Fed chairman Alan Greenspan (search), who said surging energy costs will have less of an impact on the economy than the energy crisis of the 1970s, cheered investors even as oil prices pushed toward $55 per barrel. A barrel of light crude settled at $54.93, up 17 cents, on the New York Mercantile Exchange (search).

"The retail sales figures were particularly good news and could have a strong impact in overall GDP (gross domestic product) growth," said Joseph McAlinden, chief investment officer at Morgan Stanley Investment Management. "And certainly Greenspan's opinion on the state of the world has helped."

Gains were limited, however, by oil's continued climb.

"I think the reason the market rally has fizzled a little is that crude oil prices have recovered," said Christine Callies, managing director and chief market strategist at Bessemer Trust.

"The market's going to be on pins and needles until it knows roughly where the top is in energy prices -- because at the moment it looks like an open-ended risk."

Investors worried about inflation received good news from the Labor Department (search), which said wholesale prices, as measured by the Producer Price Index (search), rose just 0.1 percent in September. While the PPI was up from the 0.1 percent decline in August, the figure was small enough to reassure Wall Street that inflation would not be a major problem for the forseeable future.

"It's nice to see a bit of a rebound today, but it's not convincing in any manner," said Michael Palazzi, managing director of equity trading at SG Cowen Securities. "We're not going anywhere meaningful until the price of oil comes down. It's basically choking us." '

Consumers seemed to share that sentiment, as high gas prices have driven down confidence in the economy. The University of Michigan's (search) consumer sentiment index fell to 87.5 in October, down sharply from the 94.2 figure in September and far lower than Wall Street's expectation of 94.

Insurance stocks continued to fall, with Marsh & McLennan Cos. Inc.(MMC), the world's No. 1 insurance broker, ending down 16 percent, a day after the company was accused of fraud in a lawsuit by New York's Attorney General Eliot Spitzer. Marsh & McLennan dropped $5.65 to $29.20.

The New York attorney general's lawsuit also said Marsh & McLennan had involved some big insurers -- including American International Group (AIG), the world's largest by market value -- in schemes to steer unsuspecting clients to certain insurers in exchange for payoffs.

Shares of AIG fell 3.6 percent, or $2.15, to $57.85, weighing on both the Dow and the S&P 500.

In earnings news, financial company Wachovia Corp. (WB) reported a 14 percent rise in third-quarter earnings due to gains in its high-end investment and wealth management businesses. Wachovia, which beat Wall Street forecasts by a penny per share, climbed $1.16 to $48.45.

Charles Schwab Corp. (SCH) rose 50 cents to $8.97 after it posted a loss for the third quarter due to one-time charges related to restructuring and the sale of its capital markets business. Without the charges, however, the brokerage met Wall Street forecasts for its results.

Sun Microsystems Inc. (SUNW) swung to a loss in its first quarter, with restructuring charges and a legal settlement wiping out the computer maker's profits. The company lost 5 cents per share for the quarter, more than the 3 cents per share loss analysts expected. Sun Microsystems was unchanged at $3.97.

Mail-order DVD rental company Netflix Inc. (NFLX) plummeted $6.87, or 39.4 percent, to $10.56 after it announced that Amazon.com Inc. (AMZN) would likely compete with Netflix for DVD rentals. Netflix said it will slash its rental fees and postpone expansion plans overseas in response. Amazon.com fell 25 cents to $38.85 on the news.

Advancing issues outnumbered decliners by about 5 to 2 on the New York Stock Exchange, where volume came to 215.02 million shares, compared with 152.21 million at the same point on Thursday.

Trading was active, with 1.65 billion shares changing hands on the New York Stock Exchange, above the 1.4 billion daily average for last year. About 1.64 billion shares were traded on Nasdaq, just below the 1.69 billion daily average last year.

Advancers outnumbered decliners on the NYSE by about two to one, and three to two on Nasdaq.

The Russell 2000 index of smaller companies was up 4.54, or 0.8 percent, at 569.42.

Overseas, Japan's Nikkei stock average fell 0.47 percent. In Europe, Britain's FTSE 100 was down 0.14 percent, France's CAC-40 rose 0.16 percent and Germany's DAX index slumped 0.47 percent.

Reuters and the Associated Press contributed to this report.