Reference:

This is an implementation of the 4th volatility trading method he mentions (Volatility Risk Premium), however I added separate thresholds for entering XIV vs VXX since VXX is such a shoddy instrument to be stuck in for any length of time. Note that this added some implicit data fitting bias.

THIS IMPLEMENTATION IS BUGGED SEE A FOLLOWUP