Big-box retailer Walmart (WMT -1.75%) and its peers have been struggling with excess inventory, rising costs, and supply chain issues this year. The good news is the company is coming off a strong quarter where it beat expectations for both earnings and revenue. It posted solid comparable sales growth, and e-commerce sales were also up.

But despite the positive news, this still isn't a stock I would buy today. Here are three main reasons why.

1. Its low margins don't leave much room for error

One of the big problems with Walmart is that the company's margins are really low -- often in single-digit percentages. This isn't normally a problem, as the low-cost retailer often competes on price. However, this may be especially problematic this year with rising costs still plaguing the industry, as there could be headwinds ahead for the business that further shrink its bottom line. Even earning a 4% profit margin is an achievement for the business.

WMT Profit Margin (Quarterly) Chart

WMT Profit Margin (Quarterly) data by YCharts

A low margin doesn't give the company much of a buffer, and it's one of the reasons I wasn't surprised tech giant Amazon dipped into the red this year. At a time when price-sensitive shoppers could be opting for dollar stores instead of department stores in an effort to keep their budgets under control, Walmart's top line could struggle, leading to a worsening bottom line.

Despite Walmart reporting comparable sales growth (excluding fuel) of 6.5% in the U.S. for the period ending July 31, the company didn't raise its guidance for the second half of the year. In other words, it still projects comparable U.S. sales growth of just 3%. That suggests the company is cautious about the rest of 2022, and rightfully so.

2. High inventory levels suggest the bottom line will face more pressure

Another area of concern is the retail company's inventory levels, which remain elevated compared to previous years.

WMT Inventories (Quarterly) Chart

WMT Inventories (Quarterly) data by YCharts

While management has said it has taken action to improve inventory levels, there still appears to be a problem that could lead to larger-than-expected discounts. Consequently, this could put more pressure on the company's margins.

In other words, during the current quarter we could see more aggressive discounting from Walmart. The retailer will be preparing for the busy holiday season and may need to move out inventory to make room for seasonal items.

3. Walmart is trading at a high valuation

The biggest problem I have with Walmart's stock is that it's simply too expensive. That's especially true given the aforementioned challenges and headwinds. At a forward price-to-earnings multiple of 22.6x, it's trading at a higher premium than rival Target. (Investors are paying 20.4 times future profits for Target). Meanwhile, the S&P 500 averages an even lower multiple of 17.5x.

Without more of a discount in its share price, Walmart's stock just isn't cheap enough to buy, given the near-term risks it faces. And in the longer term, it looks intent on battling it out with Amazon, recently announcing plans to bolster its Walmart+ subscription with streaming video. That could strain its bottom line and make the stock a less attractive buy, even for long-term investors.

At a time when many stocks are incredibly cheap, Walmart isn't an optimal choice. There are many other, better discounted stocks that investors should buy before considering the retailer.