buyapple sample suggests we can ingest Quandl data in a Jupyter cell. Can we?

324 views
Skip to first unread message

John Strong

unread,
Mar 6, 2018, 8:02:16 AM3/6/18
to Zipline Python Opensource Backtester
The buyapple example suggests that we can ingest Quandl data in-line using the following command in a Jupyter cell:

! QUANDL_API_KEY=<my key> zipline ingest -b quandl

I put my Quandl API key in place of the placeholder <my key> both with and without surrounding quotes, and in both cases I get the following error message:

'QUANDL_API_KEY' is not recognized as an internal or external command, 
operable program or batch file.

What am I doing wrong?

Richard Frank

unread,
Mar 11, 2018, 4:11:32 PM3/11/18
to Zipline Python Opensource Backtester
Hi John,

Sounds like you're running the Jupyter notebook on a Windows machine, while the syntax in that example is for a typical linux shell. The intent is to set an environment variable named "QUANDL_API_KEY" that should be accessible to the zipline process being run, so you'll need to adapt that idea to your environment. I imagine you could first run something like ! set QUANDL_API_KEY=<my key> or maybe with setx - I'm not certain. Then you'd run zipline ingest -b quandl.

Best,
Rich

Adrian Cheung

unread,
Mar 25, 2018, 11:38:09 AM3/25/18
to Zipline Python Opensource Backtester
Hi, John

I could not ingest data from Jupyter Notebook but can do it in the anaconda prompt.

I am using win10.

As Rich said that you need to set the environment.

in anaconda prompt, type: set set QUANDL_API_KEY=your-key

Don't add the quote to your key.  It will not work if you type: set set QUANDL_API_KEY="your-key"


After that, you can type: zipline ingest -b quandl
 
Adrian
Reply all
Reply to author
Forward
0 new messages