Hello,
I am a beginner to quantopian and i have written a piece of code which logs every days high price. the code looks like this
def handle_data(context, data):
dat = data[symbol('VXX')]
high = dat.high
date = str(dat.datetime)[:11]
log.info("today's("+date+") high price is "+str(high))
I am trying to backtest it from 04-14-2010 to 04-20-2010, well the logs i am getting looks like this.
2010-04-14handle_data:11INFOtoday's(2010-04-14 ) high price is 1246.72
2010-04-15handle_data:11INFOtoday's(2010-04-15 ) high price is 1233.92
2010-04-16handle_data:11INFOtoday's(2010-04-16 ) high price is 1329.92
2010-04-19handle_data:11INFOtoday's(2010-04-19 ) high price is 1309.44
2010-04-20handle_data:11INFOtoday's(2010-04-20 ) high price is 1232.64
End of logs.
Now the problem is that the data i am getting is not right. According to yahoo's this link the OHLC values should be in between 10-20.However my code is returning the right prices for 2015 dates. I don't know what is wrong with the data. please help me in solving this. Any help would be appreciated.
Thanks.