SkillAgentSearch skills...

Algotrader

Custom Trading App for Algorithmic Trading

Install / Use

/learn @s-stolz/Algotrader
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

AlgoTrader

AlgoTrader is an experimental trading project that uses the Lightweight Charts library to visualize historical market data.

Architecture

The project is structured into multiple services, each responsible for a specific aspect of the trading system: Architecture

Development Disclaimer

This project is in active development and may undergo significant changes. Backward compatibility is not guaranteed—things might break! Please use this repository for reference only and not as a stable library.

Trading Risk Disclaimer

Trading in derivative instruments—including futures, options, CFDs, Forex, and certificates—carries significant risk and may not be appropriate for all investors. There is a possibility of losing the entire initial investment or even more. Use this project at your own risk.

Support the Project

If AlgoTrader has helped you with your algorithmic trading journey, you can support its continued development by using my IC Trading affiliate link when opening a trading account. IC Trading offers competitive spreads and reliable execution for algorithmic traders.

Using this link costs you nothing extra but helps fund the development of new features and improvements.

Prerequisites

  • Docker installed on your machine.

Getting Started

  1. Clone the repository:
    git clone https://github.com/s-stolz/algotrader.git
    cd algotrader
    
  2. Create local secrets from the example:
    cp config/.env.secrets.example config/.env.secrets.local
    
  3. Generate the root .env from the tracked topology + local secrets:
    python scripts/generate_env.py
    
  4. Edit config/topology.yaml for shared non-secret settings (ports, hosts, tuning), and edit config/.env.secrets.local for credentials/secrets.
  5. Run the project and explore.

Running with Docker Compose

Default workflow (auto-regenerates .env before Compose):

make up

Direct Docker Compose usage:

python scripts/generate_env.py --force
docker compose up --build

This will build and start all necessary services as defined in the docker-compose.yml file.

Central Configuration Model

  • Tracked shared topology: config/topology.yaml
  • Gitignored secrets: config/.env.secrets.local
  • Generated runtime env files: config/.env.shared, config/.env.secrets.db, config/.env.secrets.runtime, config/.env.secrets.broker
  • Generator script: scripts/generate_env.py

Validation and overwrite

python scripts/generate_env.py --validate
python scripts/generate_env.py --force

Make targets

make config
make validate-config
make up
make build
make down
make restart
make logs
make ps

Local Python Environments

Use a root virtual environment for shared library/test tooling and per-service virtual environments for service runtime dependencies.

Shared constraints + service requirements

  • Shared versions live in constraints-shared.txt.
  • Each service keeps its own requirements.txt.
  • If a service must diverge, add <service>/constraints.override.txt with a short rationale comment.

Bootstrap all service venvs

make venvs

Equivalent direct command:

./scripts/setup_venvs.sh all

This now creates:

  • root environment: .venv using requirements.root.txt
  • service environments: <service>/.venv using each service requirements.txt

Bootstrap only root venv

make venv-root

Setup one service

make venv SERVICE=broker-service

Recreate all service venvs

make venvs-recreate

Validate existing environments

make venvs-check

VS Code Multi-Venv Workflow

  1. Open algotrader.code-workspace in VS Code (not only the repo root folder).
  2. The workspace uses python.defaultInterpreterPath = ${workspaceFolder}/.venv/bin/python, so each service folder resolves to its own .venv.
  3. If a service interpreter is not picked up immediately, run Python: Select Interpreter once while a file from that service is active.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This project makes use of third-party software so please check the ATTRIBUTIONS.md file for more information.

View on GitHub
GitHub Stars65
CategoryDevelopment
Updated3d ago
Forks23

Languages

Python

Security Score

100/100

Audited on Apr 4, 2026

No findings