Stocks were headed for their best week in nine on Friday as the market defied calls for a pullback despite signs of rotation into defensive and lagging sectors 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.

Sectors that have posted strong gains in the recent rally, such as energy, materials and industrials, showed signs of profit-taking while lagging sectors as well as technology shares posted gains.

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.

The Dow Jones industrial average <.DJI> added 7.98 points, or 0.07 percent, to 12,070.24. The Standard & Poor's 500 <.SPX> gained 1.12 points, or 0.09 percent, to 1,308.22. The Nasdaq Composite <.IXIC> rose 12.81 points, or 0.47 percent, to 2,766.69.

The S&P's energy sector <.GSPE>, which has gained the most this year, was the biggest loser on the day, falling 0.6 percent. Dow component Chevron Corp dropped 0.6 percent to $96.70, while Halliburton Co fell 2.2 percent to $45.76.

Consumer discretionary shares <.GSPD> rose 0.5 percent after recent signs of life in the consumer. Shares in online retailer Amazon.com Inc climbed 1.8 percent to $176.79.

Strength in technology helped pushed the Nasdaq to new 3-year highs, but the move was not broad-based as declining stocks outnumbered advancing ones.

Kaufman said growth prospects and the defensive nature of some areas in technology were attractive. When you're in the right areas in tech, it's definitely the place to be, he said.

Both the Dow and the S&P 500 remain near their 2 1/2-year highs reached last Tuesday.

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 10.2 percent higher to $36.67.

Tyson Foods Inc advanced 6 percent to $18.61 after the company said quarterly earnings surged 86 percent as it sold beef and pork at much higher prices.

Hundreds of thousands of Egyptians marched peacefully in Cairo on Friday to demand an immediate end to President Hosni Mubarak's 30-year rule.

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.

(Editing by Kenneth Barry)