The rumors about ExxonMobil (XOM -2.78%) merging with Pioneer Natural Resources (PXD -2.28%) started a week or so before the deal was finally announced. Now that the news is out there, Pioneer's stock has rallied (the rise in price actually started before the final deal was revealed). ExxonMobil's shares are a touch lower.

Investors now have to make some choices. Thinking through this deal can help guide investors as they think about future mergers they may face in their portfolios.

A quick overview of the ExxonMobil/Pioneer merger 

On Oct. 5, The Wall Street Journal reported that ExxonMobil was in talks to merge with Pioneer Natural Resources. The deal was valued at as much as $60 billion, according to unnamed sources. The impact on Pioneer's stock was quick, as it rallied toward the implied valuation. ExxonMobil's stock price didn't move all that much, but it fell in after-hours trading once the final deal was announced.

XOM Chart

XOM data by YCharts

Per the final details of the agreement, Pioneer shareholders will receive 2.3234 shares of ExxonMobil for each Pioneer share they own. That values the transaction at roughly $59.5 billion, slightly below the rumored tally. But when the assumption of debt is considered, the total consideration is $64.5 billion, a bit more than the rumor.

Here's where things get interesting for Pioneer shareholders. The price of the deal represents an 18% premium to the price before the rumors started. In other words, investors are sitting on a quick price gain. There are three basic options from here for both ExxonMobil and Pioneer shareholders.

Sell the stock

This is ExxonMobil's biggest deal since it bought Mobil, so it is significant. If you think that ExxonMobil is making a mistake by effectively doubling down on U.S. oil (where Pioneer is focused), then you might want to sell ExxonMobil.

Pioneer shareholders, meanwhile, have to think about what they are getting, which is basically a stake in ExxonMobil. ExxonMobil is a globally diversified integrated energy giant. If you owned Pioneer because of its leverage to oil prices (being that it is a focused driller versus ExxonMobil's more diversified business), then you might want to sell and lock in your stock gains.

You could instead put the money to work in another stock such as Devon Energy, which has a fairly similar business model. An obvious alternative to ExxonMobil, meanwhile, would be Chevron.

Buy the stock

If you think ExxonMobil has just scored a big win by merging with Pioneer, then maybe you want to buy the energy giant's stock. ExxonMobil already has a large onshore U.S. energy business and this transaction will increase its scale, which could provide additional cost and efficiency benefits.

That said, you might also consider buying Pioneer. Because there is always a chance that a merger doesn't get consummated, Pioneer's stock is likely to trade slightly below the $253 per share suggested by the current transaction. If you can, indeed, buy Pioneer for less than that you will pick up a small financial benefit from buying the stock before the merger is complete. The risk, however, is that the deal falls apart and Pioneer's stock falls back to pre-merger levels.

Do absolutely nothing

The last option is the easiest and the one that most investors will likely choose. You are giving your money to a company's management expecting that it will do what's best for investors. ExxonMobil consolidating the broader energy sector isn't shocking or new -- it has bought many other companies in its long history. If you are happy to let the company do what it believes is right, then sit tight.

As for Pioneer, if you like the idea of suddenly owning shares in a larger and more diversified energy company during a time of change in the energy sector (notably the ongoing shift toward cleaner energy options), then you might as well sit tight, too. 

The same story all over again

The considerations that investors have to make about ExxonMobil and Pioneer are no different than what has to be thought about in any merger. True, this one happens to be a giant headline-grabbing deal involving an industry-leading energy stock. But that doesn't mean investors should be thinking about it any differently.

The key is to work through your thoughts about the deal and the options you have. Then make a choice that aligns with your updated investment thesis. Even if you aren't involved in the ExxonMobil/Pioneer merger, the investment lesson it provides can help you figure out what you want to do when you are eventually faced with a similar deal in your own portfolio.