Back in the right direction. After falling more than 1% yesterday, the S&P 500 Index (SNPINDEX:^GSPC) gained 34.5 points, almost 1.1%, on Sept. 22.

Today's recovery was the result of broad gains for tech, telecom, and consumer goods stocks. Twitter (NYSE:TWTR) shares were today's biggest-gaining S&P stock, up 7% despite the lack of any news, while Amazon.com (NASDAQ:AMZN) shares moved up 5.7% on an analyst upgrade and rumors about Prime Day. Shares of D.R. Horton (NYSE:DHI) and Lennar (NYSE:LEN) were up more than 4%, making homebuilders one of the best-performing groups of stocks, following another record month for existing home sales. 

Hammer hitting a nail.

Image source: Getty Images.

Amazon upgraded; Prime Day expectations heat up

Bernstein analyst Mark Shmulik made Amazon investors a little money today. In a note to investors, Shmulik said Amazon's price is an "attractive entry point" for the e-commerce giant and set expectations that its dominant share of retail would only grow. 

Before today's pop, Amazon shares were down more than 15% since the early September high, and they're still down almost 12% from the high after today's close: 

AMZN Chart

AMZN data by YCharts

Investors might also be trying to front-run Amazon's annual Prime Day event. Usually held in June, the huge sales event was delayed this year because of the coronavirus pandemic, and sources say this year's Prime Day is likely to take place in mid-October now. 

Home sales surging on strong demand, tightening supply 

The coronavirus pandemic made it more difficult for many people to buy a home in the second quarter. But the past couple of months have seen existing home sales increase to some of the highest levels on record.

In July, existing home sales soared 24.7% from June, driven in large part by a lot of pent-up demand from buyers who couldn't close deals in the second quarter. Well, another month, another massive increase: Existing home sales were even higher on a seasonally adjusted basis in August, up 2.4% sequentially and almost 11% over last year, reaching the highest levels since 2006

So how do existing home sales relate to homebuilders? Simply put, the existing supply isn't close to meeting the demand. At the end July and August, respectively, existing homes listed for sale fell 21% and 19%, respectively. 

And that's the opportunity investors see. Millions of prospective buyers want homes, and there just aren't enough of them. Joining Horton and Lennar in today's move higher were NVR (NYSE:NVR) and PulteGroup (NYSE:PHM), both up almost 3%. 

So far this year, the SPDR S&P Homebuilders ETF (NYSEMKT:XHB) has soundly outperformed the broader S&P 500: 

XHB Total Return Price Chart

XHB Total Return Price data by YCharts

This is a reminder that the 2020 coronavirus recession has been anything but "normal." Home sales often tanks during recessions, but that certainly hasn't been the case this year. There's risk that a protracted recession starts affecting jobs in a more permanent way, and that could harm housing at some point. 

But even with that risk, the bigger long-term trend bodes very well for homebuilders. Millennials are moving into the housing market aggressively, and there's just not enough affordable housing to meet the demand, With interest rates expected to be at historically low levels for the foreseeable future, top homebuilders like NVR could prove winning investments for years to come.