The S&P 500 and the Nasdaq Composite have both risen by double digits in 2023, which is exactly what investors want after last year's sharp decline in asset prices. But not all businesses have benefited from the market's optimism. 

Take Dollar General (DG -0.41%) and Foot Locker (FL 0.23%). They're well-known companies that most readers are likely familiar with. However, their shares have tanked about 50%. Maybe there's a potential buying opportunity here for value-minded investors. 

Which of these beaten-down stocks makes for the better investment today? Is it discount chain Dollar General or sports apparel distributor Foot Locker? Let's take a closer look at these well-known retail stocks. 

Foot Locker is in a tough position 

Investors would struggle to find any positive attributes about Foot Locker. The business has been posting terrible financial results lately. During the company's latest fiscal quarter (the second quarter of 2023, ended July 29), revenue fell 9.9% year over year, with a loss per share of $0.05. Both figures missed analyst estimates. Moreover, the difficult environment forced management to lower guidance for the full fiscal year. Weak fundamental performance unsurprisingly leads to poor stock performance, as is the case with Foot Locker. 

To try to keep things positive, though, investors might point to the company's brand recognition in the retail sector as a competitive advantage that should help it in the long term. But I don't think there's much merit to this argument. The retail industry is only becoming more and more competitive with each passing year. Foot Locker has to worry not only about a larger rival like Dick's Sporting Goods, but also the numerous direct-to-consumer businesses selling merchandise online. 

This brings me to my next point. Thanks to the advent of the internet, Foot Locker, which is essentially just a middleman, is seeing its power in the value chain diminishing. Nike accounts for about two-thirds of all of Foot Locker's sales, so it's easy to see who needs who more in this relationship. Nike is focusing more on its digital business going forward, which only has the potential to hurt Foot Locker. 

Nonetheless, the stock is dirt cheap right now. It trades at a trailing price-to-earnings (P/E) ratio of just 11.6. That's a substantial discount to the S&P 500. Investors who believe that things will improve might want to take advantage of the valuation. 

Despite recent struggles, Dollar General has promise 

With same-store sales that decreased 0.1%, and diluted earnings per share (EPS) that cratered 28.5% in the latest quarter (fiscal Q2 2023, ended Aug. 4), Dollar General is also dealing with some issues. That bottom-line figure, as well as the revenue total of $9.8 billion, missed Wall Street expectations. The leadership team also cut guidance. They now anticipate sales to grow 2.3% (at the midpoint), down from the prior forecast of a more than 4% gain. 

Inflation has been on top of investors' minds over the past couple of years. The Federal Reserve has rapidly increased interest rates in response to rising prices. With this background in mind, it's very discouraging to see Dollar General's business struggle at exactly the time it should be booming. When consumers are looking to save more money because the cost of everything else is going up, Dollar General should come to the rescue as a top shopping destination. But that's not showing up in the financial data. 

Make no mistake about it: Besides the recent troubles, Dollar General's fundamental performance looks stellar if you zoom out. Sales and diluted EPS have risen at strong annualized growth rates over the past decade, bolstered by an expanding store footprint. And what makes this a good company is its approach to focusing on the lower-income consumer in geographic areas that might not have other retail options, a strategy that has worked over time. Management still plans to open 990 new stores this year, which shows that there is potential to keep expanding. 

The stock is cheap, trading in line with Foot Locker's P/E ratio. But Dollar General is a much better business than Foot Locker, as its longer history of success clearly shows. Yes, it's facing some challenges recently, but I have much more confidence that it can bounce back than I do in Foot Locker's prospects, easily making it the better value stock of the two to buy right now.