In this segment of Motley Fool Money, host Chris Hill, Million Dollar Portfolio's Jason Moser and Matt Argersinger, and Total Income's Ron Gross weigh in on Wal-Mart Stores(WMT 0.56%) third-quarter results, which were better than expected.

Just a few years ago, Wal-Mart's U.S. business was in decline, but recently, the giant retailer has been on a tear. How did Wal-Mart achieve these remarkable results, and where does it go from here? Then the guys try to put the situations of Wal-Mart and perennial disruptor Amazon (AMZN -0.52%) in context, given the impressive moves lately made by other retailer stocks.

A full transcript follows the video.

10 stocks we like better than Wal-Mart Stores
When investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.*

David and Tom just revealed what they believe are the 10 best stocks for investors to buy right now… and Wal-Mart Stores wasn't one of them! That's right -- they think these 10 stocks are even better buys.

Click here to learn about these picks!

*Stock Advisor returns as of November 6, 2017

This video was recorded on Nov. 17, 2017.

Chris Hill: We begin with one of the most surprising turnarounds in recent history, and that's Wal-Mart. Shares of Wal-Mart hit an all-time high this week after the third quarter sales came in higher than expected. And for a bricks-and-mortar retailer, Ron, Wal-Mart's online sales are really making some headlines.

Ron Gross: I love a good fight. Come on, Amazon, bring it! Come on. Nice results. 50% e-commerce jump there. Now, that's down from the prior quarter, which was a 60% jump, but let's not haggle over numbers. That's a pretty impressive jump. For 13 consecutive quarters, the U.S. locations have had same-store sales increases. So, it was just a few years ago I remember, every time we talked about Wal-Mart, we said, "The U.S. business is struggling, they can't grow same-store sales," and they've done a great job turning that around. Grocery is a big category for them, it helped them this quarter as well. It delivered the strongest quarterly sales performance in nearly six years, so, they're actually building on their grocery business. They actually raised expectations, so they not only see this quarter good, but they see it continuing into the future.

Hill: You look at a few years ago, Jason, and that's right about the time when Doug McMillon became CEO of the company. He and his team have got to get the lion's share of the credit here.

Jason Moser: You have to take your hats off to them. But I also feel like, at this point, I'm still aware of the market share numbers and what not, but isn't e-commerce really just commerce? That is the state of commerce at this point. It's the one driving the truck. So, I think the sooner we stop differentiating between the two and start identifying the companies that are embracing that transition, I think you probably have the opportunity to identify some better investing opportunities. Certainly, Wal-Mart has done a good job embracing that opportunity. But let's go back to what Ron was talking about, and let's haggle over numbers a little here.

Gross: Let's do so, please.

Moser: Let's throw some context out here. I think the grocery point you made was very important here, because when you look at Wal-Mart's U.S. business, it brought in about $370 billion in revenue in 2017. The U.S. business. Now, grocery was 56% of that, or around $210 billion. Now, this is all part of that $485 billion that Wal-Mart brings in total. Now, we think about that, $210 billion in groceries, Amazon brought in $161 billion all-told for the trailing 12 months. So, on the one side, you can see how big Wal-Mart is. There's a lot to how they built this business over the years. On the other side of the coin, I think it really shows the opportunity that's still out there. It certainly sheds a lot more light on Amazon's Whole Foods acquisition. And now, you really understand why they're cutting prices at Whole Foods so quickly, so they can compete with something like a Wal-Mart, because that grocery opportunity is so big. So, you have Wal-Mart probably playing a little bit more defense right now, Amazon and Whole Foods playing a little more offense, it's still a very big opportunity out there for both concepts.

Matt Argersinger: I'll have about two more numbers. As impressive as the e-commerce growth is, and it's completely impressive, and I for one have been way too critical of Wal-Mart on this show. I think with the investments they've made, Jet.com, the management has been extraordinary, and the growth is reflecting that. But still, as impressive as that growth is, overall revenue up 4% year over year, and it just shows you, this business, while it's made some impressive investments and some strides in e-commerce, it's going to take a lot of continued growth in that area to really move the needle big for the top line. Then, operating profit down, which is a reflection of how much they have to invest in the business to compete. So, now I look at a stock at 25X-26X earnings with that kind of growth trajectory, it seems expensive to me.

Gross: Agreed. And as you said, the top line, you see growth, but it's not going to knock the cover off the ball. Then you see aggressive promotions that are necessary in order to compete with the likes of Amazon, and like you said, we see profit margins dip. So, what are you going to pay for a company with top line growth rather anemic and profit margins that are deteriorating slowly? You have to be careful.

Moser: And with Wal-Mart, they're trading one for the other. They're getting more in the way of e-commerce sales, but it's not like it's something that's juicing the top line at all. To your point, that top line growth really isn't there. Conversely speaking, you look at Amazon, and that top line is still growing at a phenomenal pace, 20%, 30%, 40% quarter in and quarter out. Now, you understand why the market is paying so much for Amazon today and so little for Wal-Mart.

Hill: But, for the longest time, we looked at these two companies and stocks, and a lot of people would frame the question, is Amazon going to put Wal-Mart out of business? Shares of Wal-Mart are up about 40% this year. So, while they may not be hitting the cover off the ball, they are moving in the right direction, which makes me wonder if this is one of those industries, and it seems like it is, where there's going to be more than one winner. If Amazon is a clear winner, if Wal-Mart is not going to be put out of business by Amazon, someone big out there has got to be not pleased about the fact that Wal-Mart has had this resurgence. I'm wondering if it's Target (TGT 0.40%). I'm wondering if it's Costco (COST 0.39%).

Gross: I was going to say Costco. Even from a stock perspective, you're paying up for Costco 28X or 29X, in a time where they're probably a little bit worried here about everything that's going on in grocery in particular. I would be careful. And then you get to Target. Target seems like an also-ran. "Oh, yeah, they do it too. I forgot about Target. They're in this business as well." Whereas a decade ago, we thought they were something special. It seems like they've kind of gotten lost.

Hill: Let's go broader on retail. We've talked on this show, and Bloomberg had a huge article recently about the coming retail apocalypse in America. Maybe it's karma, Matty, but retail stocks just had their best week of 2017. Ron mentioned Target. Target dipped because they lowered guidance for the holiday, but they were back up on Friday, and we saw really surprising retail stocks rise on Friday. Abercrombie & Fitch, Foot Locker, a couple of basic niche retailers that were almost at death's door and bouncing back up. And I'm wondering if we need to rethink this at least a little bit.

Argersinger: I think we do. I don't want to use a technical term, but you could argue that a lot of these companies were oversold, because the pessimism around anything not Amazon in the brick-and-mortar retail space, it built up so much that everyone really thought these companies were going to be left for dead. I think the narrative that maybe I in particular have pushed and we've been talking about for years now is, it's Amazon against the world and everything else is going to lose and Amazon is going to be the one left standing at the end of the day. And I think that's just not going to be the case. I think, if you're a business, especially one that's embraced online channels and done so successfully, and you have a good customer experience, you're going to succeed over time. It's just a matter of finding that market. And I think we probably got way too pessimistic on a lot of these companies.

Moser: I feel like it wasn't that long ago where I said something on the show that, I felt like we're at peak Amazon. It seemed like every conversation, "I was just cleaning the toilet the other day, and Amazon." I mean, whatever it is, Amazon was introduced into the discussion.

Gross: [laughs] I don't know what that means.

Moser: It seems to me that we would talk so much about how well Amazon was doing and taking over the world, and left all of these other retailers for dead. As that went on, we got a lot of money out there looking for relative value out there. And I'd say in probably a fairly expensive market today, a lot of those retailers that we were giving the thumbs down on look relatively cheap compared to others. So, I think there's a lot of money flowing into those companies today, because of those results that were less bad than expected. Now, I wouldn't be surprised at all if around February of 2018 we start seeing these holiday quarters and a forecast for the coming year, maybe not quite as healthy as people were hoping. I wouldn't be surprised at all to see a lot of that money flowing back out. I don't think all the money that's going into these stocks today -- Abercrombie & Fitch, Urban Outfitters, Gap -- listen, just because their stocks are going up doesn't mean they're good businesses. It just means there's probably a lot of short-term money out there in Wall Street that sees a profit opportunity.

Argersinger: Yeah. I think a lot of it was, we assume that whatever Amazon disrupted, they would take -- in other words, that became their market share. And that's not the case. I think what's happened is, retail has been disrupted. And we've already seen plenty of bankruptcies. And we know we have too much square footage in the United States relative to other countries in terms of retail. So, I think at the fringes, we're going to see a lot of bad retail companies go under. But, the ones that persevere, have the omnichannel presence, have good customer experiences, are going to thrive. So, it's not a complete wash-out like we've been talking about.

Gross: I'll just throw in the two cents that, I think if you're thinking about putting money into retail, make sure you differentiate between investing and playing this for a trade. We obviously advocate for investing, finding a company that you think does a great job that you can own for a long period of time and will continue to increase earnings over time, vs. a company that may have been oversold, as Matty said, and you can play it for a pop. That's a hard game to play, especially in specialty retail, where, as Jason said, I think in a couple of quarters from now, we might start to see the tide turn, and you'll see the stocks go back down again. So, just, be careful.

Hill: Is there one thing in particular that investors should look for when they're looking at a smaller, maybe a niche retailer? Again, you look at the Retail Index this week, best week of 2017, and it is fueled not just by Wal-Mart and Home Depot, but also by retailers like Children's Place and even Macy's. And I'm wondering if there's a particular metric or something in particular you want to hear out of management if you're trying to decide if this is a trade or this is a business that actually has value.

Gross: There's really only two ways that retailers can make money, and that's opening additional stores and/or increasing same-store sales, sales per each store. So, if you find a company that has a long enough growth runway where you think they can continue to open stores because there's demand for that particular product. That's great. Then, they're also increasing sales per store, then you have that compounding there, that could be special.

Moser: I agree. And I think, even before that, and I bet you'll agree with this, Matty, a lot of those retailers are in a lot of trouble because they're over levered because they have a lot of debt on the balance sheets. And when you are a retail concept with a lot of obligations and your business is flatlining, fulfilling those obligations becomes immensely more difficult. You're seeing businesses like Toys R Us pay the price for that today.