I remember reading that Quantopian changes historical pricing to reflect stock splits and dividends. But I still don't understand why I would get the following price difference:
TQQQ graph from Stockcharts.com
So TQQQ was priced around $67 on Jan 4 2017, het Quantopian's code priced it at $139.47 . This is suspiciously close to 2 x the actual price.
code in algo:
for i,stock in enumerate(context.stocks):
pr = data.current(stock,"price")
log.info("{0} allocation of {1} is ${2} " . format(allocation[i], stock.symbol, pr))
logfile:
2017-01-04 09:46 allocate:226 INFO return of allocation is [ 0.17176063 0. 0. 0. 0.82823937 0. ]
2017-01-04 09:46 allocate:243 INFO 0.171760630294 allocation of TQQQ is $132.16
2017-01-04 09:46 allocate:243 INFO 0.0 allocation of TLT is $119.46
2017-01-04 09:46 allocate:243 INFO 0.0 allocation of IJR is $139.35
2017-01-04 09:46 allocate:243 INFO 0.0 allocation of IJH is $167.5
2017-01-04 09:46 allocate:243 INFO 0.828239369706 allocation of XIV is $51.43
2017-01-04 09:46 allocate:243 INFO 0.0 allocation of TLT is $119.46
As far as I know, there were no reverse splits of TQQQ at the beginning of the year, so why is this price deviating from stockchart (or Yahoo) price so drastically?
Thanks