The stock's long-term track record is impressive to be sure. Recently though, shares of Target (TGT 0.18%) have been tough to stick with. After rallying during and because of the COVID-19 pandemic, Target stock was left highly vulnerable to last year's bear market. How vulnerable? Despite last month's post-earnings surge, shares are still down 50% from their late-2021 peak.

The economic backdrop is evolving in somewhat unexpected ways, however. Namely, the economy looks to be easing out of the trouble caused by rampant inflation, leading to the so-called "soft landing" most investors were hoping for. The marketwide gains logged since late last year may mark the beginning of a new bull market after all.

If this is indeed the case, Target stock is a compelling buy for four distinct reasons.

1. Target is largely a discretionary retailer

With nothing more than a passing glance, Target looks a lot like rivals Walmart, Costco, and a handful of other retailers.

Take a closer look at Target's mix of merchandise though. It's less exposed to the grocery category and more exposed to discretionary corners of the retailing business like apparel, home decor, toys, and electronics. These are the goods people tend to buy less when money is tight -- as it was not long ago with rising inflation and a weak stock market.

Target's same-store sales fell 4.9% year over year during its fiscal third quarter (ended Oct. 28), while Walmart's were up 4.9%. Costco says its U.S. same-store sales grew 3.1% for the three-month stretch that ended in early September.

Target's management team knows exactly what the problem is, by the way. As chief growth officer Christina Hennington explained, "Consumers are feeling the weight of multiple economic pressures, and discretionary retail has borne the brunt of this weight for many quarters now."

If any budding bull market is rooted in an improving economy that puts more discretionary dollars in consumers' pockets, however, don't be surprised to see Target's results turn around.

2. Operating costs are finally being curbed

Soaring costs are a pain for everybody. They're particularly problematic for brick-and-mortar retailers, which tend to produce relatively thin profit margins. Every penny counts in this business. That's why higher costs for things like logistics, personnel, and even inventory have been taking oversize bites out of Target's bottom line.

Now, take a closer look at the company's most recent results. The growth of its selling and administrative costs is slowing, while last quarter's total cost of sales fell 7.8%. That's down even more than its top line was. Its gross profit margin of 26.9% through the first nine months of fiscal 2023 is measurably better than the year-ago comparison of 23.9% too. And the retailer's operating margin is up from 3.5% to 5.1% over the same period. Net income is up over 40% year over year to $2.7 billion as well.

You're reading that right -- Target's income is up this year despite revenue being down, reflecting lower costs. Given the ongoing improvements in expense management, look for profit margins to continue widening on the heels of renewed sales growth.

3. Its e-commerce efforts are finally starting to click

There's no denying Target was late to the e-commerce party, allowing Amazon and then Walmart to establish a commanding lead on this front.

Target is quietly easing further into this market though. While comparable digital sales were actually down 6% last quarter, bear in mind the company experienced incredible growth not that long ago with digital comps up 29% in Q3 2021 and 155% in Q3 2020. That was always going to be a tough act for the company to follow in this environment.

In the meantime, Target's newest e-commerce initiatives are gaining traction. Its drive-up (curbside pickup) orders were up 12% in Q3, while same-day pickup or delivery orders grew 8%.

Look for all of these e-commerce numbers to strengthen if the economy's "soft landing" becomes a reality.

4. Analysts say Target stock is undervalued

Last but not least, the analyst community believes Target shares are worth more than they're getting credit for. Despite the stock's recent surge, its current price near $131 is about 14% below analysts' consensus price target of just under $150.

That's not huge upside, but remember price targets are short-term forecasts. They also tend to rise when a stock is en route to the consensus estimate -- this has certainly been the case for Target stock in the past. It's also true that analysts have often been slow to raise their targets on this particular stock, underestimating how well it could and would perform.

TGT Price Target Chart

Data by YCharts.

There's more to the story though. This fourth and final reason to buy Target stock in anticipation of a new bull market has more to do with the mindset that bull markets create among investors. A bullish environment makes it far more likely a stock -- any stock -- will be able to reach a consensus target, forcing analysts to raise their expectations once it happens.

In other words, the environment is half the battle.