The S&P 500 posted its best week in nine on Friday as the market defied calls for a pullback, and investors rotated into defensive and lagging sectors in a move that could intensify in coming weeks.

Signs of improvement in the economy and strong corporate earnings have propelled stock prices, but tapering volume, meager gains and declining numbers of advancing stocks pointed to waning buying interest at the end of the week.

January's employment data had a limited impact as job creation was weak but the unemployment rate fell, leaving many investors unsure how to interpret the report.

Sectors that have posted strong gains recently, such as energy, materials and industrials, showed signs of profit-taking as investors shifted to consumer discretionary and technology shares.

The market has been getting more selective and the rotation is important, said Wayne Kaufman, chief market analyst at John Thomas Financial in New York. I'm not sure people have it completely figured out yet.

Networking shares were among the leaders after JDS Uniphase

posted strong earnings. Its stock rose almost 30 percent and bolstered hopes for strong results from Cisco Systems next week.

The Dow Jones industrial average <.DJI> rose 29.89 points, or 0.25 percent, at 12,092.15. The Standard & Poor's 500 Index <.SPX> added 3.77 points, or 0.29 percent, at 1,310.87. The Nasdaq Composite Index <.IXIC> climbed 15.42 points, or 0.56 percent, at 2,769.30.

For the week the Dow rose 2.3 percent the S&P 500 rose 2.7 percent and the Nasdaq gained 3.1 percent.

The S&P's energy sector <.GSPE>, which has gained the most this year, was among the biggest losers on the day, falling 0.3 percent. Dow component Chevron Corp dropped 0.2 percent to $97.11.

Consumer discretionary shares <.GSPD> rose 0.7 percent after recent signs of life in the consumer. Shares in online retailer Inc climbed 1.3 percent to $175.93. Consumer shares have lagged the rally since the start of the year.

Strength in technology helped push the Nasdaq to new 3-year highs after the index posted its best week since mid-September, but the move was not broad-based as declining stocks came in just ahead of advancers.

A jump in Treasury debt yields could favor companies with stronger balance sheets as investors start to worry about funding costs. The yield on the 10-year note rose to 3.64 percent, the highest it has been since May 2010.

The sharp increase in the 10-year yield is concerning, and investors may be starting to focus on businesses with better balance sheets, said Eric Cinnamond, a fund manager at River Road Asset Management in Louisville, Kentucky. Technology obviously fits that mold.

Shares of JDS Uniphase and other optical component makers jumped a day after the company posted solid quarterly results, helped by ever-increasing demand for higher bandwidth in smart phones, tablets and other applications.

JDS Uniphase shares rose 26.9 percent to $22.76.

The strength in the technology sector today and strong earnings from JDS Uniphase potentially have people bulled up on the prospects of a positive earnings surprise from Cisco next Wednesday, said Steve Claussen, chief investment strategist at online brokerage OptionsHouse LLC.

Cisco is set to report earnings on Wednesday. The stock rose 0.6 percent to $22.05.

Both the Dow and the S&P 500 made new 2 1/2-year highs.

From a short-term perspective, the Dow has resistance at the 12,050 level and support at the key 12,000 region, said Joseph Hargett, analyst at Schaeffer's Investment Research in Cincinnati, Ohio.

Health insurer Aetna Inc forecast 2011 profit well above of Wall Street's target on Friday and increased its dividend, sending its shares 12.5 percent higher to $37.42.

Tyson Foods Inc advanced 5.7 percent to $18.56 after the company said quarterly earnings surged 86 percent.

U.S. employment rose by a meager 36,000 jobs in January, far less than expected, but the unemployment rate fell to 9.0 percent, its lowest level since April 2009.

Composite volume on the NYSE, the Amex and the Nasdaq reached 7.29 billion shares, below last year's estimated daily average of 8.47 billion.

(Additional reporting by Doris Frankel and Rodrigo Campos; Editing by Kenneth Barry)