Here's my code (aapl.py):
from zipline.api import sid
def initialize(context):
context.aapl = sid(24)
def handle_data(context, data):
print data[context.aapl].price
When running the command "zipline run -f aapl.py --start 2016-8-1 --end 2016-8-1 -o aapl.pickle " , it prints 68.39
However, Yahoo Finance csv shows the Close was 106.050003
Edit:
I replaced "data[context.aapl].price" with "data[symbol('aapl')].price", now it prints 106.05
sid(24) is actually $ALL (Allstate) in Zipline quantopian-quandl data bundle, not $AAPL