Skip to content

pi-2r/Quant-Science

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quant Stack Project

This repository contains a quantitative analysis environment setup for data science and machine learning projects. The project includes configuration files for creating a consistent development environment and running Jupyter Lab. This stack is used for courses of https://quantscience.io/.

Prerequisites

Docker

Make (optional, for using the provided makefile commands)

Quick Start

Clone this repository:

git clone https://github.com/pi-2r/Quant-Science.git
cd Quant-Science

Build the Docker image:

make build

Run the container:

make run

Note for Mac (Apple Silicon) users: If you are using a Mac with Apple Silicon (M1/M2), you may encounter compatibility issues with some Python packages. To avoid these problems, run Docker with the following option:

docker run --platform linux/amd64 -p 8888:8888 --name quant-container quant-stack

Node.js is required in the container for the Jupyter Copilot extension to work. It is automatically installed in the provided Dockerfile. If you modify the Dockerfile, make sure to keep the Node.js installation (apt-get install -y nodejs npm).

If you use the makefile, you can edit the makefile to add the option --platform linux/amd64 to the Docker run command.

By default, the Jupyter password is set to "password". You can customize it by running:

make run JUPYTER_PASSWORD=your_custom_password

Access JupyterLab in your browser at: http://localhost:8888

Environment Details

This environment is built on Anaconda with Python 3.9.13 and includes the following key libraries:

Core Libraries

NumPy 1.23.4

Pandas

SciPy

StatsModels

scikit-learn

Financial Libraries

OpenBB

QuantLib

riskfolio-lib

vectorbt

ta-lib

zipline-reloaded

pyfolio-reloaded

alphalens-reloaded

quantstats

Interactive Brokers API (ibapi)

Machine Learning

LightGBM 3.3.5

CatBoost 1.1.1

XGBoost 1.7.4

Optimization

CVXPY 1.2.2

Available Commands

The makefile provides several convenient commands:

make build: Build the Docker image

make run: Start the container with JupyterLab

make stop: Stop and remove the running container

make clean: Remove the Docker image

make logs: Display container logs

make shell: Open a shell inside the container

make help: Display available commands

Customization

You can customize the environment by modifying:

quant_environment.yml: Add or modify conda and pip packages

Dockerfile: Change the base image or add system dependencies

Troubleshooting

If you encounter dependency conflicts during the build process, try:

Updating the charset-normalizer version to >=3.4.0 in the quant_environment.yml file

Ensuring compatible versions between packages

Releases

No releases published

Packages

No packages published

Languages