Despite a a report that shows a contraction in the restaurant industry for almost two straight years, the National Restaurant Association says there are brighter times ahead.

The association’s Restaurant Performance Index, a monthy composite index that tracks the health and outlook for the U.S. restaurant industry, stood at 97.9 for the month, down 0.2% from July and the third decline in four months. In fact, it was the 22nd straight month that the RPI was below 100, which signifies contraction for the industry.

Looking ahead, however, restaurant operators report a positive six-month outlook for both same-store sales and the overall economy, a combination which drove the expectations component of the RPI to its highest level in four months.

“Restauranteurs in general tend to be a relatively optimistic group,” said Annika Stensson, director of media relations for the Washington D.C.-based National Restaurant Association. “The current economic downturn has put a damper on some of that optimism. However, as we’re starting to see some signs of economic recovery, operators look ahead to the opportunities that will open up once the overall economy is back on track.”

The logic is simple, Stensson said. As the U.S. economy, which has been in recession for more than 1 ½ years now, recovers, upturns in service industries should naturally follow.

“With economic improvement comes more cash in consumers’ pockets, which history has shown they like to spend in restaurants,” Stensson said.

The RPI reached a record low in December 2008, and though it remains in contraction mode, has shown gains since, Stensson said.

“We expect it to do so for a while longer before we see renewed expansion,” she said. “During this period of contraction, restaurant operators are taking stock and positioning their business for growth once the economic conditions improve.”

The RPI, which is based on responses to the NRA’s restaurant industry tracking survey, showed that only 17% of restaurant operators reported a same-store sales gain between August 2008 and August 2009, down 26% who reported gains in July and the lowest reading in the seven-year history of the survey. The 68% that reported a same-store sales decline in August was up 10% from July.

Traffic levels also dropped off precipitously, the report showed.