Although no investor enjoys seeing the value of their portfolio decrease, viewing the cup as half full means focusing on the things that are beneficial about bear markets, and one of them is amazing share prices. Buying top stocks the dip on gives you a head start on maximizing your returns.

It's not necessarily comfortable, nor is it simple to find a top, profitable stock posting outrageous growth rates and trading at a cheap price. The hunt is usually more nuanced, and requires envisioning what a company could look like in the future. In that sense, investing is a bit of a risk. But Home Depot (HD -1.44%) has demonstrated time and time again that it can rise above short-term pressure and provide shareholder value. Here are three reasons to buy Home Depot stock now.

1. Home Depot is expanding its moat

Home Depot is the largest home improvement retail chain in the U.S., with 2,322 stores in North America and $157 billion in fiscal 2022 sales. Sales increased 4% in its fiscal 2022 (which ended Jan. 29), comparable sales increased 3%, and earnings per share (EPS) rose 7.5%. Those numbers demonstrate resilience under pressure.

There are a few reasons Home Depot is able to post such solid results. One is the simple fact that it operates in an industry that is almost always growing. When the housing market has momentum and people are buying new homes, Home Depot benefits from higher sales.

But even when the housing market is in the dumps, the retailer still benefits from people who are looking for ways to redecorate since they're not moving. As the leader in its niche, it leverages its size and ubiquity to drive engagement.

Management expects pressure to build in 2023 as inflation remains high and the housing market continues its slump. Benchmark interest rates are up, and observers expect the Federal Reserve will raise them a bit further. That should continue to translate to higher mortgage rates, which suppress home sales. Home Depot benefited from the work-from-home trend, but that is beginning to reverse as well. The company has managed to keep increasing profits despite inflation, but management is guiding for a slight decline this year.

However, it has made significant improvements to its operations to protect its status as the leading U.S. home improvement chain. These are simple but powerful actions, such as upgrading its digital pro services and launching the hdPhone, a mobile device for its workers that improves efficiency. These efforts continue to pay off even now, and will help drive higher sales when the economy improves.

2. It pays an attractive and growing dividend

Like many large, established companies that generate tons of cash but grow sales relatively slowly, Home Depot pays a dividend. It yields roughly 3% at the current share price, and management raised the payout by 10% in February.

It has paid dividends since 1987, although it paused its dividend hiking during the 2008 financial crisis. Otherwise, it has raised its payouts consistently, and it now has a 13-year streak of increases.

Dividend stocks are good choices to buy in any economy, but they're even better when stock prices are down. Reliable dividend stocks pay out, and usually raise their dividends, despite market fluctuations.

3. The price is right

Home Depot's stock price is down nearly 10% over the past 12 months, and it's also down 11% year to date.

At this price, it's trading at roughly 17 times trailing 12-month earnings. Not only is that an objectively low price-to-earnings (P/E) ratio, it's also a substantial discount to its 5-year average, which includes the early 2020 market plunge. For a broader context, the current P/E ratio for the S&P 500 is 22. Meanwhile, the average P/E ratio for the home improvement retail industry is 18.

HD PE Ratio Chart

HD PE Ratio data by YCharts.

There are definitely things to be cautious about in the current atmosphere. However, long-term investors should be able to look beyond the near-term challenges and at Home Depot's edge in its market. And this price won't last in a bull market.

Home Depot's stock price has increased by about twice as much as the S&P 500's level has over the last 10 years, and it has the potential to outperform the market in the future.