This tutorial will guide you through the steps required to install Zipline, an open-source back-testing and trading algorithm development platform, on Ubuntu Server Latest.
Before you begin, make sure your Ubuntu Server environment is updated by running the following commands:
sudo apt update
sudo apt upgrade
Zipline requires several dependencies to work correctly, such as python3-dev, libatlas-base-dev, and gfortran, amongst others.
To install all of the dependencies at once, run the following command:
sudo apt install python3-dev libatlas-base-dev gfortran libopenblas-dev liblapack-dev python3-venv
You can either download the Zipline repository via Github or clone it directly from the repository URL:
git clone https://github.com/diced/zipline.git
We will create a python virtual environment to isolate the Python environment for Zipline. To create a virtual environment, navigate to the cloned repository folder and run the following command:
python3 -m venv zipline_env
Activate the virtual environment with the following command:
source zipline_env/bin/activate
With the virtual environment activated, navigate to the Zipline folder and install the Zipline package and its dependencies using the following command:
cd zipline
pip install --upgrade pip
pip install -r requirements.txt
python setup.py develop
You can test if Zipline is working correctly by running the following command:
zipline ingest -b custom-csv-bundle --csvdir ~/Downloads/custom-bundle-csvs
If Zipline executes without errors, you are good to go.
By following this tutorial, you have successfully installed Zipline on Ubuntu Server Latest. You should now have a fully functional installation of Zipline.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!