NEW YORK — Wall Street ended a stunning second quarter quietly Monday as fund managers spent the day repositioning their holdings, but the narrow losses didn't stop the Standard & Poor's 500 index from achieving its best quarterly gain since the final three months of 1998.

The Dow Jones industrials and the Nasdaq composite index claimed their best quarter since the final quarter of 2001.

The stock gauges' accomplishments reflected investors' growing belief that earnings, the economy and stock prices will recover in the second half of the year.

"It was certainly a quarter when psychology in the market changed substantially and with stocks discounting a strong rebound in the second half of the year," said Peter Cardillo, president and chief strategist of Global Partner Securities Inc.

Trading was light and choppy, not surprising given that it was the end of the quarter and a short week with the Independence Day holiday. The market typically experiences volatility at a quarter's end due to window-dressing, or an attempt by fund managers to make their portfolios look as good as possible in statements to shareholders.

The S&P 500, the broadest of Wall Street's major indexes, closed down 1.72, or 0.2 percent, at 974.50. For the quarter, the S&P rose 14.9 percent. The last time the S&P had a bigger quarterly gain was the last three months of 1998, when it climbed 20.9 percent.

The Dow declined 3.61, or 0.04 percent, to 8,985.44. The blue chips gained 12.4 percent in the April-June period, their best quarterly showing since the last three months of 2001, when it rose 13.3 percent.

The Nasdaq on Monday fell 2.46, or 0.2 percent, to 1,622.80. The Nasdaq rose 21 percent in the quarter, its best quarterly win since gaining 30 percent in the last three months of 2001.

Contributing to Monday's fluctuations was the annual rebalancing of the Russell 2000 index, which tracks smaller company stocks. Companies whose market capitalizations have grown sufficiently move up to the Russell 1,000, while newer companies or those whose market value has shrunk fill out the Russell 2,000.

On Monday, the Russell 2000 fell 0.40, or 0.1 percent, at 448.35.

In economic news, the Purchasing Management Association of Chicago reported that its index of area business activity rose to 52.5 in June on a seasonally adjusted basis from 52.2 in May, according to Dow Jones Newswires. A reading above 50 signals that the manufacturing sector is expanding, while a reading below 50 indicates it is contracting. The reading met analysts' expectations.

Wall Street closely monitors the Chicago survey, considered a harbinger for the report on national business activity by the Institute for Supply Management. That report will be released today.

Stocks were riding momentum gathered during the past three months, beginning with much of corporate America reporting better-than-expected first-quarter profits and a swift end to the war in Iraq. Market watchers said the strength of the second-quarter was also owed to investors having more money to invest — what with a $350 billion tax cut package signed into law in May, lower energy costs and another interest rate cut by the Federal Reserve, made last week.

"It has been quite some time since we've had the combination of enough folks believing in and wanting to be back in the marketplace and there being a good fundamental backdrop for that," said Arthur Hogan, chief market analyst at Jefferies & Co. "The stars lined up nicely for the second quarter."

Supervalu dropped $2.38 to $21.32 after J.P. Morgan lowered its rating on the food wholesaler's shares to "neutral" from "overweight."

National Semiconductor fell 32 cents to $19.72 after Smith Barney downgraded it to "in-line" from "outperform."

Marvell Technology, which makes products for data storage and broadband communications applications, climbed $1.04 to $34.35 after brokerage Gerard Klauer Mattison upgraded it to "outperform" from "neutral."

Dow industrial Home Depot advanced 65 cents to $33.12 after CEO Robert Nardelli said in a CNBC interview that he's seeing steady improvement in the economy.

"Retail has been leading the recovery," Nardelli said.

Advancing issues matched decliners on the New York Stock Exchange. Volume was light.

Overseas, Japan's Nikkei stock average finished Monday down 0.2 percent. In Europe, Britain's FTSE 100 lost 0.9 percent, France's CAC-40 fell 0.8 percent and Germany's DAX index slipped 0.1 percent.