I ran a test where I buy and hold 100 shares of AMRS on 5/1/2017. Run that through 6/30/2017 and it looks like the shares of AMRS have increased by $270. The algorithm is assuming I still own 100 shares at ~3.25 per share, but AMRS had a 1:16 reverse split around 6/5/2017. So it should really show that I own around 6 shares at $3.25.

Rather than a gain of $270, it should show a loss of roughly $35.

Testing another stock over the same period, I substituted WCN into the same strategy. It also does not account for the change in number of shares. WCN split 3:2 on June 19, so the price per share was reduced, naturally. But the strategy does not take into account the increase in number of shares, so it reports a 10% loss of equity over the period.

I also tried logging Splits events to the console and did not find any. Are these splits missing from the data? Is that normal -- in other words, should I design my algorithms with the expectation that I need to find out about split events from an external source? OR alternatively, if someone can't duplicate, am I missing something about how Splits is used?

Added a backtest to this post showing fictional mega-profit from ignoring AMRS reverse-split ;-)

Author