Target (TGT 0.76%) shareholders have been through a roller-coaster ride through most of the pandemic. Shares soared in 2021 as the retailer gained market share in popular categories like home furnishings while boosting profit margins to new highs. Many investors abandoned the stock, though, as growth slowed and the company took a financial hit from excess inventory.

The retailer's recent earnings update contained more bad news on that profitability metric, but Target also had some good news for investors.

Let's take a closer look at one red flag and one green flag for this discount retailer's stock.

1 red flag: Target's profit pressures didn't let up

The company had warned about the negative impact of its inventory purging plan, but it was still jarring to see the financial hit. Target's gross profit margin dove to 21.5% of sales compared to 30.4% a year ago.

Executives pinned the blame on markdowns that were necessary to clear out inventory in previously popular categories like home furnishings.

That demand slump was especially bad for earnings because it was focused on some of Target's highest margin areas. These products tend to be both seasonal and bulky as well, adding to the urgency of moving the merchandise out of stores to make room for newer arrivals.

WMT Operating Margin (TTM) Chart

WMT Operating Margin (TTM) data by YCharts

All told, operating income dove to $321 million, down 87% from the prior year. Target's core profitability is now sitting at just 1.2%, while investors had been cheering a nearly double-digit rate through most of 2021. CEO Brian Cornell blamed a "very challenging environment" around costs and shifting consumer demand trends.

1 green flag: Target's forecast for the remainder of 2022 is better

But Target could already be through the worst of this slump. Management is projecting that profit margins will recover to about 6% of sales in the second half of the year now that inventory is better matched up to current demand.

Investors don't have to simply take management's word here. Target's customer-traffic metric shows that the company isn't losing market share or the interest of its shopper base. On the contrary, traffic rose 3% on top of a 13% spike a year ago. Compare that result to Walmart (WMT 0.09%), which posted just a 1% traffic increase. Home Depot reported declining traffic for the same period.

Not a perfect world

In a perfect world, investors would be looking at higher customer traffic and expanding profit margins. However, if shareholders had to pick just one of these trends, it would be traffic. Target can boost profitability over time once it gets inventory purchasing synced up with demand. It is much harder to convince shoppers to return to its stores, on the other hand, after they have become loyal to a competitor.

Target's stock-price slump makes some sense given that investors don't know whether the company can ever again reach near double-digit profit margins. Still, the retailer is gaining market share today even after adding about $10 billion in new sales during earlier phases of the pandemic.

If that trend continues, it will only be a matter of time before earnings growth recovers and the stock makes its way back into Wall Street's good graces.