What happened

It wasn't long ago that investors were pummeling shares of Target (TGT 2.19%). The stock plunged nearly 30% during the week in May when it surprised investors with its first-quarter earnings report.

But the company has addressed its issues head-on, and investors have pushed the stock back up more than 20% over the last six weeks. That includes a pop today, with Target rising almost 5% at its high of the day. As of 3:15 p.m. ET, Target stock was holding on to a gain of 2.7%.

So what

Analysts seem to have appreciated both the reaction from management to its current situation, as well as more macroeconomic trends that should also help it turn around the business. Last week, Wells Fargo analyst Edward Kelly upgraded the stock to the equivalent of a buy rating. He also lifted his firm's price target 26% to $195 per share.

And today, another analyst at JPMorgan Chase similarly raised that firm's target price. TheFly.com reported this morning that Christopher Horvers reaffirmed his overweight rating and moved Target's share price estimate to $190. 

Now what

The analysts are seeing evidence suggesting the headwinds Target is facing are abating, making now the time to buy the stock. Today's inflation data is supporting that outlook, which helps explain today's pop in the stock price. 

Target's problems stemmed from poor ordering decisions, somewhat spurred by supply chain disruptions. The company effectively ordered too much of the wrong products, trying to ensure adequate inventory as global supply chains were bottlenecked. That left the company with too much inventory just when consumer demands were shifting. But the retailer gave investors an inventory optimization plan in June and simultaneously raised its dividend 20%, showing its long-term confidence. 

On a macro level, today's Consumer Price Index report showed that inflation may be peaking or has already peaked. That could help indicate a better environment may be coming for consumers to feel good about spending. Combined with Target's operational plan to correct its inventory mix, some investors are believing the analysts who said now is a good time to buy Target.