Stocks closed mixed in thin trading Friday ahead of the three-day holiday weekend, but all major averages logged robust gains for the week following some positive economic news and amid optimism that Greece will soon find a solution to its debt crisis.
The Dow Jones Industrial Average rose 45.79 points, or 0.35 percent, to close at 12,949.87, just shy of the psychologically-important 13,000 mark. DuPont and Intel , led the blue-chip gainers.
The S&P 500 added 3.19 points, or 0.23 percent, to end at 1,361.23. Meanwhile, the Nasdaq pulled back 8.07 points, or 0.27 percent, to finish at 2,951.78 after several days of gains.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, ended below 18.
For the week, the Dow soared 1.16 percent, the S&P rallied 1.38 percent and the Nasdaq jumped 1.65 percent. The S&P and the Nasdaq have logged their sixth week of gains in seven. Hewlett-Packard led the Dow gainers for the week, while Kraft Foods slumped.
All 10 S&P sectors finished higher for the week, led by energy.
"No one wants to risk staying short if there is really a deal in Greece over the weekend," said Brian Battle, vice president of trading at Performance Trust Capital Partners. "But the sustainability of the rally is another question."
Optimism in Europe grew after German officials gave up plans to pressure Greece by withholding part of the bailout. European shares ended higher as investors bet that Greece would sign a deal to secure a second bailout by Monday, avoiding a messy default.
Meanwhile, German president Christian Wulff resigned amid a scandal over political favors. The move comes as a blow to chancellor Angela Merkel who had personally selected Wulff for the post. Merkel also postponed a trip to Rome to meet Italian Prime Minister Mario Monti.
“Friday before a three-day weekend has a natural prejudice the upside,” said Art Cashin, director of floor operations at UBS Financial Services. “Interestingly, the Friday before the Presidents’ day is the weakest of the lot.”
The stock market will be closed next Monday for Presidents' day.