Back to Community
Mergers and Acquisitions

I would like to know how Quantopian handles events like mergers and acquisitions. For example, MNK is buying QCOR, QCOR shareholders will get $30 plus .89 shares of MNK if the deal goes through.

My question is about sids in cases like this, do they get automatically updated to the new symbol in Quantopians db?

2 responses

During backtesting for mergers and acquisitions, we add the cash to your portfolio balance and you keep the old company stock in your portfolio. However, the stock will become static in your algorithm universe and you will see its last traded price. You will not acquire the new stock in your backtesting portfolio.

I realize this is less than ideal and does not fully cover real-world scenarios. It is a tricky situation to replicate and we're trying to wholly simulate conditions, which you can then live trade your algorithms.

Regarding the sids, they do not change in the database because these are unique identifiers. The sid for the old company will remain and you can backtest strategies using the sid until the acquisition date.


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.


I just wanted to bump this thread in order to ask if you could, perhaps, clarify this information a bit more; While backtesting a strategy (which did pick QCOR based on fundamentals) I noticed that the cash-balance remained unchanged after the merge (15/08/2014). However, I also noticed that my code which relied heavily on percentage-based ordering (order_percent and order_target_percent) started to behave slightly odd, allowing my leverage to rise beyond the levels that I expected (I'm guessing due to the fact that the static stock still contributes to the overall portfolio value while being illiquidable; note that I carefully managed leverage by continuously calculating appropriate order percentages and cancelling certain orders in order to mitigate the potential problems due to slippage/open-orders when using these methods).

So, I'd really appreciate if you could clarify this issue a bit more (and perhaps provide us with a way of handling this form of events).

Thanks in advance.

Edit: I'll attach a couple of screenshots showing the backtester output : screenshot gallery