Big-box retailer Walmart (WMT 0.15%) reported earnings last month and it beat expectations. The stock has been climbing as a result and it's now trading near its 52-week high. Walmart is looking like a resilient business to invest in even with concerns of a recession looming.

But it hasn't been all good news for the retail giant. And before you decide to add the stock to your portfolio, you should have a look at the following three charts.

Walmart's profit margin was negative in Q3

While it is true that Walmart beat expectations in the third quarter (ended Oct. 31), that's based on adjusted earnings calculations. When looking at its unadjusted bottom line, the company reported a net loss of $1.8 billion, which was more than 1% of revenue.

WMT Profit Margin (Quarterly) Chart

WMT Profit Margin (Quarterly) data by YCharts

While the loss was driven largely by other gains and losses (investment-related ones), the company's operating income of $2.7 billion was also down 53% year over year. This suggests that despite achieving an earnings beat, things aren't all that rosy for Walmart and the company isn't as resilient to the effects of inflation as investors may think.

Inventory levels are a concern

Profitability hasn't been great of late and what could make things even worse is that Walmart is sitting on lots of inventory. At nearly $65 billion, that's at record levels and is 13% higher than the $57.5 billion it reported in the same period last year.

WMT Inventories (Quarterly) Chart

WMT Inventories (Quarterly) data by YCharts

The company is going to need to clear all that inventory and that could mean some aggressive discounting, which may put even more pressure on its margins, making it more difficult for Walmart to improve on its bottom line in future periods.

The stock is expensive

Even if things were going a lot better than the previous two charts suggest, what would keep me from buying Walmart's stock today is its egregious valuation. It's inching close to 50 times earnings, which is well above its five-year average and nowhere near the S&P 500 average of 20. 

WMT PE Ratio Chart

WMT PE Ratio data by YCharts

Walmart isn't a good buy right now

Up 5% this year, Walmart's stock hasn't been generating amazing returns (although it is beating the S&P, which is down 16%). But in light of the challenges ahead and the possibility for lower margins, it should be doing worse.

Although sales of $152.8 billion in Q3 were up 8.7% year over year, that becomes a less impressive performance when you consider that the company's cost of sales rose by more than 10% and operating costs soared by 16%.

Walmart is not nearly as resilient as the recent results suggest, and this is a stock that could be overdue for a sell-off.