NEW YORK (CNNMoney.com) -- Stocks gained Thursday, erasing earlier losses to lift the Nasdaq and S&P 500 to 18-month highs as investors eyed the day's jobs and trade news and the direction of the U.S. dollar.
The Dow Jones industrial average (INDU) added 44 points, or 0.2%, ending at a six-week high.
The S&P 500 index (SPX) added 5 points, or 0.5%, ending at an 18-month high.
The Nasdaq composite (COMP) gained 3 points, or 0.1%, ending at a fresh 18-month high.
Stocks seesawed through most of the session as investors played it cautious after the recent run up and showed concern about a spike in China's inflation rate last month. But the weakness gave out by the close and markets ended with slim gains.
Stocks have been on an upswing lately, posting gains over the last month. As of Thursday's close, the Dow has risen in eight of the last 10 sessions and the S&P 500 and Nasdaq have risen in nine of the last 10 sessions.
"The market is taking a pause after having a positive bias over the last few weeks," said Mark Luschini, chief investment strategist at Janney Montgomery Scott.
He said investors are in a gap between the rush of fourth-quarter earnings reports, which wound down two weeks ago, and the start of first-quarter earnings reports, which is still over a month away.
Further stock gains will be determined by earnings and revenue growth and the transition between a government stimulus-driven economy and one driven by fundamentals, he said.
"It all comes down to the consumer and jobs, and today's jobs report was maybe a little disappointing," he said.
Jobless claims: The Labor Department reported that the number of Americans filing new claims for unemployment fell to 462,000 from a revised 468,000 the previous week. Economists surveyed by Briefing.com thought it would fall to 460,000.
Continuing claims, a measure of Americans who have been receiving unemployment checks for a week or more, rose to 4,558,000, up 37,000 from the previous week's reading of 4,521,000. Economists expected 4,500,000 claims.
World Markets: Asian markets ended higher, even as investors mulled a report that showed China's inflation rate rose 2.7% in February.
China's growth in the aftermath of the recession has already caused officials to limit bank lending and this report could add to pressure to start raising interest rates. China is the third-largest economy in the world and a big importer of goods.
In overseas trading, European markets ended lower, with London's FTSE 100 down 0.4%, Germany's DAX down 0.1% and France's CAC 40 down 0.4%.
Economy: The January trade gap narrowed to $37.3 billion from a revised reading of $39.9 billion. The deficit was expected to widen to $41 billion, according to forecasts.
Another report showed that foreclosure rates rose 6% in February from a year earlier, but fell 2% from the previous month.
Deals: A slew of corporations have announced mergers over the last few weeks as economic optimism has started to creep back into place.
The dollar and commodities: The dollar fell versus the euro and gained against the yen.
U.S. light crude oil for April delivery rose 2 cents to settle at $82.11 a barrel on the New York Mercantile Exchange.
COMEX gold for April delivery rose $0.10 to settle at $1,108.20 per ounce.
Bonds: Treasury prices slipped, raising the yield on the 10-year note to 3.74% from 3.72% late Wednesday. Treasury prices and yields move in opposite directions.
Market breadth was positive. On the New York Stock Exchange, winners beat losers three to two on volume of 983 million shares. On the Nasdaq, advancers beat decliners by seven to six on volume of 2.19 billion shares.
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.80%||3.88%|
|15 yr fixed||3.20%||3.23%|
|30 yr refi||3.82%||3.93%|
|15 yr refi||3.20%||3.23%|
Today's featured rates:
Land O'Lakes CEO Beth Ford charts her career path, from her first job to becoming the first openly gay CEO at a Fortune 500 company in an interview with CNN's Boss Files. More
Honda and General Motors are creating a new generation of fully autonomous vehicles. More
In 1998, Ntsiki Biyela won a scholarship to study wine making. Now she's about to launch her own brand. More
Whether you hedge inflation or look for a return that outpaces inflation, here's how to prepare. More