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

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -