Hi, Trying to get started with importing csv data. Just want to use data from a column as a signal to trigger a trade is something else, not link it to any ticker available in quantopian. I can write the trigger code once i have the csv data flowing in correctly.
Thanks
Heres the code, i have error on the row where i define vix_close
import pandas as pd
vxurl ='http://www.quandl.com/api/v1/datasets/YAHOO/INDEX_VIX.csv?request_source=python&request_version=2&sort_order=asc&trim_start=2002-01-01'
def initialize(context):
# Only need data from csv as a signal, not as a ticker
fetch_csv(
vxurl,
symbol='MySymbolName',
date_column='Date',
)
def handle_data(context, data):
# VIX_Close is the column name of what i want into the algo
vix_close = data['MySymbolName']['VIX_Close']
record(VixValuePlot = vix_close)