Traders work on the floor of the New York Stock Exchange. / Spencer Platt, Getty

by Kim Hjelmgaard, USA TODAY

by Kim Hjelmgaard, USA TODAY

NEW YORK â?? Stocks ended mostly higher, trading in a narrow range Friday on thin volume as markets await more corporate earnings results.

The Dow Jones industrial average and Nasdaq composite both closed up 0.1%. Ending the day basically flat was the S&P 500, off less than a point.

On Thursday, the Nasdaq composite, Dow Jones industrial average and S&P 500 all climbed, by 0.5%, 0.6% and 0.75%, respectively, with the S&P 500 seeing its highest close since December 2007.

A massive spending package meant to reinvigorate Japan's economy briefly boosted world markets Friday, but new figures showing a rise in Chinese inflation and old worries about the world economy quickly brought most stocks back down.

Japan's Nikkei stock index soared 1.4% after Japanese Prime Minister Shinzo Abe announced an anti-recession stimulus package of more than 20 trillion yen ($224 billion) that is intended to add 2 percentage points to Japan's growth.

The news lifted other markets briefly. Later in Europe, investors were tempering their enthusiasm as concern remains about the state of the world economy.

New data showed Friday that price increases are accelerating in China, the world's second-largest economy. The inflation rate rose to 2.5% in December from 2% the previous month, due partly to a jump in food prices.

"The rise is disappointing as traders were hoping that policy officials may introduce new measures to help stimulate the Chinese economy," said Shavaz Dhalla, a trader with Spreadex. "Cleary rising prices could act as a barrier for officials as there is now the fear that more stimulus measures could cause the current inflation figures to rocket."

European countries are also facing an uphill battle to restore economic growth. The economy of the 17 European Union nations that use the euro is in recession, and unemployment is soaring across the region.

Analysts said that some traders may have also been selling off shares to book profits ahead of the weekend.

In France, the CAC-40 fell 0.01%, while Germany's DAX was up 0.09%. The FTSE index of leading British shares edged up 0.25%.

Asian markets were mostly hemmed in by concerns about inflation in China. Hong Kong's Hang Seng fell 0.4% to 23,264.07. South Korea's Kospi lost 0.5% to 1,996.67. Australia's S&P/ASX 200 shed 0.3% to 4,709.50. Benchmarks in Singapore and mainland China also fell while those in the Philippines and New Zealand rose.

Amid persistent concerns about the health of the world economy, energy prices fell.

Benchmark oil for February delivery was down 8 cents to $93.74 per barrel in electronic trading on the New York Mercantile Exchange.

Only the euro was holding its own, rising to $1.3340 after the European Central Bank's decision Thursday to leave its interest rate at the record low of 0.75%. In a press conference, ECB President Mario Draghi said the eurozone economy should start to grow again later this year.