The S&P 500, America's benchmark index of 500 of the largest U.S. companies, is up 18.2%, year to date, as of this writing. Last year, the S&P 500 dropped 18.1%, but in each of the previous three years, it rose by double digits. Is a market correction or crash around the corner to be followed by a recession? The answer is: No one knows, and no one can know.

For long-term investors, it's best not to fret too much about market downturns, as they will inevitably happen now and then -- usually not lasting too long. A smart way to prepare for them is to have a ready list of stocks you'd love to own -- at the right price. Here are three such portfolio contenders. See if any or all of them interest you.

1. Home Depot

Home Depot (HD -1.53%) bills itself as "the world's largest home improvement retailer." As it sports a market value recently topping $300 billion, above Lowe's $114 billion, that's easy to believe. It recently encompassed more than 2,300 stores across the U.S. and beyond, and it employs more than 450,000 people.

It's big, and it's getting bigger. In its third quarter, revenue took a step back, but it's up 17% from 2021 levels. And Q3 results still exceeded expectations. The company has been pressured by high interest rates and inflation holding back many homebuyers, home equity borrowers, and renovation projects.

Those headwinds are not permanent, though. Many expect interest rates to not go much higher, and inflation has been plateauing or dropping. Shares are not a bargain, but a market pullback could make them one. Home Depot's forward-looking price-to-earnings (P/E) ratio was recently 20.5, a bit below its five-year average of 21.1 And its dividend recently yielded 2.7%, while having been hiked by an annual average rate of 15% over the past five years.

2. Sherwin-Williams

Paint giant Sherwin-Williams (SHW -1.29%) may not be a market darling, but it should be. Consider that over the past 20 years, it has averaged annual gains of 18.1% compared to only 8.5% for the overall S&P 500. (Those numbers are 19.3% and 9.7% with dividends reinvested.)

The world's largest paint and coatings company, it was founded right after the Civil War, in 1866, and now employs more than 64,000 people in 120-plus countries. It recently boasted more than 5,000 stores and branches, and 136 manufacturing and distribution facilities, and its brands include Valspar, Minwax, Purdy, Krylon, Thompson's Water Seal, Cabot, and Dutch Boy. Sherwin-Williams rakes in around $23 billion annually.

In Q3, the company reported same-store sales up 3% year over year and diluted earnings per share up 12.6%. It, too, has been pressured by high interest rates and inflation affecting the housing market, and it, too, should see its fortunes improve once those issues abate. Meanwhile, it pays a dividend that, while a modest 0.9%, has been a fast grower, rising by an annual average of 16% over the past five years. Its forward P/E ratio was recently 30.9, a bit above its five-year average of 26.1.

3. Walmart

Walmart (WMT 0.77%) is one of the biggest companies on earth, with a market value topping $400 billion and a dividend recently yielding 1.5%. (That payout has increased at an average annual rate of only 2% over the past five years, though.) It employs a whopping 2.1 million people and sports more than 10,000 stores in 19 countries. Interestingly, Walmart's net-profit margin, like that of many retailers, is rather low at a recent 2.23%. But that's OK, since it has so much volume: It has posted revenue of $631 billion over the past year.

Walmart is still growing, too, in part by expanding in new directions. It has become the largest supermarket chain in the U.S., for example, and is growing its healthcare business, too.

Our suboptimal current economic condition is affecting even Walmart, with its CFO John David Rainey noting after Q3 that "We're not immune from the vagaries of the economy. We see our customers showing ongoing discretion in making trade-offs to be able to afford the things they want, given the sustained high cost of the things they need. ... So, sales have been somewhat uneven. ..." The company's forward P/E was recently 25.1, a bit above its five-year average of 23.1.

There are many other solid companies out there that could serve your portfolio well over the long run, especially if you buy into them when they seem undervalued. Take some time to build a watch list of portfolio contenders, so you're ready to pounce if there's a market pullback.