What happened

At the start of 2019, many investors expected it was going to be a challenging year for homebuilders, with mortgage rates creeping higher and first-time home buyers potentially skittish due to economic uncertainty. But those higher interest rates didn't materialize and the economy remained strong, both of which helped power homebuilder NVR (NYSE:NVR) to a 56.3% gain for the year, according to data provided by S&P Global Market Intelligence.

NVR Chart

NVR vs. S&P 500 data by YCharts

So what

January was a tough month for the shares of homebuilders, with December existing home sales coming in well below expectations following four hikes to the fed funds rate in 2018. NVR reported better-than-expected earnings that month, but most of the focus on Wall Street was on whether the results were sustainable.

NVR proved its resiliency during the quarters that followed, helping to ease investor concerns and demonstrating that its fast turnover, low-inventory strategy holds up well regardless of market conditions. The Federal Reserve did its part as well, reversing course and lowering benchmark interest rates. That helped keep mortgage rates low, priming the pump for continued housing sales.

A new home under construction.

Image source: Getty Images.

Worth noting that the impressive gains in 2019 did little more than erase NVR's decline in 2018, when the stock collapsed in the second half due to interest rate concerns. For the two-year period, NVR shares are up a total of 8.56%, a result that trails the market by more than 12 percentage points.

Now what

As of early January, the rates for 30-year mortgages are trending about 75 basis points lower than they were a year ago, according to the Freddie Mac Primary Mortgage Market Survey,   and other macroeconomic conditions including employment remain conducive to home buying. Long-term demand for homes remains strong as millennials age into their household-formation years.

Homebuilders tend to be cyclical, and in the near term, a recession or economic slowdown could temporarily derail NVR's momentum. But for long-term investors, there is a lot of reason for optimism about this stock even after its impressive 2019 run.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.