BALTIMORE (Stockpickr) -- Famed investor Warren Buffett once said: "Successful investing takes time, discipline and patience. No matter how great the talent or effort, some things just take time."

But does investing always have to take time? Every investor dreams of buying a stock and then watching it suddenly spike when a lucrative acquisition deal gets announced.

Merger and acquisition deals, better known as M&A, are instant. Once the deal hits the news and Mr. Market catches wind, shares can skyrocket overnight. It's no surprise, then, that many investors devote substantial efforts to finding the next big buyout target. What's less obvious is what to do after you do hit an M&A goldmine.

Take the gains? Wait to wring out bigger ones?

This isn't an academic problem. In the last few decades, the deal sizes have been getting bigger as giant firms have merged together to form even larger companies. That means that more retail investors than ever before are finding themselves with a buyout target in their portfolios.

Likewise, a common misconception about M&A deals is that all the money's off the table once Main Street finds out. Well, it ain't necessarily so.

That's why, today, we're taking a closer look at what to do with a stock post-M&A -- regardless of whether you own it.

What to Do When You Own Shares

If you own a stock that's getting acquired, what should you do?

There are a couple of things to consider when you own a stock that's getting bought out. First, should you sell now or hold out?

Newly announced deals almost never trade for the offer price immediately, because the market factors in a risk discount (measuring the chances the deal won't be consummated) and a time discount (a premium that buyers get to collect in exchange for giving you an out now). Both of those prices are fluid; they're determined by supply and demand for shares in the market.

These discounts are typically tied to overall volatility in the market and to interest rates. In other words, when market participants are figuring out whether they should buy your shares of an M&A target, they're weighing the risks as well as how much money they'd be able to make elsewhere.

The thing is, the market doesn't always price volatility correctly -- and more often than not, it's underweighted. For instance, let's say that even though the big market indices are basically flat in a given year, the market averages have gotten there by sawing back and forth. There's volatility there, but it's not being fully priced in.

This is a common scenario, particularly in markets where corporate balance sheets are stuffed with cash and equity markets are consolidating. In this sort of environment, it makes sense to sell your M&A target and walk away with your gains. By doing that, you're generally trading a relatively small fee (the deal premium left in shares) to take all of your risk off the table between now and the merger's expected completion date. Chances are, a lot can happen between now and then.

Don't forget: If a stock you own gets acquired for cash, it can take months from the time the old stock stops trading until the time when you get cash in your brokerage account.

At some point, it's a better deal to take the money and run.

What to Do When You Don't Own Shares

What about the other side of the deal? Does it ever make sense to buy an M&A target that's already been announced?

The short answer is yes -- but you've got to be opportunistic. After all, the discounts on merger deals exist for a reason.

Look at a deal full of regulatory hurdles, and the risk premium jumps up too. Remember that the market is the ultimate risk weighing machine -- you don't get to collect a bigger premium on the deal because other market participants are stupid. Instead, the premium is there because the target company's shareholders wanted to secure their risk-free gains.

Taking advantage of premiums in M&A deals is called "merger arbitrage." And while there are arbitrage opportunities that make sense for retail investors to take advantage of, they require some legwork to find. As that time between now and the deal close gets smaller, so does the premium you collect. Remember, you're getting paid to take risk away from the folks who own the target stock.

One final thought about merger arbitrage is that most successful merger arbitrageurs stay market-neutral. They buy the target stock and short the acquirer so that they're only exposed to the premium. Otherwise, a good deal can lose money in a down market.

Buying M&A stocks after announcements isn't a strategy for beginners, but in environments where merger premiums are rising, it can be a lucrative one.

On the other hand, there's nothing quite as exciting as owning a stock when an acquisition announcement hits. That said, when interest rates are low, and volatility is cheap, it almost never makes sense to hold onto your shares until the deal closes.

The next time an M&A deal hits your portfolio, take the money and run.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.