Even more consolidation in the beaten-down mining equipment sector seems likely. Image source: Getty Images.

What: Shares of mining equipment manufacturer Joy Global Inc. (JOY) are up 17.6% at 11:30 a.m. EDT on July 21, following the before-market-open announcement that the company had agreed to be acquired by industrial manufacturing giant Komatsu Ltd. ADR (KMTUY 0.42%) for $3.7 billion. 

So what: According to the terms of the deal, which is expected to close by the middle of 2017, Komatsu will pay $28.30 per share in cash for Joy Global, and will operate the company as a separate subsidiary of Komatsu America Corp. 

Now what: Barring a better bid from a competitor, the deal seems likely to go through. There's not likely to be much regulatory pushback, and the board isn't likely to have reached this agreement without a good understanding of how major shareholders are likely to vote on the deal, which of course does require shareholder approval. 

In other words, it's pretty much a done deal. Whether investors should move on now or wait until closer to the deal closing, however, depends on a couple of factors.

To start, Joy Global shares are trading at around $27.67 as of this writing, about 2.2% below the price Komatsu will pay if you wait until the deal closes. According to the release, it could take almost a year for the deal to close, and investors should consider the opportunity cost of waiting a year simply to capture another 2.2% in return. 

However, here's what you should calculate before selling:

  • Short-term capital gains tax (at your marginal income tax rate) if you sell within 12 months of buying shares;
  • Long-term capital gains tax (15% for most people) if you hold at least 12 months before selling. 

In other words, if you bought your shares of Joy in a taxable account in the past year and will sell at a profit, it might make sense to hold shares past that one-year mark to reduce the income tax impact. Yes, there's some risk of the deal falling apart and the company's share price tanking, but that seems like a relatively low risk at this stage. 

If you're not concerned about the tax consequences and already have some ideas where to invest your proceeds, you might as well move on now.