QuantRocket runs on Docker, so installing QuantRocket is a two-part process:
Docker for Windows is the preferred way to run Docker on Windows, providing a seamless integration. Docker for Windows requires Windows 10 Professional or Enterprise 64-bit. Windows 10 Home edition users are strongly encouraged to upgrade to Windows 10 Professional if possible.
Windows 10 Home edition users who do not wish to upgrade can install Docker using Docker Toolbox for Windows, a legacy solution for running Docker on Windows. This tutorial guides you through the process of running QuantRocket with Docker Toolbox for Windows.
Unlike Docker for Windows which runs natively on Windows, Docker Toolbox installs Docker inside a Virtual Box VM. Installing and configuring Docker Toolbox is somewhat less user-friendly than Docker for Windows.
Visit Docker's website and download Docker Toolbox for Windows to your computer.
Run the installer, keeping the default installation values.
After the installation, double-click the Docker QuickStart icon your desktop.
The QuickStart will open a MinGW terminal (a Linux terminal on Windows) and will finish setting up Docker Toolbox. When the process completes, the terminal window displays a prompt.
You can use the QuickStart icon in the future whenever you need to open a terminal to use QuantRocket.
The default Virtual Box VM created by the QuickStart does not provide enough resources for running QuantRocket. We recommend you create a new VM with at least 2 CPUs and 4GB of memory. Don't give Docker more than half of your system memory or your computer might be sluggish. This means your computer should have a minimum of 8 GB of memory. The more memory you give Docker, the larger the backtests and data analysis you can do.
In the Docker Quickstart Terminal, first remove the default VM:
docker-machine rm default
Then, re-create the default VM:
--virtualbox-cpu-count. For this example we'll use 2.
--virtualbox-memory. Choose at least 4GB.
--virtualbox-disk-size. In this example we'll choose 50GB.
Create the VM with the new settings:
docker-machine create -d virtualbox --virtualbox-cpu-count=2 --virtualbox-memory=4096 --virtualbox-disk-size=50000 default
docker-machine stop exit
Then open a new Docker Quickstart Terminal.
To install QuantRocket, download a Docker Compose file which tells Docker how to create the QuantRocket stack. A Compose file is a YAML file that defines a multi-container Docker application.
From the Quickstart terminal, create a folder for QuantRocket under your home directory:
cd ~ mkdir quantrocket cd quantrocket
Copy and paste the following command to download the latest Compose file and save to your computer:
curl 'https://www.quantrocket.com/composefiles/latest/local/docker-compose.yml' -o docker-compose.yml
(You can also download the Compose file from the downloads page.)
docker-compose to deploy QuantRocket:
cd ~/quantrocket docker-compose -p quantrocket up -d
Docker Compose will read your
docker-compose.yml, pull the images down from Docker Hub, and create and run containers from the images. This process takes 5-15 minutes. You will see output like this:
Creating network "quantrocket_default" with the default driver Pulling houston (quantrocket/houston:0.8.0)... ad74af05f5a2: Pull complete c1da3f388f16: Extracting [============================================> ] 110.3MB/125.3MB 3f388f16: Downloading [===========================================> ] 108MB/125.3MBte 4c2b7a4aefc0: Download complete e61a44100a50: Download complete 8e960303c169: Waiting f2a1d6599d9d: Waiting
You can list all the containers that are running:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 476bd8607707 quantrocket/history:0.2.6 "/usr/bin/tini -- ..." 37 seconds ago Up 33 seconds 80/tcp quantrocket_history_1 96e93387015c quantrocket/master:0.2.11 "/usr/bin/tini -- ..." 37 seconds ago Up 32 seconds 80/tcp quantrocket_master_1 fc4b87285158 quantrocket/jupyter:126.96.36.199 "/usr/bin/tini -- ..." 38 seconds ago Up 33 seconds 80/tcp quantrocket_jupyter_1 ...
To access the Juypter environment for your deployment, first determine the IP of your Docker virtual machine by running:
Note the IP address. You can now access the Jupyter environment in your browser at:
You may want to bookmark this URL.
In JupyterLab you'll see the JupyterLab dashboard. Open the Quickstart notebook (
QuickStart.ipynb) to find an interactive tour and other resources to help you get started with QuantRocket: