Stocks closed February on a strong note, leading to three consecutive months of gains, as all the major indices gained in the final minutes of trading.
TheDow Jones Industrial Averagerose 95.89 points Monday, or 0.79 percent, to close at 12,226.34. For February, the Dow rose 334.41 points in February, or 2.81 percent, its best February performance since 1998.
The blue-chip index was on track to rise 2.8 percent this month, following a 2.7 percent gain in January. Of the 26 times the Dow gained in the first two months of a year, only once has it finished the year with a loss. (Read More: Stocks — A Promising Start to 2011?)
For the month, 23 of the 30 Dow stocks ended higher. Walt Disneywas the best performer on the Dow in February, gaining 12.53 percent, while Cisco was the worst, falling 12.25 percent.
The S&P 500 rose 7.34 points or 0.56 percent, to close at 1,327.22. For February, the S&P 500 rose 41.10 points or 3.2 percent, also the best February performance since 1998.
JDS Uniphase was the best performer on the broad market index, rising 45.37 percent in February, while Akamai was the worst, falling 22.
The tech-heavy Nasdaq rose 1.22 points, or 0.04 percent on Monday to close at 2,782.27. For February, the Nasdaq gained 82.19 points, or 3.04 percent, only its third positive February in 11 years.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell to 18.35 on Monday.
All key S&P 500 sectors ended higher, led by telecom, utilities and materials rose.
For much of the session large caps outpaced small, likely reflecting month-end trading, when portfolio managers like to dress up their portfolios with strong performers.
"It's end-of-the-month window dressing, that’s what we were expecting to see today," says Marc Pado, U.S. market strategist at Cantor Fitzgerald.
Also, weak figures on consumer spending released by the Commerce Department earlier in the session added to worries that consumers are no longer poised to spend, Pado said. Investors have been concerned that rising gas prices, if they persist, will hurt consumer spending going forward.
"Adds up to the fact we may have gotten ahead of ourselves, that consumption would return to normal," he said.
Intel and other chip stocks, which have been driven higher by consumer interest in smartphones and tablets with the latest chip technology, suffered on Monday. HP, however, rose in something of a relief rally after the tech giant's shares lost 12 percent last week in the wake of a weak earnings report
The iShares Semiconductor ETF lost more than 1 percent. MEMC Electronic Materials , Micron Technology and Nvidia all skidded.
Salesforce.com also sank Monday after news Microsoft succeeded in getting a court order to prevent a former employee from going to work for the cloud computing company. The move is a reversal from Friday, when Salesforce rose after reporting strong quarterly results.
The major indices had started out the session strong as oil prices eased below $97 a barrelin the wake of reassurances about supply from Saudi Arabia, and after St. Louis Fed Pres James Bullardtold CNBC there's no chance the Fed will end its program of stimulating the economy. U.S. light crude settled at $96.97.
Reassurances from Saudi Aramco CEO Khalid al-Falih that extra supply needs had been metsomewhat eased investor concerns, although the potential effects of rising energy costs on the economic recovery remain worrisome.
And late on Friday, JP Morgan upped its forecast for 2011 Brent crude by nearly 14 percent as supply tightens on lower Libyan output.
In late afternoon trading the oil sector turned around on news the U.S. issued its first permit for deepwater drilling since BP's oil spill disaster in the Gulf of Mexico last spring. Noble Energy, which received the permit, gained nearly 4 percent. Diamond Offshore and Transocean also advanced.
The dollar slumped against a basket of currencies, while gold, which continues to provide a safe haven for investors nervous about the Middle East, closed above $1,409 an ounce.