Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Mishandled Google Split?

The Google split on April 3,2014 yields some strange results when you buy/sell around or on that date. In reality if I would have owned GOOG during the split the value would have halved and then I would have been issued that same amount of shares in GOOG_L. This would have resulted in roughly the same total equity as before the split.

This backtest recreates losing 50% as a result of the split. I found this because one of the algorithms I was working on managed to consistently get an order executed at market open on the day of the split. It resulted in buying at the new split price AND took advantage of the issuing of the second class of stock, effectively doubling the amount of equity instantaneously. I'm not able to recreate this with a simple example though (but it is still doing this consistently).

6 responses

The key is the date that you own the stock. The dividend was awarded on April 3, but only to shareholders of record on March 27. In the backtest you shared, the purchase was on April 1, so you don't actually get the dividend. If you move the purchase date earlier, then you get the dividend.

Disclaimer

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.

With the backtest I shared above I was trying to show how I believe Quantopian handled this data is incorrect. The Google split was a little unconventional and maybe the way you have to track it is through a dividend like you mention. I guess that question is what should happen when the stock is purchased after March 27 and before April 3 and what "price" is paid for the shares. I suppose paying half the price during this period would fix this?

I was also just able to pick out the trades from my algo that were able to capitalize (accidentally) on this split, giving an immediate 50% return that wouldn't have actually existed.

Yeah, I was thinking about this one all day. There's something not right there. That Google split is the gift that keeps on giving, from a platform perspective. It was a one-of-a-kind event and requires a lot of custom code to handle.

It's funny because most of the writeups you see of the event on the internet refer to the dividend being payable to owners of record on March 27, which is how our code is handling it. But clearly the price of the stock shows that if you bought the stock on April 2nd, you still get the payout on April 3rd. Somehow that date of March 27th because irrelevant in practice.

I'm going to write a bug on this one, but I don't plan on putting the "urgent" tag on it. Just to set expectations =)

It also looks like the history() function doesn't handle this well, it returns a stair-step in the prices as you move across the split date.

OMG, I have tears in my eyes, thank you Trevor for bringing this year old issue back to light, I have not laughed so hard in days. The GOOG split and how it has not been handled actually ties together many issues that I have seen on the Quantopian platform regarding returns and is actually quite funny to anyone with any knowledge of actual equity trading.

You see, most of Quantopian's staff have not worked in the investment industry and so they have blind spots a mile wide for a great many common practices. I could tell you, and the Q staff exactly what they did wrong with the GOOG split and how to generically handle it, along with solving their return discrepancies.

Donate two bitcoins to Khan Academy, post the transaction hash here and I'll tell you what you are doing wrong and teach you a valuable lesson.

In the meantime, anyone who uses Q's platform to trade or even backtest ... well ... sometimes the best things in life are not free.