Import VIX from Yahoo (this part works)
import pandas as pd
Define variables (this part seems to work)
def initialize(context):
context.spy = symbol('SPY')
context.tlt = symbol('TLT')
context.date = None
fetch_csv(url,
symbol='VIX',
date_column='Date',
pre_func=add_fields)
Define 90 day SMA change (not sure)
def smachange(context, data):
sma = data[context.spy].mavg(90)
price = data[context.spy].price
Define 30 day VIX change (stuck here)
def vixchange