Homeowners have been on a roll. Owning a home has been a good investment over the half dozen years since housing prices hit bottom after the crash. Prices over this period are up more than 30 percent nationwide — and much more in some places. Home prices in the District have risen by more than 50 percent.

But can we expect to see that same growth under the new tax law? Maybe not.

Home prices in much of the country are now higher than at the height of the housing bubble. Yet today there is no bubble. Housing is on a solid foundation. In the bubble, prices became disconnected from household incomes. But in most places today, the typical family has the income needed to purchase the typically priced home at current mortgage rates. And generally it makes financial sense to own your home instead of renting it.

Despite the raging bull market in stocks, housing has been an even better investment for most of us. Almost two-thirds of us own our homes, but no more than half own any stocks whatsoever, and only about one-fourth have stock holdings of any consequence. Homeownership is key to the financial well-being of the middle class, while stocks matter most to the wealthy.

Moreover, because the typical homeowner has a mortgage, the return on the stake in their home is magnified. A D.C. homeowner, for example, typically has a mortgage that is about half the value of their home — the other half being their equity. The return on their investment over the past six years is thus an astounding 100 percent, equal to the 50 percent price gain on the equity. Even the booming stock market hasn't enjoyed these kind of gains.

Not that leveraging up is a good idea. The obvious lesson of the foreclosure crisis was that too big a mortgage is lethal to remaining a homeowner. But these days homeowners remain cautious borrowers and are steadily building equity in their homes.

It would take a lot to derail the financial fortunes of homeowners. However, in some communities the recent changes to the tax code could do it. Owning a home is hurt by the tax law changes that reduce the value of the mortgage interest deduction, or MID, and the property tax deduction. The qualifying loan amount for the MID is now capped at $750,000, and the property tax deduction at $10,000. The value of both deductions is reduced by the doubling of the standard deduction, thus significantly reducing the number of households that itemize on their tax returns to take advantage of the deductions.

Current house prices reflect current tax breaks. That's because home buyers generally purchase as much home as they can afford, after considering taxes. If those tax breaks are scaled back, as they are in the new tax law, then house prices will suffer.

The MID is not a particularly effective way of increasing homeownership, as proponents of the tax break often argue. However, adjusting to the scaled-back MID will be financially painful for many homeowners who bought based in part on it.

The tax legislation will also hit housing via higher mortgage rates. The big tax cuts to corporations and taxpayers, financed by government borrowing more from global investors, will temporarily pump up growth. The problem is that the economy may overheat, given that the near 4 percent unemployment rate signals an economy arguably already operating flat-out. Inflation has not been an issue. But it could be, unless the Federal Reserve raises rates more aggressively to cool things off. Global investors will also demand higher interest rates to invest in the hundreds of billions of dollars in debt that must be raised each year to finance the tax cuts.

Considering all of this, national house prices will take an estimated hit of nearly 4 percent due to the tax legislation. Specifically, at the peak of the drag from the tax legislation on house prices 18 to 24 months from now, prices will be 4 percent lower than they would have been if there was no tax legislation.

The impact on house prices will be much greater for higher-priced homes, especially in parts of the country where incomes are higher and there were a significant number of itemizers, and where homeowners have big mortgages and property tax bills. Housing markets in the Northeast Corridor, South Florida, big Midwestern cities, and the West Coast will suffer the most. The hit to house prices in the broad D.C. area will range from 2 percent in Prince William County to almost 4 percent in the District and 5 percent in Arlington.

The new tax law also complicates things for Mae and Freddie Mac, the mortgage behemoths that are the nation's largest source of mortgage loans. In case you forgot, and Freddie failed during the crisis; they required the federal government to take control and pay out hundreds of billions to keep them running. While and Freddie are making money now, taxpayers are still on the hook for these institutions.

This will be clear in the spring when the large corporate tax cuts and arcane accounting rules combine to force and Freddie to report a big loss. Taxpayers will once again need to shell out billions of dollars to fill the financial hole. This won't have a meaningful impact on Fannie and Freddie's ability to guarantee mortgage loans, but it highlights that taxpayers are taking big risks — risks that will become much larger in the next economic downturn when homeowners struggle to make their mortgage payments. That doesn't seem likely this year or even next, but a recession will eventually come, and when it does, taxpayers could be writing big checks again. The Trump administration and Congress must figure out what to do with and Freddie before this happens.

The cut in corporate tax rates also creates an opportunity for and Freddie to reduce the mortgage rate for borrowers. That rate is based on a fee that and Freddie charge for the risk they take. The fee is set by their regulator, the Federal Housing Finance Agency, based on the returns that private institutions and investors would get if they made the loan. The lower tax rate means they can now charge a lower fee and continue to get the same after-tax return. The reduction in mortgage rates would be modest in the grand scheme of things, but meaningful, particularly for first-time home buyers for whom even the smallest change in mortgage rates can make the difference between becoming a homeowner or not.

Homeownership is still flagging. It peaked more than a decade ago, and for lower-income and minority groups, it is as low as it has been in more than a generation. Creditworthy borrowers are still having a tough time getting a mortgage loan, although this is slowly getting better. and Freddie are working hard at extending loans to borrowers who can only muster a small down payment.

However, this effort will only go so far, since it's hard for low-income renters to save for a down payment. Given the lack of affordable rental housing in much of the country, rents have jumped. The shortage is evident in vacancy rates, which are at 30-year lows, and set to fall further given the dearth of new construction.

Consider that no more than 1.2 million new housing units were put up last year, which is double the amount of construction at the low point during the crisis, but nowhere close to the 1.7 million units needed in a typical year to house the nation's growing population. This gap isn't likely to close anytime soon given the lack of available construction workers and tight land-use restrictions in many communities.

Rent increases will thus be an increasingly serious financial burden, especially for lower-income households in urban centers like D.C.

Housing has come a long way in recent years, but it is far from being the bedrock of financial strength that it once was, and it likely won't be anytime soon. Low-income renters are struggling to hold on as their rents quickly rise, first-time home buyers still find it difficult to find a mortgage loan, and many homeowners must now deal with fallout from the new tax code. Housing's prospects aren't bad, but they are disappointing.

Mark Zandi is the chief economist at Moody's Analytics.