The retail industry has experienced a recession over the last few years, with many stores posting sluggish traffic and comparable-store sales growth. As often happens with industry slowdowns, some of the best-performing companies end up thrown into the same bucket with the weak. And that left many specialty retailers with long-term track records of growth trading for very modest valuation multiples.

Tractor Supply (TSCO -0.99%) and Carter's (CRI -0.74%) are two such companies that have continued to post double-digit earnings growth, while their respective valuations contract. This sets up the potential for strong gains for prospective investors going forward.

A family and their dog walking in an open field during sunset.

Image source: Getty Images.

Tractor Supply

Tractor Supply is the largest retail chain catering to a rural lifestyle. The company has been around for 80 years, meeting the needs of farmers and ranchers, and it just opened its 1,700th store. The majority of its sales come from a combination of livestock and pet supplies (at 47%), and hardware, tools, and trucking supplies (22%).

Tractor Supply also has a small, growing base of 168 Petsense specialty stores, focusing on pet food and other pet services, which gives it additional growth opportunity for the long term.

Its rural niche has been very lucrative for the company. The stock is up nearly 50% in the past year and more than 950% in the past decade. Management sees the potential to open as many as 2,500 stores, so it's far from reaching its full potential.

Of course, you can't deliver gains like that as a retailer (especially with Amazon breathing down your neck) unless you are delivering consistent results. While the last three years have been challenging, Tractor Supply was able to deliver positive same-store sales growth.

In the first quarter of this year, the company posted its 39th out of 40 quarters of positive customer traffic trends. It's accomplished these results with a deep understanding of exactly what its customers want. Its Neighbor's Club loyalty program has over 7 million members, which is giving the company deeper insight into customer buying patterns. Tractor Supply also just started a subscription service for pet supplies, providing helpful insights there as well.

Full-year guidance calls for sales and earnings per share to grow about 6% and 23%, respectively. This is appealing earnings growth for a stock trading at 19x forward earnings. Tractor Supply also just increased its dividend payout for the eighth consecutive year, which brings the forward dividend yield to 1.6%.

A baby wearing a white knit hat and white shirt while lying on a white sheet.

Image source: Getty Images.

Carter's

Carter's operates under three distinct brands: Oshkosh B'gosh, Skip Hop, and the classic Carter's brand. It sells mostly children's apparel that it considers immune to the fickle nature of fashion and economic cycles. This has clearly served it well, given that the brand has been around since 1865.

Oshkosh has made its name well known over the years by focusing on premium quality playclothes for children. And under the Skip Hop brand, the company sells an assortment of things like kids' backpacks, lunch bags, diaper bags, and travel accessories.

The company is No. 1 in market share for baby and toddler apparel. It has 1,050 stores across the U.S., Canada, and Mexico, and 17,000 wholesale locations ranging from department stores to big retailers, including Walmart, Costco, Target, and Amazon.

Carter's stock has soared more than 700% over the last 10 years. A combination of margin expansion, share repurchases, and steady sales growth drove a 369% gain in earnings per share over the last decade. 

The impressive thing about this performance is that Carter's doesn't enter into long-term sales contracts with its wholesale customers. Instead, the company relies completely on its brand to maintain its relationship with major retailers. And that's all it needs to do.

Its brands are so well known by consumers that over 90% of millennial parents shopped the Carter's brand last year. The company has a near-term obstacle with the recent bankruptcy of Toys R Us (which generated 3% of Carter's sales last year). But Carter's is well positioned to recapture those lost sales, given that 93% of Toys R Us customers rated the Carter's brand as their top choice for baby apparel.

Management expects sales and non-GAAP earnings per share to grow about 3% and 12%, respectively, this year, which reflects the expectation to recapture about half of lost sales from the void left by Toys R Us.

Even with lower growth expectations in 2018, the stock is still attractive trading at 18x forward earnings. Carter's also pays a dividend yield of 1.6%, and it has been growing that payout at a double-digit rate annually since initiating it in 2013.