Hershey (HSY 0.71%) investors got a sweet surprise on Thursday, as their stock leapt to an all-time high on takeover news. Mondelez (MDLZ 1.91%), owner of the Oreo, Nabisco, and Cadbury brands, sent an offer to Hershey valuing the company at $107 per share, or $23 billion. That translates to a 10% premium over Wednesday's closing price.

HSY Price Chart

HSY Price data by YCharts.

Hershey immediately shot down the merger idea, but that's likely not the end of this story.

Hershey's management sounded unimpressed by Mondelez' opening move. In fact, the board of directors "unanimously rejected the indication of interest, and determined that it provided no basis for further discussion," they explained in a press release. Hershey described the terms as preliminary, non-binding, and including a mix of cash and stock payment.

Hershey's stock spiked far above the $107 per-share offer price, though, suggesting that investors believe higher bids are on the way, either from Mondelez, or from rival snack food and candy giants.

The prospects for a merger

There are some good reasons to believe that the bidding isn't over yet. For one, The Wall Street Journal, which cited inside sources in its reporting of the proposal, described Mondelez as eager to make a deal that would allow it to leapfrog Mars to become the world's biggest candy company. Mondelez' stock rose 6%, indicating that investors see real benefits in that potential tie-up. Chief among these would be increased probability, as Hershey's 45% profit margin trounces Mondelez' 39%.

Second, the proposal could bring competing bids from rivals who've been eyeing Hershey's business, or would rather keep it out of Mondelez' control.

Image source: Hershey.

However, a bidding war isn't guaranteed, and even if one does break out, it might not lead to an actual sale. Hershey's latest results haven't been especially impressive.

Sales fell 4% last quarter, and earnings ticked higher by just 1%. Management projects a 2% revenue improvement for the full year, the same as Mondelez' expected growth pace, and earnings gains of between 3% and 4%. Those numbers might prove conservative, executives said, if new candy introductions prove popular, or if Hershey's latest advertising campaigns strike a chord with consumers.

The biggest obstacle to a merger deal is structural, though. Voting control over Hershey belongs to the Hershey Trust, and so shareholders couldn't approve a deal without the trust's consent.

What should investors do now?

Generally, it's not a good idea to invest in a stock just in hopes of timing a quick corporate buyout. And this situation adds another layer of risk to that shaky thesis because Hershey is controlled by a third party that may not act in shareholders' best interests. That's why it wouldn't make sense to jump into either Hershey's or Mondelez' stock in response to these merger rumors.

On the other hand, investors who already own Hershey's might be tempted to cash out after Thursday's jump pushed the stock to a new high. The sweets giant is now priced at 26 times forward earnings, representing a significant premium over rivals, as well as the broader market.

Even if Hershey's management believes $107 per share undervalues its business, investors are free to reach the opposite conclusion on the $113 price the stock settled at on Thursday.