It’s time to snap up shares of Target at a bargain as they could surge nearly 20% from current levels, according to Wells Fargo. Analyst Edward Kelly upgraded shares of Target to overweight from equal weight, saying in a Monday note that the retailer is oversold. Target tumbled 25% after its calendar first-quarter earnings report, following a glut of inventory troubles that also hurt shares of Walmart and other retailers. Shares are down nearly 30% this year. “TGT’s sell-off provides the opportunity to pick up a proven share gainer into an underappreciated earnings recovery at the right price, in our view,” Kelly wrote. “1) The company deserves some criticism for its inventory missteps, but it’s not alone (ahem…WMT) and management’s decisive action should help protect pandemic share gains (the real prize at the end of the day). 2) TGT took the earliest and biggest margin hit in retail, suggesting relatively lower risk from here and a faster recovery. 3) Investors seem too pessimistic on recovery earnings; we see EPS of $12.70 when the dust settles in 2023 vs. a buy-side bar that seems closer to $11. 4) Favorable risk/reward,” Kelly continued. The analyst also raised the price target by roughly 25%, to $195 from $155. The new price target represents nearly 20% upside from Friday’s closing price. Shares jumped 1.4% in Monday premarket trading. To be sure, there are challenges ahead for the retailer. Wells Fargo’s Kelly said difficulties executing on its digital strategy, as well as losing share to Amazon and Walmart, could hurt the company. Still, the retailer is poised for a recovery after proactively addressing its inventory troubles. “Inventory does look to be a moving target at the moment since consumer demand seemingly softened since TGT took its last charge, so there could be some additional risk to back half margins,” Kelly wrote. “That being said, TGT should have relatively less margin risk going forward and could be one of the first to experience a margin recovery, given it acted so decisively. In our view, TGT is now better positioned to play offense as the dust settles.” Target’s next earnings report is scheduled for Aug. 17. —CNBC’s Michael Bloom contributed to this report.