In the recent interview of PJ Sutherland on the Better System Trader podcast he talked about a synthetic VIX indicator that he uses on indices other than the S&P. This concept seemed interesting to me so I coded it up and decided to share, I'm very inexperienced with Python so I'm sure there is a much more elegant way to code this but it does work and you can see the strong correlation with the VIX. I added the SynVIX to a simple SPY/zero beta SMA crossover strategy so you can see it in action.
high = data.history(context.VIXref, 'high', 20, '1d')
low = data.history(context.VIXref, 'low', 20, '1d')
close = data.history(context.VIXref, 'close', 20, '1d')
TR1 = (high[0] - low[0]) / close[0]
TR2 = (high[1] - low[1]) / close[1]
TR3 = (high[2] - low[2]) / close[2]
TR4 = (high[3] - low[3]) / close[3]
TR5 = (high[4] - low[4]) / close[4]
TR6 = (high[5] - low[5]) / close[5]
TR7 = (high[6] - low[6]) / close[6]
TR8 = (high[7] - low[7]) / close[7]
TR9 = (high[8] - low[8]) / close[8]
TR10 = (high[9] - low[9]) / close[9]
TR11 = (high[10] - low[10]) / close[10]
TR12 = (high[11] - low[11]) / close[11]
TR13 = (high[12] - low[12]) / close[12]
TR14 = (high[13] - low[13]) / close[13]
TR15 = (high[14] - low[14]) / close[14]
TR16 = (high[15] - low[15]) / close[15]
TR17 = (high[16] - low[16]) / close[16]
TR18 = (high[17] - low[17]) / close[17]
TR19 = (high[18] - low[18]) / close[18]
TR20 = (high[19] - low[19]) / close[19]
SynVIX = (TR1+TR2+TR3+TR4+TR5+TR6+TR7+TR8+TR9+TR10+TR11+TR12+TR13+TR14+TR15+TR16+TR17+TR18+TR19+TR20).mean()