Target (TGT 0.18%) is one of the top big-box retailers in the country, but it isn't trading like one. While investors have been bullish on Costco Wholesale (COST 1.01%) and Walmart (WMT -0.08%) this year, there hasn't been nearly as much excitement around Target. The stock has been struggling thus far in 2023.

Yet, there are some catalysts that could make Target a much better buy toward the latter half of this year. Here's why investors should consider buying this beaten-down stock.

Generating better traffic than its rivals

According to data from location analytics company placer.ai, during the first half of the year, retail visits have fallen 0.3% from a year ago. But one company that has been doing particularly well is Target, with its visits up 3.1% this year. That's higher than Costco's 1.2% increase and better than Walmart, which saw a decline of 0.9%.

Visits don't necessarily lead to revenue growth but it's a positive trend for Target nonetheless, as it suggests that its sales growth could be comparable if not better than that of its rivals. The company also plans to give more reasons for consumers to shop at its stores, announcing this month that customers can now add a Starbucks purchase on top of their pick-up order. 

Target can benefit from all the additional traffic it can get as its top-line growth hasn't been all that strong in recent quarters:

TGT Revenue (Quarterly YoY Growth) Chart

TGT Revenue (Quarterly YoY Growth) data by YCharts

Trading at a deep discount to its rivals

Year to date, shares of Costco and Walmart are up 23% and 13%, respectively. Target, meanwhile, is down 13%. Its shares started tanking in the summer due to controversy related to merchandise it offered during Pride month, leading to calls for boycotts from conservative groups.

But even before the drop-off in price, the stock was trading at a discount to its rivals. Costco benefits from a loyal customer base, but Walmart is more resilient. That's because of its strong grocery business, which accounts for half of its sales (whereas at Target it makes up just one-fifth). Target is more dependent on discretionary spending, and amid inflation, it hasn't been a popular investment to be holding. That has resulted in a significant delta between its valuation and that of Costco's and Walmart's:

TGT PE Ratio Chart

TGT PE Ratio data by YCharts

Should you buy Target stock?

Target is a far cheaper buy than both Costco and Walmart. And even if it may be a riskier investment than the other two stocks, I could see the gap potentially narrowing in the future as investors shift to better value buys such as Target.

The country's gross domestic product grew at a rate of 2.4% in the second quarter, beating expectations, suggesting that spending isn't slowing down all that quickly. And this could corroborate data from placer.ai, which showed that visits were up at Target, potentially indicating an increase in discretionary purchases. If that turns out to be true, Target could be on the cusp of some stronger quarters ahead, making it a better buy in the process.

While Costco and Walmart are solid businesses to invest in, if I were going to invest in a retail stock right now, it would be Target due to its much lower valuation. An added benefit is the stock's dividend yield of 3.3% -- far higher than at both Walmart (1.4%) and Costco (0.7%). For long-term investors, now can be an optimal time to load up on Target's stock.