NEW YORK, Nov 16 (Reuters) - U.S. stocks rose on Friday after a day of sharp price swings, helping the S&P 500 narrowly avert a third straight week of losses as bargain-hunting lifted the beaten-down technology sector while shares of oil companies advanced on buoyant crude prices.

After see-sawing through most of the day as the market was buffeted by worries over the housing slump and the credit crisis, major indexes mounted a swift upturn in the last half hour of trade as investors bid up shares of technology companies such as BlackBerry maker Research In Motion Ltd and computer and printer maker Hewlett-Packard Co .

Plans for an additional $10 billion share repurchase by network equipment maker Cisco Systems Inc. also buoyed sentiment in tech shares, helping the Nasdaq snap a two-day losing streak.

Investors also bought up shares of companies seen as better positioned to withstand an economic slowdown, including consumer products maker Procter & Gamble Co

, helping to underpin the broader market.

We've gotten quite oversold for quite a while, said Manny Weintraub, managing director of Integre Advisors in New York. It seems to me it's safe to bottom-fish.

But shares of financial services companies, including Citigroup Inc , fell on persistent worry that losses from mortgage defaults and the housing slump may worsen.

The Dow Jones industrial average <.DJI> rose 66.74 points, or 0.51 percent, to close at 13,176.79. The Standard & Poor's 500 Index <.SPX> gained 7.59 points, or 0.52 percent, to end at 1,458.74. The Nasdaq Composite Index <.IXIC> added 18.73 points, or 0.72 percent, to finish at 2,637.24.

For the week, the Dow gained 1.03 percent, while the S&P 500 and the Nasdaq each ended up 0.35 percent.

RIM AND GARMIN LEAD TECH

Among tech companies, shares of Research In Motion jumped 4.4 percent to $107.57 on the Nasdaq, where it ended as the session's biggest advancer, ahead of navigation devices maker Garmin Ltd .

Shares of Garmin rose 16.1 percent to $97.51 after it threw in the towel in its attempt to acquire digital map maker Tele Atlas NV , easing concerns of a costly bidding war. Merrill Lynch raised Garmin to buy from sell.

Shares of iPod maker Apple Inc finished up 1.3 percent at $166.39.

Cisco Systems shares jumped 2.2 percent to $29.94 after its board approved an additional $10 billion for buying back shares.

DEFENSIVE BOOST

Shares of Procter & Gamble finished up 1.9 percent at $73.19 on the New York Stock Exchange.

P&G was the S&P's second-biggest advancer, behind Hewlett-Packard, whose stock finished up 3.8 percent at $50.75. HP was upgraded by Morgan Stanley.

Defensive stocks gained on the back of disappointing profit outlooks from package delivery company FedEx Corp , an economic bellwether, and from Starbucks Corp , the coffee chain operator, which blamed a slowdown in consumer spending for its reduced 2008 profit forecast.

Among energy company shares, Chevron Corp gained 2.2 percent to $85.98. Among financials, Citigroup Inc , the No. 1 U.S. bank and a Dow component, fell 1.7 percent to $34.

The S&P financial index <.GSPF> notched its third straight day of losses, but was up for the week after a two-week losing streak.

On the New York Mercantile Exchange, December crude settled up $1.67, or 1.8 percent, at $95.10 a barrel, after moving from $93.20 to $95.73.

Volume was below average on the New York Stock Exchange, with about 1.77 billion shares changing hands, below last year's estimated daily average of 1.84 billion.

On Nasdaq, about 2.52 billion shares traded, ahead of last year's daily average of 2.02 billion.

Even with the session's bounce, market breadth tilted to the downside, with declining stocks narrowly outnumbering advancing ones by a ratio of about 6 to 5 on both the NYSE and the Nasdaq.