How to trade the retail stocks' comeback

Shoppers pay for items at a Macy's store in New York.
Peter Foley | Bloomberg | Getty Images

So far, retail is the comeback kid of this earnings season.

Expectations hit rock bottom for department stores this season, after they reported their worst results since the recession last quarter

But strong earnings from Macy's and Kohl's have investors taking another look at the sector as more big names like Wal-Mart, Target and Home Depot get set to report next week.

If you think the retail earnings comeback will continue, these are your best ways to play it, according to Kensho, a tool used to quantify historical market action.

The SPDR S&P Retail ETF (XRT) has gained 5 percent or more in one month nearly 40 times since 2010. When that happens, these stocks lead the way.