python - How do I load an index (Dow, Nasdaq) with Zipline? -


loading individual stocks no problem struggeling loading stock indexes while thought should share.

if want load index zipline add stock parameter this:

    data = load_from_yahoo(stocks=['aapl', '^gspc', '^ixic'], indexes={}, start=datetime(2014, 1, 1), end=datetime(2015,4,2)) 

this load both apple's stock prices, nasdaq composite , s&p500.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -