(Bloomberg News) Consumer confidence in the U.S. last week reached the highest level since July as the improving job market helped allay pessimism.

The Bloomberg Consumer Comfort Index (COMFCOMF) was minus 44.7 in the period ended Jan. 8 from minus 44.8 the prior week. As recently as October, the index registered its lowest readings since the 2007-2009 recession, making 2011 the second-worst year in 25 years of data. It's since increased in four of the past five weeks.

"Considering where it's been, the trend is a welcome one," Gary Langer, president of Langer Research Associates LLC in New York, which compiles the index for Bloomberg, said in a statement. "Sentiment is hardly on a predictable path, given factors including the uncertainty of the 2012 presidential election, volatility in global markets and economic question marks from Europe to China."

Less unemployment and growing payrolls may be lifting consumers' moods, providing the spark for increases in consumer spending, which accounts for about 70 percent of the economy. Nonetheless, gasoline prices that are once again rising and wage gains that fail to keep pace with inflation may be obstacles to greater improvement in confidence.

Other reports today showed retail sales rose less than forecast in December and claims for jobless benefits climbed more than projected in the first week of the year.

Purchases increased 0.1 percent last month after a 0.4 percent advance in November that was more than initially reported, Commerce Department figures showed. Economists forecast a 0.3 percent December rise, according to the median estimate in a Bloomberg News survey. Purchases excluding automobiles fell 0.2 percent, the first decline since May 2010.

The number of applications for unemployment benefits climbed by 24,000 to 399,000 in the week ended Jan. 7, Labor Department figures showed. The median forecast of 46 economists in a Bloomberg survey projected 375,000.

Stocks rose as sales of government securities in Spain and Italy eased concern the countries would struggle to finance their debts. The Standard & Poor's 500 Index climbed 0.1 percent to 1,293.76 at 9:40 a.m. in New York.

The comfort survey's gauge of Americans' views of the current state of the economy rose to minus 82.1 last week from minus 82.9 in the prior period. The buying climate index held at minus 49.4, and the measure of personal finances decreased to minus 2.6 from minus 2.2.

The gain in the cumulative Bloomberg index last week was within the survey's three-point margin of error.

Better employment opportunities are probably holding up confidence. Payrolls increased by 200,000 in December, and the jobless rate dropped to 8.5 percent, the lowest since February 2009, a Labor Department report showed last week.

Employers added 1.64 million workers in 2011, surpassing the prior year's 940,000 advance and the biggest gain since 2006.

Sentiment has been improving among lower-income Americans. The index for those earning less than $15,000 per year increased to the highest level since October, and those making up to $24,999 were the most optimistic since February.

The ebbing of pessimism was also evident among older households. The measure of confidence among those older than 65 rose to minus 39.9, the best reading since April.

Brighter moods may help drive consumer spending in 2012 following the holiday shopping season.

"We are extremely pleased with our December sales results as we significantly exceeded our expectations," Sherry Lang, a spokeswoman for TJX Cos. said in Jan. 5 conference call. Sales at the Framingham, Massachusetts-based retailer increased 8 percent last month. "Further, we entered January with very lean inventories and the flexibility to ship fresh merchandise at great values to our stores."

The gain in the Bloomberg index parallels improvement in other surveys. The Conference Board's confidence gauge increased in December to the highest level since April. That same month the Thomson Reuters/University of Michigan index of consumer confidence rose to the highest level since June.

Nonetheless, rising gasoline prices may constrain sentiment. The cost of a regular gallon of fuel at the pump climbed to $3.38 yesterday, up 5.5 percent from a 10-month low reached on Dec. 20, according to data from AAA, the nation's largest auto group.

"While the recent trend in consumer confidence is encouraging, risks remain," said Joseph Brusuelas, a senior economist at Bloomberg LP in New York. "The recent rise in gasoline prices is likely to act as a restraint on improving consumer confidence in January."

Bloomberg's comfort index, which began in December 1985, averaged minus 46.8 for all of last year, second only to 2009's minus 47.9 as the worst year on record. The gauge averaged minus 45.7 for 2010.

The Consumer Comfort Index is based on responses to telephone interviews with a random sample of 1,000 consumers 18 years old and over. Each week, 250 respondents are asked for their views on the economy, personal finances and buying climate; the percentage of negative responses for each measure is subtracted from the share of positive views. The results are then summed and divided by three. The most recent reading is based on the average of responses over the previous four weeks.

The comfort index can range from 100, indicating every participant in the survey had a positive response to all three components, to minus 100, signaling all views were negative. Field work for the index is done by SSRS/Social Science Research Solutions in Media, Pennsylvania.