Installing Zipline on Colab

If you’re using Zipline for portfolio analysis you may be wondering how to get it installed in Google Colab which is running Ubuntu 18.04. Here are the commands.

!wget https://launchpad.net/~mario-mariomedina/+archive/ubuntu/talib/+files/libta-lib0_0.4.0-oneiric1_amd64.deb -qO libta.deb
!wget https://launchpad.net/~mario-mariomedina/+archive/ubuntu/talib/+files/ta-lib0-dev_0.4.0-oneiric1_amd64.deb -qO ta.deb
!dpkg -i libta.deb ta.deb
!pip install ta-lib
import talib
!pip install zipline-reloaded
!pip install pyfolio

%env QUANDL_API_KEY=<your key>
!zipline ingest -b quandl

Leave a Reply