Q: It seems like every week, there's another headline about a retailer going bankrupt or closing stores. Should investors avoid all brick-and-mortar retail stocks now?

Through the first three quarters of 2017, there have been 22 major retail bankruptcies, including high-profile names like hhgregg, Toys R Us, and True Religion. However, all but a select few have two common characteristics: They sell discretionary goods (things people want, not that they need) and aren't discount-oriented businesses. Retailers who sell full-price discretionary goods don't have the brightest future right now, and it's tough to justify investing in almost any company in this category.

On the other hand, discount-oriented retailers and those who sell non-discretionary products are doing quite well as a group. The e-commerce boom has made discounted products commonplace, so consumers don't want to pay full retail anymore, but they do appear to be eager to shop in-person for bargains.

Wal-Mart Stores (NYSE:WMT) is the best example of a company benefitting from this trend. The retail titan's stock is actually up 40% in 2017 on strong sales figures and increased guidance. Five Below (NASDAQ:FIVE) is another discount retailer that's been absolutely crushing it lately, appealing to bargain-hungry shoppers.

Matthew Frankel has no position in any of the stocks mentioned. The Motley Fool recommends Five Below. The Motley Fool has a disclosure policy.