The Dow Jones industrial average made another run at 13,000 but couldn't quite get there.
Stocks recovered from an early loss Thursday and pushed the Dow within four points of the milestone. Investors were encouraged by more good news on U.S. jobs, but gains were limited by poor results from retailers such as Safeway and Kohl's.
The Dow pierced 13,000 three times Tuesday but could not hold the milestone. The average hasn't closed above 13,000 since May 19, 2008, four months before the financial crisis.
Investors were encouraged Thursday after the government reported that the number of people seeking unemployment benefits last week was unchanged. The four-week average was the lowest in four years.
High unemployment has been a problem for retailers, which have been forced to slash prices even though they are paying more to make and ship their goods. The burden showed in Thursday's earnings reports.
Kohl's, the department store chain, sank 6 percent after weak holiday sales caused it to miss Wall Street estimates for revenue and earnings. Grocery store chain Safeway Inc. plunged more than 7 percent after reporting a 6 percent drop in profit.
Part of the problem is the rising cost of gas, which could hurt the economic recovery. The price of gas is rising as tensions mount over Iran's nuclear program. A gallon of regular sells for $3.61 on average, the highest on record this time of year.
The price of oil jumped again Thursday, to $107.83, a nine-month high and up $1.52 for the day. Besides Iran, analysts blamed the falling U.S. dollar, which makes oil more expensive for investors holding foreign money.
The euro jumped to a two-month high against the dollar, $1.337, up almost a penny from Wednesday, after business confidence surged in Germany.
Dillard's, another department store chain, and the discount chain Target also missed analysts' estimates. Earlier this week, Wal-Mart fell short on earnings and revenue after aggressive discounts for the holidays cut into profit margin.
Sears Holdings Corp., which owns Sears, Kmart and Land's End, also missed estimates for revenue and per-share earnings. Its stock soared 19 percent, but that was because it outlined plans to spin off some stores and sell others.
For the most part, U.S. stocks have been rising since Thanksgiving, as the most potent fears of last summer — that the country would enter another recession, and that the European debt crisis would damage the U.S. economy — have dissipated.
The market has yet to settle into a definitive trend, however. In the 36 completed trading days so far this year, the Dow has risen on 21 and fallen on 15.
"On Tuesday the world is ending, on Wednesday the opposite happens, after two or three weeks we're right where we started because not much happened," said Bill Hampel, chief economist of the Credit Union National Association.
Of the S&P 500's 10 industry groups, nine finished the day higher. Financial stocks led the charge forward, partly because of a calm day for news about Greek debt talks. U.S. bank stocks were pummeled last year as investors worried about exposure to European debt, but some of those concerns have eased.
On Thursday, the Greek Parliament approved a plan to wipe out €107 billion of debt that it owes to investors who hold its government bonds. Greece is expected to make a formal offer to bondholders Friday.
Earlier this week, Greece locked down a second bailout from the International Monetary Fund and other countries that use the euro currency. The bailout is designed to prevent a default on Greece's debt, which could shock the world financial system.
But deep problems continue to haunt Greece, including a recession and the prospect that investors will shy away from buying its bonds in the future. The U.S. market has been yanked up and down this year by incremental headlines from Greece.
David Trone, managing director of JMP Securities, a brokerage, said financial stocks were up because of the relative calm in Greece. U.S. bank stocks had plummeted last year over fears about their exposure to European debt.
"Investors aren't feeling any happier or any worse than they were yesterday," Trone said.
In the bond market, yields for U.S. Treasurys fell slightly after the government sold seven-year notes at a lower yield than the average over the past four months. The yield on the 10-year Treasury was 2 percent, virtually unchanged from Wednesday.
Among other stocks making big moves in the U.S.:
— HSN Inc., which runs a cable TV channel for home shopping, rose 1.6 percent after its profit climbed 13 percent in the most recent quarter.
— CEC Entertainment Inc., which owns Chuck E. Cheese children's restaurants, rose 1 percent after an analyst for Morgan Keegan upgraded the company. Morgan Keegan said store remodels may attract more guests.