What investment sectors/areas generally go up when housing prices decline?
A possibility could be real estate brokerage firms such as Realogy or Prudential. Although a brokerage commission is linked to the sale prices it is more directly impacted by sales volume. If volume is maintained or goes up a real estate brokerage firm can actually profit rather handsomely in an up market or a down market.
If sales volume does go up another option would be other service markets for real estate such as real estate information and marketing websites and sources i.e. http://www.trulia.com.
Furthermore one can go and make a broad generalization such as since real estate no longer requires the same quantity of construction material other industries sensitive to the price of those commodities should technically have a lower cost of doing business.
But be careful in the US much of the wealth an average american has is in their home. In this case this means that the economy as a whole takes a dive due to consumer uncertainty. In which case safe havens could benefit, may be things like Proctor & Gamble, gold, or treasuries.
Side Note: You can always short builders or someone who loses if the housing market declines, this will make your investment higher as a result of the security going lower.
During the actual decline, there's very little money to be made and a lot to lose. When housing prices tank, everybody loses; the banks are exposed to higher risk of mortgage defaults, insurers start having to pay out more for "gas leaks" claiming over-leveraged homes, realtors starve because their commissions go down (even as foreclosures put more homes on the market) and people faced with financial uncertainty will stay put in their current homes instead of moving elsewhere. And homebuilders and contractors go broke because nobody wants to spend cash on a new home or major reno that looks like a losing investment.
There can be some bright spots. Smaller hardware stores will make money as people do relatively small DIY projects to improve the condition of their current home. The larger stores get this business too, but it tends to be more than offset by the loss of contractor business (FAR more lucrative, and something the ACEs and True-Values don't really get in on). Of course the "grave-robbers" do well; gold buyers, auctioneers, pawn shops, repo firms; these guys eat well when other people are defaulting on loans or have to sell their stuff for fast cash. Most of these businesses are not publicly traded.
The number one money-making investment in a tanking economy is gold. When things go down the crapper, everyone wants gold, so if you see the train wreck coming far enough in advance, you can make a big move to gold and really make some money off that investment. For instance, when the first whispers about ARM adjustments and mass defaults reached the public consciousness in mid-2005, gold bullion jumped from about $400 to over $700 in a nine-month period. It cooled off again in 06-07 but only to about $600/oz, and then in late 07 it steadily climbed to peak at $1000/oz; even if you got in late, an investment of $1000 in July '07 in "bulk" gold would have netted you $650 in one year; that's a 65% APY. Then the economy hit bottom and a lot of investors ditched gold for investments they thought would pull back out of their holes quickly; For just a little while in '08 gold was down to $700 again. Then came all the government reports; unemployment not budging, home prices still declining, a lot of banks still hiding just how bad their position was. If you had seen that it was going to be bad, bad, bad, like a lot of now-billionaire hedge fund investors did, a $1000 investment in gold in July 05, and then cashing out at the tops of the peaks and buying back in at the major troughs, would be worth almost $4000 today. That's a 400% return over 7 years, or an annual average yield of 57%. There simply hasn't been anything like that in the last 7 years.