After a half-decade in the doldrums, homebuilders appear to be back in business. The four largest players in the industry, PulteGroup (PHM), Toll Brothers (TOL), Lennar (LEN), and D.R. Horton (DHI) have recovered strongly over the past two years, and have gained market share. But with the Federal Reserve suggesting it may soon start to change its tune, and mortgage rates moving higher recently after years of historic declines, risks are emerging.

The future of these companies is difficult to predict based on their recent history, due to the mega-cycle of the past decade. The industry saw an explosion of revenues during the real estate boom years of 2000-2007. Pultegroup, a builder of single family homes and residential subdivisions, for example, saw revenues rise from $25.01 to $57.17 per share over that period, while Toll Brothers, which builds luxury homes, townhouses, and condominiums, saw an increase from $12.51 to $37.39. Profits, meanwhile, increased more than fourfold for both companies, sending their share prices to all-time highs.

Then came the housing recession. Years of inflated home prices had led to a surge of overbuilding, which left the market with a huge overhang of housing inventory. The resulting drop in home prices led to years of staggering losses for homebuilders and significant inventory impairments, as building activity came to a screeching halt. From 2005 to 2011, new home sales declined by over 75%, and investors seemed to have given up on the industry by late 2011, with most of these companies’ stock prices hitting multi-year lows in the process.

During these lean years, there has been a silver lining for the four biggest homebuilders. Since the recession of 2007-2009, they have raised their market share substantially, in part by purchasing smaller competitors who are struggling to get financing from regional lenders who have raced to cut their exposure to housing, or have imposed much tougher financing terms after being burned in the last housing down cycle. As in many other industries, the participants with the lowest cost of capital tend to have a competitive advantage, and in this industry, the big four have the advantage.

Since 2011, the industry has seen an impressive rebound. Building activity has resumed, albeit at much lower rates than during the boom years. Furthermore, due in large part to earlier record low interest rates for mortgages, home prices and home sales have increased strongly over the past year.

This has led many to believe that the current housing recovery is dependent on a continuation of low interest rates. Thus, stocks in the homebuilding industry have become very sensitive to any indications that the Federal Reserve’s relatively easy monetary policies of the past few years will shift.

Federal Reserve Chairman Ben Bernanke indicated in late May that the central bank may be looking to taper off its bond purchases (which are part of its quantitative easing program) later in the year, if the economy continues to recover. That sent the bond market lower, as investors had apparently been expecting the Fed’s bond purchases to remain at current levels for much longer. Investors also seem to have taken this as an indication that the Federal Reserve may send interest rates upwards sooner than had been previously expected. Since mortgage rates tend to move in line with interest rates more broadly, such rates have risen as well, though they are still low by historic standards. This chain of events has weighed on homebuilder stocks in recent months.

With the share prices currently reacting more to the Fed than to fundamentals, those willing to take a bet on a sustained housing recovery may find this to be a decent buy-in point. PulteGroup, D.R. Horton, and Toll Brothers shares, for example, are now trading at a discount to the Value Line median based on projected 2013 earnings, Lennar stock is trading at a P/E ratio that is around the Value Line median.

With new home sales and construction figures still considerably below record levels, the rebound of housing construction may only be in its early stages. There is strong upside potential for investors with a long-time horizon, as the largest homebuilders will likely benefit from increased market share as well as rising building activity.

At the time of this article’s writing, the author did not have positions in any of the companies mentioned.