Quickly - it is Saturday and I shouldn't be in front of a computer ;-)
@ Thomas
I used PythonData (for custom data) to get the data straight from the original source (i.e. CBOE).
You can probably use Quandl and get it with less code (1-2 lines vs. 10 or more of mine) - I just prefer the more general/flexible way and, besides, it is more explicit (less error prone) since the close level columns for VIX and VXV are, respectively, 'Close VIX' and just 'Close'. Go figure why,
Glad it is helpful, but it is all thanks to the great examples of @Alexandre Catarino (from QC staff).
It is true that the XIV started traded only in late 2010. But you can easily re-construct (using pandas or even Excel)
VXX and XIV back to 1990 by using their underlying indices.
For example, for the XIV:
i. go to S&PDJ website: http://us.spindices.com/indices/strategy/sp-500-vix-short-term-futures-inverse-daily-index-tr
ii. download last 10y (late 2007 to now) - if you've got Bloomberg then you can get 1-2 years more for the inverse and likely more for the one underlying the VXX.
iii. subtract the fees/TER of the ETF, if you really want (it won't make much of a difference).
@ Mohamed:
By reconstructing XIV or VXX (as mentioned above), you can now back-test strategies with at most daily trades during 2008:
1. you can definetely get a good idea regarding drawdown/returns for the second strategy I posted above (VIX strategy based on VIX/VXV ratio), BUT
2. wrt the first strategy (based on hourly data) you have to buy VX fut granular data which it makes costly, laborious and - above all - still imprecise (to the point to make it unrealiable for such small timeframe). Not worthy.
I said that the 1st (RIS-based) strategy is a pie in the sky (i.e. unreliable) because it is too dependent on the RSI period: if =6 (like the posted one or some on Quantopian's) performance is great except for the last 1-1.5y, the standard rsi period of 14 instead works marvellously well in the last couple of years but poorly in the 2012-2015 period. What's worse is that the choices in the middle (self._period = 8 to 12) are even more random and non-intuitive.
In other words, even if there is just a single parameter to optimise there is not a stable interval for the optimum - say great for =8 yet still good for 6 or 10 and so on. On top of that, I have no idea how this strategy could have performed during 2008. Trading this on its own is a too big leap of faith for me.
But I think that not all is lost: if you combine the two simple strategies above (you may want to get a longer RSI period and a shorter median) then you get a much more stable/robust strategy with Sharpe ratios of 1.8-2 and drawdown < 20%. Pretty decent for such an undiversified strategy.
If we can get 1 more unrelated strategies to combine, well... A Sharpe of 1.8-2. is achievable with a momentum (RSI) and a contango/backwardation ideas (the two strat above). We need a mean-reverting one, which is more tricky.
What I would avoid is too many parameters or convoluted strategies with no economic background. I'd rather combine two-three simple strategies and trade the net order.
Alex
PS: got a question too: does anyone know how to get the live VIX from Interactive Brokers when deploying algos via QC?