Skip to content

Getting Started

This guide explains how to set up the Q-agent workspace locally.

Fast path: the Docker image bundles LEAN CLI, the infrastructure pipelines, and marimo into one container. If you don't need local lean backtest (host-only — see Docker page) and prefer not to manage host venvs, run:

docker run --rm -it -v "$(pwd):/workspace" ghcr.io/wolfpackofone/q-agent:v0.1.0

The host setup below is required only if you want to run lean backtest locally or develop without containers.

Prerequisites

Install the following:

  • Python 3.11+
  • Git
  • Docker Desktop
  • QuantConnect account

Clone the Repository

git clone https://github.com/WolfpackOfOne/Q-agent.git
cd Q-agent

Contributors should clone their own fork and add this repository as upstream; see Contributing.

Create a Virtual Environment

python3.11 -m venv venv
source venv/bin/activate

Windows PowerShell: venv\Scripts\Activate.ps1.

If your system exposes Python 3.11 as python or python3, use that command instead.

Install LEAN CLI

pip install --upgrade pip
pip install lean==1.0.225

Configure QuantConnect

cd MyProjects
lean init
lean login

Verify Installation

lean --version

LEAN cloud backtest workflow

  • Keep strategy logic modular
  • Use notebooks for research and diagnostics
  • Keep reusable code in domain modules
  • Avoid committing local data
  • Use feature branches for experimental work
  • Render new strategies with python scripts/create_strategy.py ProjectName; do not copy _template directly