What happened

Shareholders of Home Depot (HD 0.65%) are beating the market this year. Their stock rose 15% compared with a 4% decline in the S&P 500 through the end of June, according to data provided by S&P Global Market Intelligence.

That boost has kept the home improvement giant just ahead of rival Lowe's (LOW 0.89%), which has also outperformed the market in 2020.

A couple shopping for appliances.

Image source: Getty Images.

So what

Home Depot started 2020 on a positive note by announcing accelerating growth in its fiscal fourth quarter and avoiding the slowdown that retailers like Walmart and Target had seen. Investors were even more pleased to see the chain perform well through the initial phases of the COVID-19 pandemic. Sales gains roughly doubled from quarter to quarter even though Home Depot curtailed its hours and canceled its traditional spring selling promotions.

Now what

Home Depot is likely to see elevated demand for some time as consumers prioritize home improvement projects. Its longer-term growth is more dependent on factors like economic expansion and unemployment, which right now suggest tough selling conditions on the way.

Yet the business has demonstrated its flexibility through past crises, and investors who simply hold the stock are likely to be rewarded as Home Depot keeps winning market share and increasing direct cash returns through dividends and stock buybacks.