Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Extraordinary Popular Delusions and the Madness of Crowds.

That is the title of a book by Charles Mackay written in 1841 as a compendium of the history of financial manias of the recent Western variety: Tulipomania, The Mississippi Scheme, and the South Sea Company are the first parts of the book to my recollection.

I write this to illustrate the financial mania of our time: that of ever decreasing volatility due to Central Bank omnipotence.

This backtest involves shorting VXX, and if there is margin available, shorting some more at the end of the day, with a stop out put in at the beginning of each day, monitored minute by minute. Although the algorithm does not accurately model volume impact and/or slippage, since it only involves a maximum of one trade per day, those costs should not add to anything to impact the order of magnitude of the result over time.

To understand what is going on here, know that the VXX ETF was contrived (in 2009) by a big bank so that their prop trading desk and their clients prop trading desks could offload their long volatility trades that made them @$$loads of money going into the financial crisis onto unsuspecting retail investors coming out of it. The ETF was marketed to everyday people as a way to play volatility, as it was on the rise at the time (and reaching the apex).

People that don't understand futures and forwards curves, contango, roll risk, and what volatility actually is have lost a lot of money "investing" in this stock/ETF/asset.

The return since inception of shorting this stock with minimal exit and re-entry points is 2500% over the last 5 years. The cash flow works, you can check it. If you were a human being doing this, all you would have had to do was avoid reentering prematurely during the aftermath of the flash crash of 2010, the government shutdown of 2011, and Ebola/Ukraine of 2014 and the return could be well north of 4000%.

This strategy is probably still profitable today, but in a limited fashion, which is why I've decided to share it. IB only has 100,000 shares available to short, which is amazing considering there are a reported 50MM shares sold short whereas there are only 30MM shares in existence as of this writing (hmmm.....). There is probably a way of doing this better with options instead of outright selling the shares, but seriously, if you don't understand forwards curves, contango, and roll risk, do not attempt anything that resembles a trade anywhere near anything claiming to have anything to do with the volatility index.

4 responses

Volatility trading is really interesting to me, I almost prefer to play volatility over equities because I feel like there is a little bit more predictability, it just moves soo fast. I would argue that we don't have ever-decreasing volatility though, the decline of VXX has more to do with contango than an actual decrease in volatility. This might be worth a read, it explains the rebalancing methodology of VXX. http://www.thelongtailoffinance.com/SA/Dissecting_the_VXX.pdf

David

I worked with that algo when posted and learned a thing or two about short-selling.

In the spirit of history, here's some audio about the first short seller selling short the first stock surely, aired this week on NPR: http://www.npr.org/blogs/money/2015/01/23/379416223/episode-598-the-very-first-short ... with an intro added by some other guys on their silly failed effort to "short the entire stock market".
After they lost since America didn't drop, today they put out another version more cynical now: http://www.npr.org/2015/01/29/382326996/why-don-t-more-people-short-stocks-its-a-great-way-to-lose-lots-of-money Somewhere they even include a phone call to eTrade. Lots of overlap.

I'm neutral, no dog in this hunt.
Meanwhile I think the concept by A.R. is educational and thank you for posting it.

I am familiar with the mechanics of VIX futures and the associated exchange traded notes such as VXX and SVXY.

I noticed when testing this code it seems it has borrowed almost 100% of the amount of cash in the portfolio. This would violate Regulation T as well as the fact that most brokerages have more stringent margin requirements than Regulation T requires, especially with a security such as VXX.

Does anyone know a way in which to reflect these limitations when backtesting?

Cash is always positive (charted). This also has a track_orders option turned on (log window) that I used to understand better, worth checking out.

Can you make use of context.account.regt_margin ?

True, risky. When run over only the last year, lots of up/down with over 50% drawdown of portfolio value.