Portfolio managers will be doing some last-minute shopping for winners from the big stock market rally as they take part next week in the quarter-end ritual of window dressing.

The activity could help stocks resume their upward course in the week ahead and keep a long-expected pullback at bay.

The benchmark Standard & Poor's 500 index <.SPX> is up 11.1 percent so far for the first quarter and the year. That would follow a gain of 11.2 percent for the fourth quarter.

If the trend holds, the S&P 500 will book its best back-to-back quarters since the second and third quarters of 2009.

The S&P 500 lost some ground in the past week, ending down 0.5 percent after five straight weeks of gains, but that's only its second negative week for the year.

Much of the quarter's gains have been driven by signs of improvement in the economy, particularly a pickup in jobs, which has been lagging other areas in the recovery.

Window dressing typically involves investors grabbing some of the quarter's best performers to dress up their portfolio listings.

Some of the last-minute buying is likely to come from the hedge fund community, said Phil Orlando, chief equity strategist and senior portfolio manager for Federal Global Investment Management Corp in New York.

Hedge funds by and large have not been believers about the improvement in the domestic economy ... so they've been very much out of the market. Yet here we are with the first quarter looking like the best first quarter since 1998, he said. They've got a huge gain to catch up.

But retail investors, he said, have probably also noticed that they've missed a lot by having kept their money in Treasuries and other fixed-income assets over the quarter.

They have woken up to the realization that the surge in yields has resulted in a significant loss of capital for them, Orlando said.

If the S&P 500 manages to end the first quarter with an 11.1 percent gain, that would be its best quarterly performance since the second quarter of 2009.

By comparison, the 10-year U.S. Treasury note's yield has risen nearly 36 basis points. If this holds, the 10-year note's yield will record a quarterly rise for the first time in a year.

In the final week of the first quarter, Wall Street will get a more complete look at the economy through a whole suite of indicators. Among them will be March consumer confidence on Tuesday, February durable goods orders on Wednesday, the final look at fourth-quarter Gross Domestic Product on Thursday, plus February personal income and spending data on Friday as well as the Chicago Purchasing Managers Index, and the final reading on March consumer sentiment from the Thomson Reuters/University of Michigan surveys.

The bottom line is: The economy is improving and while inflation is trending higher, there is no threat of corporate profits disintegrating, said Peter Cardillo, chief market economist at Rockwell Global Capital in New York.

I am looking for a rally, he said.

FINANCIALS, TECH TOP PERFORMERS

Gains this quarter have been broad-based, with most of the 10 S&P sectors on track to end the quarter in positive territory.

But the S&P 500 financial sector index <.GSPF> and the S&P technology sector index <.GSPT> stand out, with gains so far of 21 percent for the financials and 19.9 percent for techs. The more defensive S&P 500 utility and consumer staples sectors have underperformed, with the utility index <.GSPU> down 3.9 percent and the consumer staples index <.GSPD> up 3.7 percent so far.

Still, the S&P energy sector <.GSPE>, a cycical sector that tends to gain with the economy like financials and technology, is up just 4 percent for the quarter so far.

Because of the S&P 500's big move this quarter, some strategists expect to see some funds shift out of equities.

Given the fact that stocks have had a big move and bonds have sold off, portfolio managers in asset-allocation mode may trim a little bit of equity holdings and move them into fixed-income holdings to rebalance target weights, said Fred Dickson, chief market strategist of D.A. Davidson & Co. in Lake Oswego, Oregon.

According to Thomson Reuters' Lipper service, investors in U.S.-domiciled equity funds have splurged so far in the first quarter of the year, pumping a net $32.7 billion in fresh capital into the sector.

This follows net outflows for the previous nine-month period, which saw a high of $66 billion in net redemptions occur in the second quarter of 2011. For all of last year, equity funds experienced net outflows of $50.4 billion, only the second full year of redemptions since Lipper started tracking fund flow data in 1992.

The S&P 500 ended 2011 virtually unchanged, but is up 23 percent since the end of September.

Even as money has moved back into equities, taxable bond funds are also enjoying a banner start to the year.

Lipper data shows $85 billion in net inflows so far in 2012, on pace to be the best since the $98 billion of net inflows recorded in the first quarter of 2010.

Taxable bond funds have not had a negative quarter since the fourth quarter of 2008. The record inflow year for this category was 2009 when investors bought an additional $384 billion of taxable bond funds. The last full year of net outflows was the $54 billion in 2000.

Stocks have benefitted not just from the upbeat economic data, but from speculation that the Federal Reserve could add further stimulus to the economy.

What may have driven some of this sustained support for the market is continued indications from the Fed that QE3 is not out of the question. That would certainly be extremely negative for anybody who has a short position on U.S. equities, said Natalie Trunow, chief investment officer of equities at Calvert Investment Management in Bethesda, Maryland.

(Reporting By Caroline Valetkevitch; Additional reporting by Daniel Bases, Richard Leong and Chuck Mikolajczak; Editing by Jan Paschal)