Walmart Stores Inc. (WMT) - Get Report is on a winning streak.

On Friday, July 14, Goldman Sachs upgraded Walmart shares to a "buy" from "neutral," with a 12-month price target of $84, which represents a 12% upside to its previous closing price.

"We believe that the company is as well positioned as any mass market retailer - in an admittedly imperfect world for mass market retailers - to cope with increasing demands on ecommerce and technology spend [and] weather Amazon's growth," Goldman Sachs analyst Matthew Fassler wrote in today's note.

In the note, Fassler commented that Walmart likely didn't even "have much to rethink the day [Amazon announced its $13.7 billion acquisition of Whole Foods Market (WFM) ." 

Gordon Haskett Research Advisors recently found that Walmart has been slashing prices in grocery to keep customers with the rise of not only Amazon in the space but German discount grocer Lidl, with major price cuts on foods like a 12-ounce package of Kraft Heinz (HNZ) "Singles," which cost 60 cents in June, compared to its regular price of around $3.

"We believe Walmart is as well positioned as any large retailer to simultaneously sidestep the Amazon juggernaut based on market/category exposure, and to replicate elements of it for its customer base," Fassler said. "The hard discounters present a different challenge, as they price sharply and threaten to eat into fill-in trips. That said, Walmart has cut pricing in many markets in anticipation."

Shares of Walmart rose 1.3% to $76.34 on Friday and year to date, the stock is up about 10.16%.

Read more of today's top business news here.