Stock market downturns can be stressful to experience, but the truth is that they should be welcomed by investors. As long as your investing timeline stretches into multiple years, these drops are nothing to fear. Instead, you can look at them as opportunities to make stock purchases at a discount and accumulate more shares in preparation for the next cyclical upturn ahead.

While the S&P 500 is still in positive territory for the year in 2023, markets have fallen from their late-summer highs on fears that the U.S. might still slip into a recession. This drop has amplified declines in two retail stocks: Ulta Beauty (ULTA -0.40%) and Tractor Supply (TSCO 3.26%), which have seen their shares drop 15% and 10% respectively so far this year.

But I do not believe their discounts will likely last for very long. Here's why.

Why buy Ulta Beauty

Ulta Beauty is doing great things in the spa and beauty products niche. The company posted a solid 8.7% increase in comparable-store sales in the first half of its fiscal 2023 on top of a 16.2% increase in the prior-year period. "The Ulta Beauty team delivered another quarter of strong performance," CEO Dave Kimbell told investors in late August.

It's true that there are warning signs about where those demand trends are headed. In its fiscal Q2 (which ended July 29), Ulta Beauty experienced declining average spending rates that have pressured its sales and profits. Rivals are cutting prices, forcing Ulta to do the same.

Yet, the retailer is still enjoying excellent customer traffic trends and solid profitability. In fact, management predicts that operating income will land at around 15% of sales this year, just a small softening compared to last year's 16% rate.

Ulta's stock has been discounted to a price-to-sales ratio of 1.9, down from nearly 3 earlier in the year. Investors should consider taking advantage of that attractive valuation.

Why buy Tractor Supply

Tractor Supply stock is also underperforming the market due to some short-term concerns. The rural lifestyle retailer in July reduced its 2023 outlook due to softening consumer spending patterns. The 2% comparable-store sales increase it reported for the second quarter was its weakest result on that metric in some time. Management blamed the sluggishness on cautious consumers plus poor weather in June.

This business is still healthy and is targeting a long runway for growth. Gross profit margin rose last quarter and is forecast to land at a robust 10% of sales for the year. Revenue won't top $15 billion in 2023, as management had earlier predicted. But its updated guidance range of between $14.8 billion and $14.9 billion is still far ahead of the $8 billion that Tractor Supply was generating before the pandemic.

The next few quarters might be rocky when it comes to sales and earnings trends. But management is still planning to accelerate its expansion strategy by opening 80 new stores next year and 90 new stores annually after that. Management believes the U.S. market can support as many as 3,000 locations compared to its current count of 2,200.

Cautious investors might want to simply watch this stock for a while as more concrete information arrives about the health of the U.S. economy. The best returns, though, will accrue to investors willing to buy the stock during these times of elevated pessimism in the retail industry.