Not surprisingly, many investors have written off the housing sector. A burst bubble will do that.

So will numbers like these: Of the 13 public homebuilders with market capitalizations above $200 million, Wall Street analysts see only seven with positive forward earnings in the near term. And only four -- NVR (NYSE: NVR) at 22.6, Lennar (NYSE: LEN) at 29.1, D.R. Horton (NYSE: DHI) at 31.6, and Standard Pacific (NYSE: SPF) at 43.9 -- translate those earnings into forward P/E ratios under 100.

But as a contrarian investor, I (Anand Chokkavelu, here) like checking in occasionally to scout for opportunity. So I asked a couple of my housing-following Foolish colleagues for their thoughts. Here's the question I asked them.

Is there any stock related to housing that is a good buy? If so, what is it?

Morgan Housel, Fool contributor: The basic economics of the housing market pretty much guarantee that it'll be interesting over the coming years. New home construction is about one-third the trend rate of household formation. Once excess supply is soaked up -- there's an ungodly amount of it, but it is being soaked up quickly -- homebuilders will see demand return in a big way. Only two outcomes could prevent this: Either households begin doubling up en masse, or household formation itself drops considerably. Both are possible, but highly unlikely. A sound homebuilder like NVR could be a good bet if (and only if) you have the patience to stick it out for several years. It'll probably take that long for things to turn, but they will. 

Matt Koppenheffer, Fool contributor: Is it crazy to be asked for a good stock related to housing and immediately think of banks? If so, then I need to be locked in a padded room.

But, to be fair, I don't want just any old bank. I want one whose primary lending for one-to-four-family mortgages -- we're talking housing after all -- is based in and does most of its business in a state that has both low foreclosure rates and lower-than-average unemployment. It must also pay a decent dividend, have a low rate of nonperforming assets, and be cheap.

Sound like too much to ask? Apparently it's not. Nearly 95% of Capitol Federal Financial (Nasdaq: CFFN) loans are one-to-four-family residential mortgages. Just 1% of the bank's total loans are delinquent and three-quarters of its one-to-four-family mortgages are in Kansas, which has an unemployment rate of 6.6% and is in the bottom half of the country in terms of foreclosure rates. The stock can currently be bought for a hair under book value and it pays a 2.6% dividend.

I've still got some work to do before I add this to my portfolio, but it sure looks like a good, boring bank.

I (Anand again) couldn't agree more with Morgan and Matt. As Morgan implies, the higher the quality of the housing company (and NVR has weathered the storm rather nicely), the more sure we are that it'll survive to thrive when housing does recover. And like Matt, I love small banks that have either avoided trouble throughout the crisis or have made measurable strides to recover. There's certainly opportunity now in banks and perhaps housing.

To get more of our coverage, add any stock mentioned to My Watchlist.

Anand Chokkavelu doesn't own shares of any company mentioned. Motley Fool newsletter services have recommended shorting Standard Pacific. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.