The S&P 500 may be trading near its all-time high, but that doesn't mean that every stock is participating in the prosperity. Dollar Tree Stores (NASDAQ:DLTR) and AutoZone (NYSE:AZO) are both high-quality retailers that have been left out of the recent rally. Here's why opportunistic investors might want to pick up a few shares while they still trade at a discount.

"Discount" written on paper

Image Source: Getty Images.

The other retail disrupter

Most investors assume that big-box retailers like Wal-Mart and Target have been suffering as of late because of e-commerce companies like Amazon.com. While Amazon has certainly been stealing customers away from these low-cost retailers, ultra-discount chain stores such as Dollar Tree have also been a major thorn in their side. One reason is that dollar stores require much smaller footprints, and thus can be easily placed in convenient locations in low-income neighborhoods. Since residents of those areas tend to be price-sensitive to the cost of fuel, they have been increasingly willing to shop at their local dollar store. This fact has allowed companies like Dollar Tree to gobble up market share at the low end of the space for years.

Last quarter, Dollar Tree's comp sales grew by 1.2%, which is a decent result given the tough retail environment. This suggests that the company's convenience and value strategy continues to resonate with customers.

Looking ahead, Dollar Tree has a few growth levers in place that should help to move its bottom line forward. These include the promised synergies from its recently completed takeover of Family Dollar. This transaction transformed this company into the largest dollar store chain in the U.S., and management is targeting $300 million in annual merger-related savings. Add in the expectation of slow and steady market share gains, and Dollar Tree's bottom line looks poised for growth. 

Analysts believe that Dollar Tree will be able to advance its EPS by more than 13% annually over the next five years. Despite the bullish forecast, Dollar Tree's shares are currently down more than 22% from their recent highs, due to less-than-hoped-for fourth-quarter sales growth and concerns about the impact of possible changes to corporate tax laws. While potential tax changes are worth keeping an eye on, Dollar Tree stands to benefit from the continued secular shift away from big-box retailers. If it does, then picking up shares now could prove to be a profit-friendly move.

AutoZone hits a pothole

Did you know that the average light vehicle in the U.S. is more than 11.5 years old? This figure has been creeping higher for years thanks to improvements in vehicle quality, which makes consumers more willing to hang on to their cars or trucks. But that, in turn, drives increased demand for repair shops and auto parts retailers.

One prime beneficiary of this trend is AutoZone. The company has showered investors with huge returns thanks to the flawless execution of its simple, but effective, growth strategy. It has placed an emphasis on providing both consumers and repair shops with great customer service so they can quickly get the parts they need. This has led to steady gains in comparable-store sales and margins, both of which have driven net income higher. Boosted by its habit of repurchasing shares, AutoZone was able to report 41 consecutive quarters of double-digit EPS growth. Reflecting that, the company's stock has been a home run.

AZO Normalized Diluted EPS (TTM) Chart

AZO Normalized Diluted EPS (TTM) data by YCharts

Unfortunately, that incredible earnings streak recently came to an end. In its most recent quarter, AutoZone reported that same-store sales were flat, and that EPS only grew by 8.8%. Management said the disappointing result was driven by delayed tax refunds and margin headwinds from investments in its supply chain. However, the company's commercial business grew by 7.2% and its "buy online pick-up in store" service posted growth of 20%. Taken as a whole, the results suggest that this earnings blip was a one-time issue as opposed to the start of a long-term trend. 

Despite the earnings speed bump, management still believes that it can drive double-digit EPS growth in the years ahead. Analysts appear to agree, and are currently projecting 11% annualized bottom-line growth over the next five years. Despite this potential, the recent earnings report drove AutoZone's stock down more than 12% from its 52-week high. Shares are now trading for less than 15 times forward earnings, which I think is a bargain for such a high-quality business. 

Brian Feroldi owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon. The Motley Fool recommends AutoZone. The Motley Fool has a disclosure policy.