Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
TVIX split historical adjustment

I've been noticing something I think is a bit fishy when backtesting an algo that is trading TVIX. There was a 1:10 split in June 2015 that seems to have been handled correctly for all of 2015 and 2014, but somewhere in the 2012-2013 range the split is reversed. For example, first week of 2015 it's trading around 25 (post-split adjusted price), which Q agrees with. First week of 2012, Q has TVIX's price around 30,000 when I believe it should be two orders of magnitude lower, around 300. I wasn't able to find the point where the division/multiplication actually switches (if that's what happened). Is there something I'm missing?

5 responses

You can make a new backtest with this in it Brandon, and then move the sliders to zoom in on areas for more resolution, since the chart does smoothing. With a lot of zoom, it will switch from weekly to daily values:

def initialize(context):  
    pass

def handle_data(context, data):  
    record(tvix_prc = data[sid(40515)].price)  

The reason a tiny little backtest like this can work is that the presence of sid(40515) automatically means there is a security in the universe.

That's what I did in order to find the weirdness I listed above. My issue is that I think the historical data is wrong.

Hi Brandan,

From what I can tell, this data looks correct. I'm comparing it to:
http://finance.yahoo.com/echarts?s=TVIX+Interactive#{"range":"max","allowChartStacking":true}
and https://ycharts.com/companies/TVIX

I can definitely dig deeper if you have a source for me!

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.

Those definitely agree with Q. Looks like Google might be wrong. They seem to be missing two stock splits.

https://www.google.com/finance?q=NASDAQ%3ATVIX&ei=P66iVqm6BIqRmAHEg5HQBw

I totally underestimated the historical order of magnitude. Thanks for taking the time to look into it, and sorry for the trouble!

Totally unrelated, but interesting story; TVIX is the one that halted creations for a month or two, causing a huge premium to NAV to develop. My worst nightmare, when trading hedged ETF relative value!