This could be the best back-to-back holiday season in more than five years, but a top Wall Street retail analyst says that many of the retail sector's troubles will persist even during the Christmas season. Some stores and brands should be strong through the end of the year, but investors who want to cash in on the holidays need to be thoughtful shoppers when it comes to retail stocks. "Retail is still a difficult industry mired in e-commerce-based disruption. There are more store closures and more bankruptcies in the past two years than over the past five years combined," said Matthew Boss, J.P. Morgan's equity research analyst focusing on retailing, department stores and specialty retail, in an interview with CNBC on Thursday. Last week, Lowe's said it would close 20 U.S. stores and 30 in Canada, while Sears said it would close another 40 stories on top of the 142 stories it already announced would be closing. Boss said that rising wages and transportation prices aren't helping the bricks-and-mortar retailers competing with Amazon either. This holiday season marks the first time that Amazon has released a printed toy catalog for shoppers. It is not always as simple an equation as holiday sales periods equal e-commerce outperformance. Alibaba just recorded its biggest Singles Day sales ever with over $30 billion in sales, but historically, the Chinese e-commerce giant hasn't seen a strong correlation between holiday bumps and its stock price. Singles Day sales are five times as high as the U.S. equivalent, Black Friday, and yet over the past decade, Alibaba shares have averaged a four percent decline in the month after the November holiday, according to data from markets analytical service Kensho.

U.S. retail trades have outperformed around Black Friday

But Amazon and the U.S. consumer plays have done better during the Black Friday trading period. According to Kensho data on sectors, the S&P retail, which trades through the SPDR Retail ETF (XRT), and S&P consumer discretionary, which trades through the SPDR Select Sector SPDR Consumer Discretionary ETF (XLY), have been No. 2 and No. 3 among all sectors in average performance over the past decade in the one-week period from one week before Black Friday to one week after (the financial sector is No. 1 overall). Retail and consumer discretionary have posted average returns of roughly 5 percent. Amazon has done ever better, with an average return during this two-week run of near-6 percent, according to Kensho. Walmart has returned just over 2 percent during these periods, according to Kensho, trailing not just many of these retailers, but also the S&P 500.

Shoppers enter Macy's department store on 'Black Friday' on November 23, 2017 in New York City. Stephanie Keith | Getty Images

There is good news as the holiday shopping season begins. Domestic macroeconomic indicators are strong. A 40-year low in unemployment and a consumer confidence reading at a 20-year high provide a consumer backdrop that's the best it has been in decades. Even the weather outlook looks promising. The JP Morgan analyst provided three keys to the retail sector outlook during holiday shopping season.

Record consumer confidence means less discounting

There have been some concerns that a holiday hiring pace that is not keeping up with last year, but Boss said he is more keyed on whether the consumer is planning to spend more. He noted that last year was the best holiday season in three years, and as a result companies have been hesitant to make bets that they can surpass that level of sales. But the strengthening of the U.S. consumer as the year has progressed bodes well for sales. "Management teams are telling us consumers are trading up within stores, particularly in department stores. Discounting is reduced. We think the consumer is really showing a trade-up dynamic and that will be key to this holiday season," Boss said. "National brands, name brands, will be able to do full price selling rather than mark-down. Retailers can win on the top line and margins."

Using a barbell approach makes the most sense for investors

Boss said using a barbell approach with retail stocks still makes the most sense for investors, with the heavier bets placed on the off-price companies including Burlington, TJX and Ross, and at the other end of the barbell the global fashion brands, including Lululemon, Ralph Lauren, VF Corp. and PVH. In the middle are the best bets in the more troubled spots within the sector, such as department store stock Kohl's. The value and convenience of the off-price sector are still a compelling story, in Boss's view, while the global brands are among the only companies in the retail sector that are "in control of their own destiny," he said. It is harder these days to think in terms of distinct retail buckets with e-commerce blurring the lines, but Boss said from a consumer standpoint it is the global brands that retain loyalty. Ross and Burlington have been the best single-stock trades in these Black Friday periods, according to Kensho, with average trades in the two-week window of over 7 percent, though Burlington only has a five-year trade history after a 2013 IPO. VF, Ralph Lauren and PVH have matched the average 5 percent return of the retail and consumer discretionary sectors over the full-decade trading history. Kohl's hasn't done poorly, with an average return of 3 percent, according to Kensho, but has trailed the other stocks and sector trades over the past 10 Black Fridays.

The retail sector tracked by the XRT ETF already is up near-9 percent this year, through Nov. 9, according to XTF.com. But the consumer spending stock basket trade has not been a consistent bet for investors throughout 2018, with only two retail ETFs generating positive inflows of more than $100 million year-to-date, the Fidelity MSCI Consumer Discretionary ETF (FDIS), at $450 million, and Vanguard Consumer Discretionary ETF (VCR), at $313 million.

Accept that recent volatility won't be disappearing