Stocks hovered near four-year highs on Tuesday, while a number of large-cap stocks hit new highs as portfolio managers grabbed top performers as the end of the quarter approached.

With the quarter ending on Friday, portfolio managers adjusted holdings by buying some of the best performers to dress up their portfolios. About 80 percent of stocks across all sectors of the S&P 500, especially high-end retailers and technology, are above their six-month moving averages.

The moves follow big gains in the quarter, which is on track to be the best quarter for the S&P 500 since the third quarter of 2009. It follows a similarly strong run in the fourth quarter of 2011, with gains for the past six months totaling 25 percent.

You'll see fund managers continue to rotate, and the technical bias is up right now, so that bodes well for quarterly window dressing, said Peter Cardillo, chief market economist at Rockwell Global Capital in New York.

I think you'll see more and more people pull out of the bond market, and that money is going to flow into equities.

The Dow Jones industrial average <.DJI> slipped 12.07 points, or 0.09 percent, at 13,229.56. The Standard & Poor's 500 Index <.SPX> inched down 0.19 of a point, or 0.01 percent, to 1,416.32. But the Nasdaq Composite Index <.IXIC> rose 7.80 points, or 0.25 percent, to 3,130.37.

The benchmark 10-year U.S. Treasury note shot up 18/32, with the yield at 2.19 percent.

Apple Inc hit another all-time high of $616.28. The iPad and iPhone maker's stock then pulled back from that peak to trade at $612.98, still up 1 percent.

Among Dow components hitting 52-week highs, International Business Machines climbed to $208.56 and then retreated slightly from that peak to trade up just 0.1 percent at $208.02. The stock is up 13.1 percent for the quarter so far.

Walt Disney Co climbed to a 52-week high of $44.50, only to slip to $44.24, off 0.3 percent in late afternoon. Home Depot Inc reached a 52-week high at $50.34, then gave up some of that gain to trade at $50.09, off 0.1 percent late in the session.

Pfizer Inc
touched $22.80, a 52-week high, earlier in the session and then pulled back to $22.59, still up 1.9 percent for the day so far.

Among sectors, the S&P financial index <.GSPF> is leading the quarter's gains, followed by S&P technology <.GSPT>.

Still, the overall market showed signs of fatigue. On Monday, the three major U.S. stock indexes rallied more than 1 percent after Federal Reserve Chairman Ben Bernanke signaled that supportive monetary policy will remain in place.

The S&P 500 closed on Monday at its highest since May 2008.

Some investors believe further gains will be difficult to achieve since the rally has lasted for months without a major correction. The market's sharp gains have followed improving U.S. economic data and accommodative measures by central banks around the world.

In the latest snapshot of the economy, the U.S. consumer confidence index slipped in March, while Americans' inflation expectations surged to the highest level in 10 months, according to a report from the Conference Board, a private industry group.

(Additional reporting by Angela Moon; Editing by Jan Paschal)