Optimism among the nation’s home builders climbed in September for the fifth straight month to reach the highest level in more than six years, according to a closely followed index released Tuesday.

The National Association of Home Builders/Wells Fargo housing market index gained 3 points to a seasonally adjusted reading of 40, the highest the index has been since June 2006. Economists polled by MarketWatch had anticipated a reading of 38.

The index still isn’t at the 50 level indicating “good” conditions but has climbed back from as low as 8 during the recession. The index didn’t even break 20 until December 2011.

“The traffic through the model homes is increasing, but it’s also the quality of the traffic that is increasing. We’re moving from window shoppers to people who are real buyers, people who are ready to put down a deposit,” said NAHB senior economist Robert Denk to MarketWatch Radio. Listen to interview.

Gains were made for each of the three components. Present sales rose 4 points to 42, sales for the next six months jumped 8 points to 51, while traffic of prospective buyers edged up 1 point to 31.

Gains were seen in each region — notably, a 9-point pickup in the Northeast, which recovered after having suffered an 11-point drop in August. The other regions continued their mostly upward slope.

Though the index historically tracks closely with single-family housing starts, the recovery in optimism has outpaced the hard data. In July, single-family starts reached a seasonally adjusted annual rate of 502,000, a gain of 42% from March 2009 lows. The Commerce Department reports August housing starts data on Wednesday.

The shares of publicly traded homebuilders have surged as well — an exchange-traded fund of homebuilders has more than tripled from March 2009 lows and gained nearly 67% in 2012 to date.

Goldman Sachs, ahead of the data, upgraded its rating on the shares of several builders and said it expects growth in housing activity in a range of 20% to 30% for each of the next few years. Read The Tell item on Goldman note.

Also Tuesday, Ryland Group, a builder based in Southern California, reported that orders for July and August climbed 62% compared to the same two months of 2011.

Steve Goldstein is MarketWatch's Washington bureau chief.