What happened

Housing-related stocks, including homebuilder D.R. Horton (NYSE:DHI), home improvement retailer Lowe's (NYSE:LOW), and flooring specialist Lumber Liquidators (NYSE:LL), saw big gains in May, according to data provided by S&P Global Market Intelligence

Shares of D.R. Horton, the largest residential homebuilder in the U.S. by number of units sold, were up 17.1% for the month. Meanwhile, Lowe's shares soared 24.4%, and Lumber Liquidators stock skyrocketed an eye-popping 41% in May (thanks in part to a surprisingly good first-quarter earnings report on May 28). All three handily trounced the S&P 500's 4.5% gain. 

Hardwood flooring with tools.

Image source: Getty Images.

So what

Two trends were working in favor of homebuilding and home improvement retailers in May.

The first was optimism in the housing market. This was good news for D.R. Horton, which makes its money building and selling new homes. Robust home sales also benefit Lowe's and Lumber Liquidators, as sellers make repairs and upgrades to prepare their homes for sale and buyers make alterations to homes they've just bought. The coronavirus pandemic essentially shut down the housing market across most of the country. Sellers of existing homes pulled their houses from the market, not wanting to invite multiple groups of strangers into their homes for showings.

Prospective home buyers, too, stopped shopping. In April, stay-at-home orders affected more than 90% of the U.S. population, preventing most buyers from meeting with realtors and visiting model homes or open houses. In addition, uncertainty about the state of the U.S. economy almost certainly played a factor: The stock market crash had prospective buyers worried about the savings they might have used for down payments, and rising unemployment had people worried about taking on new financial obligations like a mortgage. 

Although the housing data from March -- which was released in early May -- reflected the uncertainty and speedy drop in activity at the beginning of the crisis, subsequent data from various sources, released later in the month, seemed to indicate a cause for optimism. In particular, weekly mortgage applications for new-home purchases (as opposed to refinances) began to rise after falling for most of April, offering hope that demand for new homes had just been deferred rather than destroyed.

What else

The second trend benefiting homebuilders and home improvement retailers is the easing of stay-at-home restrictions and the gradual reopening of businesses and the U.S. economy as a whole. 

Naturally, while people were confined to their homes, they weren't out shopping for new cabinets, new tile floors, or new houses. Online home tours and product photos can only do so much for people who are interested in improving their existing homes or moving to new ones.

A mid-May survey from the National Association of Realtors (NAR) indicated that as states began to reopen their economies and lift stay-at-home orders, home buyers and sellers were eager to reenter the market. After being cooped up in their existing homes or apartments for two months, lots of people realized the limitations of their living spaces. Even people who weren't interested in buying a new home -- which is a major catalyst for home improvement purchases -- probably noticed things around their existing home in need of fixing.

With retailers, realtors, and model homes now open again in most of the country and the weather warm, Wall Street is expecting a flood of activity in the housing market and home improvement retailers like Lowe's and Lumber Liquidators. 

Now what

Hopes may be high for these sectors, but reality could still deal a blow to those lofty expectations. 

For one thing, the COVID-19 pandemic is still going on. While overall reported U.S. cases have declined since April, we're not seeing a significant drop in daily reporting of new cases. This may be due to increased testing availability, but it's worth remembering that the situation remains fluid. Similarly, while the stock market seems to be shrugging off the effects of the pandemic, high unemployment, and other concerns, those issues haven't gone away. 

If you're bullish on the economy and think the worst is behind us, the housing construction and home improvement sectors look like good bets, as they're both likely to benefit in the coming months. On the other hand, if you're expecting things to go south, these sectors are likely to be among those hit hard by a potential downturn.