Every day, Wall Street analysts upgrade some stocks, downgrade others, and "initiate coverage" on a few more. But do these analysts even know what they're talking about? Today, we're taking one high-profile Wall Street pick and putting it under the microscope...

Amazon.com (AMZN 1.49%) is buying Whole Foods (WFM), and things do not look good for owners of Kroger (KR 0.64%) and Costco (COST 0.84%) stock.

That's the upshot of a pair of new downgrades on Wall Street today, where Morgan Stanley has just cut its rating on Kroger stock one notch from overweight to equalweight, and Deutsche Bank cut its rating on Costco from buy to hold. Taking aim at both targets simultaneously, Goldman Sachs has just cut its ratings on Kroger and Costco -- both of which it now rates neutral.

Here are three things you need to know about all this.

Kroger logo

Kroger stock shoppers are not going to want to hear this. Image source: Getty Images.

1. What's happening?

Let's begin at the beginning. Last week, Amazon.com announced it will buy Whole Foods for $42 per share, or $13.7 billion in total. (Add in Whole Foods' $1.1 billion debt load, and the transaction will be valued at $14.8 billion.)

Amazon says it's buying Whole Foods because it is best in breed -- offering the "best natural and organic foods," as Amazon CEO Jeff Bezos put it. Analysts, on the other hand, see Amazon planning to leverage Whole Foods' 460 or so stores (mostly located in upscale neighborhoods) to give it an instant distribution network for entering the $600-billion-a-year retail grocery business. At the same time, Whole Foods' installed base will give Amazon lots of locations in which to experiment with its self-checkout and grocery home delivery services.

This deal is expected to close by the year's end.

2. What it means for Kroger

Pretty much everyone agrees this is bad news for Kroger, shares of which plunged last week even before the Amazon/Whole Foods deal was announced. Kroger reported weakening earnings in fiscal Q1 2017. Kroger also warned that its profits will fall about 10% short of previous estimates this year (Kroger now expects to earn only $1.74 to $1.79 in fiscal 2017).

In response to this news, and the Amazon/Whole Foods deal, too, Morgan Stanley is cutting its rating on Kroger stock and lowering its target price to just $23. That's 28% below its previous valuation, and just a few pennies above where Kroger stock trades today.

With nearly 2,800 grocery stores in operation, Kroger enjoys much greater economies of scale than Whole Foods could offer alone. That changes if Whole Foods puts Amazon's buying power at its back, however. Going forward, Goldman Sachs warns that the company's competitive advantages won't be "enough to drive earnings growth," and so Goldman is cutting its Kroger price target to $26 per share.

Deutsche is the outlier here, reducing its price target to $26, but reiterating a buy rating on the stock on the theory that "KR can still compete" with a combined Amazon/Whole Foods.

3. What it means for Costco

Deutsche isn't nearly so optimistic about Costco, however. As StreetInsider.com (requires subscription) reports, Deutsche sees Amazon's purchase of Whole Foods as "a game changer" that puts "COST's competitive moat in grocery under greater threat."

How? Look at it this way: Unlike retailers such as Kroger (or just about any grocer, really), Costco doesn't earn most of its profits from buying groceries wholesale, marking them up to retail, and collecting a profit margin on the difference. Rather, fully 75% of Costco's operating profits come from the membership fees it charges its shoppers. So what happens if Amazon, charging its customers for Prime membership and now owning Whole Foods grocery stores, decides to merge those two business models? Presto change-o, a whole lot of Prime members will become de facto Whole Foods grocery members, and may rethink whether they also need to keep their Costco memberships.

That's just one of multiple possible scenarios that put Costco profits at risk, and it's a key factor in why Deutsche is downgrading Costco stock today. (Goldman Sachs, by the way, agrees that Costco's business model is now "under pressure" -- and is cutting its price target 11% to $176 per share.)

The upshot for investors

Down 26% over the past week, Kroger stock is a lot cheaper than it was just five days ago, and value investors may be tempted to dive in. But at $34.2 billion in enterprise value (EV), and with only $1.1 billion in trailing free cash flow (FCF), Kroger stock costs 31 times free cash flow and is no great deal. From this perspective, the analysts downgrading Kroger stock are right to do so.

Costco stock is in a similar situation. Factoring in debt and cash, Costco sports a $71.6 billion enterprise value (roughly twice Kroger's valuation) and generated $2.1 billion in free cash flow over the past year (according to data from S&P Global Market Intelligence). That works out to an EV/FCF valuation of 34, which is actually even pricier than Kroger. That's logical, given that analysts project a 10% long-term earnings growth rate for Costco, versus only 8% for Kroger.

Rounding out the lot is Amazon.com's own stock, valued at $472.1 billion on $9.4 billion in free cash flow -- a valuation of more than 50 times cash profit. Although it's true that analysts expect Amazon to outgrow its rivals handily (35% projected growth annually over the next five years), even Amazon is no obvious bargain at an EV/FCF/growth ratio of nearly 1.5.

Long story short: At these prices, I'd stay away from the grocery sector entirely. Both the disruptor, and the disrupted, look too pricey to buy.