Merger arbitrage trading is one of the few almost zero-risk investing strategies that involves buying and selling the stocks of two companies before the close of a merger. This is a popular strategy with hedge funds which, after all, are in the business of lowering risk more than they are in the business of earning returns (a common misconception about hedge funds is that they chase performance; in reality, they chase alpha, which is risk-adjusted performance). Merger arbitrageurs will effectively look for shares that trade below an acquisition price, buy those shares, and wait for the merger to close. In many, but not all, cases, the arbitrageur will also short the acquiring company’s shares because acquiring firms often see their stock fall in value as a result of the cost of acquiring the takeover target.

This strategy doesn’t always work. In the case of Amazon (AMZN) and Whole Foods (WFM), we see it spectacularly failing on both accounts. This is a pretty rare occurance, so it deserves a closer look.

Amazon has acquired to acquire WFM for $42 per share, paid in cash, in a deal that was a 29% premium of the stock’s then market value. The acquisition fell shortly after WFM CEO decried Jana Partners’s hostile activist stake in the company, demanding a severe shakeup in the business model. In this drama, Amazon can be seen as the white knight saving the damsel in distress (WFM) from the barbarians at the gate (Jana). Perhaps a mixed metaphor—or mixed parables, as it were—but the general idea is that Amazon has teamed up to save WFM’s management from hostile outsiders.

Ironically, and perhaps cruelly, Jana is benefitting from this deal by quite a bit. As major shareholders in WFM, they’ve earned a tremendous return from the deal. So too have holders of WFM stock, who are now up 39% from a year ago following months of lackluster returns and growing criticism of the company and its management.

The hedge fund arbitrageur who bought following the announcement didn’t have much room to profit. The stock rose to $42 per share early Friday, and has actually risen to over $42 since then. Meanwhile, Amazon’s shares rose 2.4% on the news and, while shares are still below their all-time high, they are clearly not weakening and it seems the market (at least so far) is not seeing a need to discount Amazon shares as a result of the merger.

There are a couple of important lessons here. Firstly, an investment strategy cannot be dogma; every case is different and every case must be analyzed on its own merits. Secondly, this is an incredibly unusual merger of a technology company with a consumer goods and services company. While Amazon has dabbled in grocery services and Whole Foods has embraced technology in the past, the two companies are very different.

The wide gap between these two firms’ business models means it’s very difficult to estimate or predict exactly what the merger will do to either company. Already, a lot of pontificating and guessing is out in the popular press, and it is almost entirely positive. Thus the rising share prices for both companies makes sense; it is reflecting the market’s optimistic view of what this means for both Amazon and Whole Foods. Thus there isn’t much of an arbitrage opportunity here.

But there is a speculative opportunity. One can speculate that the market has undervalued the synergies of this acquisition and go long, or one can speculate that the market (as it often does, especially when technology is concerned) has gotten overly optimistic, resulting in unpriced risks. In either case, one can learn from this instance that merger arbitrage doesn’t always work, just like every other investment strategy.