Skip to main content

Requirements

Authentication

Option 1: Token

After you’ve been added to the list of collaborators and accepted the repository invitation, the next step is to create a Personal Access Token for your GitHub account in order to access the PRO repository programmatically (from the command line or GitHub Actions workflows):
  1. Go to GitHub
  2. Click on Generate a new token (classic)
  3. Enter a name (such as “terminal”)
  4. Set the expiration to some fixed number of days
  5. Select the repo scope
  6. Generate the token and save it in a safe place

Option 2: Credential Manager

Alternatively, use Git Credential Manager instead of creating a personal access token.

Installation

Clone the Repository

Clone the repository using the web URL:
git clone https://github.com/bfcdev/quant-research.git

Setup your Environment

There are two ways to set up your environment:

Option 1: Using uv

To install a project environment and dependencies using uv, you can follow these steps:
1

Install uv

You can install uv using various methods depending on your operating system. For example, on Linux or Mac, you can use the following command:
curl -LsSf https://astral.sh/uv/install.sh | sh
Alternatively, you can install it via pip:
pip install uv
On Windows, you can use the following command:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
2

Create a Project

Initialize a new Python project using the uv init command. This will create a pyproject.toml file, which is used to specify project metadata and dependencies.
uv init
3

Add Dependencies

Use the uv add command to add dependencies to your project. This will update the pyproject.toml file and the lockfile.
uv add PACKAGE_NAME
4

Create a Virtual Environment

Use the uv venv command to create a virtual environment for your project. This will create a .venv directory containing the isolated environment.
uv venv
5

Activate the Virtual Environment

Activate the virtual environment to start using it. The activation command varies depending on your shell and operating system.For example, on Unix or macOS:
source .venv/bin/activate
On Windows:
.venv\\Scripts\\activate
6

Install Dependencies

Once the virtual environment is activated, you can install the dependencies specified in the pyproject.toml file using the uv pip install command.
uv pip install -r requirements.txt
7

Run the Project

Use the uv run command to run your project in the isolated environment. This ensures that the project is run with the exact dependencies specified in the lockfile.
uv run main.py
By following these steps, you can effectively manage your Python project’s environment and dependencies using uv.

Option 2: Using conda

If you already have a conda environment with the required dependencies:
1

Activate your conda environment

conda activate your_environment_name
2

Install the package in development mode

pip install -e .
This will make the systematica package importable from anywhere while allowing your changes to be reflected immediately without reinstalling.
If you plan to use vectorbtpro locally, it’s recommended to establish a new environment solely for vectorbtpro

Install VectorBT PRO

Use the following command to install the PRO version of vectorbtpro:
  • Replace GH_USER with your GitHub username.
  • Replace GH_TOKEN with your Personal Access Token.
  • Replace ORGANIZATION with the GitHub organization from which you are installing VectorBT PRO. This will be either
    • polakowo - if you are a collaborator on the official VectorBT PRO repository; or
    • bfcdev - if you are a member of this organization and have access to BFC’s fork of VectorBT Pro.
uv add -U "vectorbtpro[base] @ git+https://GH_USER:GH_TOKEN@github.com/ORGANIZATION/vectorbt.pro.git"