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...

Perhaps Loop Capital thought it was being clever. Heading into Seagate Technology's (NASDAQ:STX) fourth-quarter earnings report, optimism was running high. Wall Street was calling for only $2.6 billion in quarterly sales (a 3% decline from last year), but an amazing $0.99 per share in net profit -- a 43% year over year increase!

By all indications, Q4 was shaping up to be a blowout when earnings were released this morning. And so, at 4:30 p.m. EDT yesterday, Loop Capital initiated coverage of Seagate stock with a buy rating and a $50 price target. It was just hours before earnings were due, and Seagate was selling for less than $40 then -- so a good time to book a quick profit on imminent results.

For good measure (perhaps they were looking for some pin action after Seagate bowled everyone over), StreetInsider.com reports that Loop also initiated coverage of Seagate rival Western Digital Corporation (NASDAQ:WDC) with the same buy rating and a $140 price target (requires subscription).

Now here are three things you need to know about what happened next.

Hard disk drive

Investors in hard disk drive maker Seagate are having a hard morning today. Image source: Getty Images.

1. The best-laid plans of mice and men

Surprise! It wasn't what Loop Capital expected would happen. (Nor, to be frank, what I expected, either.)

Instead of reporting $0.99 per share in profit, Seagate said it earned only $0.38 per share in Q4. Revenue also missed targets, coming in at just $2.4 billion. Granted, the company qualified that, "on a non-GAAP basis" excluding "certain items" from its report, earnings would have been $0.65 per share -- but even that number would have missed Wall Street's target by more than 34%.

2. Adding insult to injury

That wasn't the end of the surprises, either. On top of the earnings miss, Seagate announced that CEO Steve Luczo is being promoted out of office, abandoning the CEO's chair and becoming executive chairman (effective Oct. 1) so as to give him more time "to focus on longer-term shareholder value creation."

Taking over as CEO at Seagate will be current President and Chief Operating Officer Dave Mosley, a 22-year veteran of Seagate -- but in his role as COO, one of the people chiefly responsible for this morning's massive earnings miss.

Investors were not amused, and Seagate shares have fallen 15% as of 1:09 p.m. EDT.

3. Who saw this coming?

Clearly, Seagate's bad news took Wall Street by surprise. But should we have been surprised? Although I disagreed with their call at the time, Barclays Capital actually predicted something very much like what we saw this morning in its downgrade of Seagate stock two weeks ago.

Back then, Barclays warned that because Western Digital was beginning sales of 12-, 14-, and even 16-terabyte hard drives this year, while Seagate would not begin selling such huge drives before 2018, Seagate was at risk of "miss[ing] the 12TB transition, ceding high-margin market share to WD." Barclays also warned that Seagate's operating profit margins, which had been surging in recent quarters, stumbled in Q3, falling from 13.9% to 11.7%. Barclays' theory was that Seagate had already "purged" all of the "excess costs" from its business, and had no way to grow margins anymore.

Turns out Barclays was right about that. S&P Global Market Intelligence's record of margin trends at Seagate shows that Seagate's operating profit margin in Q4 was a lowly 8.1%, only 50 basis points higher than it achieved in Q4 2016, and a full 360 basis points below Q3 2017.

What it means to investors

So what can investors learn from all this? Well, the first lesson is obvious: The next time you're faced with a situation in which Loop Capital says buy but Barclays says sell -- you might want to listen to Barclays' advice and ignore Loop's.

A second lesson: Loop Capital appears to have tried to time the market, sneaking in a quick buy rating on a stock it expected to pop -- but didn't. Instead of emerging a hero, Loop Capital is left with egg on its face. It'll take a long time for Loop to get back to breakeven on this one.

But here's perhaps the most important lesson of all: Seagate Technology had a lousy quarter in Q4. Some investors saw it coming, others (including yours truly) did not. But this does not necessarily mean that you should sell Seagate stock just because everyone else is doing so today. Instead, acknowledge that there are risks to investing, and that sometimes things won't work out as you hope they will -- and insist on getting a good, fat margin of safety before you buy into a stock.

In my view, Seagate Technology still offers such a margin of safety for long-term investors patient enough to wait out the current storm. Even figuring Q4's awful numbers into the mix, Seagate boasts trailing-12-month net profits of $772 million, and free cash flow twice that -- $1.5 billion. Weighed against a $9.6 billion market capitalization with $2.5 billion in net debt (i.e., an enterprise value of $12.1 billion), that gives Seagate stock an enterprise value-to-free-cash-flow ratio of only 8.1. At this valuation, Seagate only has to grow its profits at about 8% annually over the long term to be fairly priced -- and according to the analysts on S&P Global, Seagate is still expected to grow twice that fast over the long term, this morning's bad news notwithstanding.

Loop Capital's hoped-for post-earnings pop did not materialize. But over the long term, Seagate Technology still looks like a very cheap stock.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.