A Professional, Modular Algorithmic Trading Backtesting Engine
Built by Corey Leath (GitHub: Trojan3877)
Targeting Big Tech & Big AI ML/AI Engineering Internships
Algo-Quant-Backtester is a production-grade, modular algorithmic trading engine designed to mimic the workflow of real quant research and ML/AI engineering teams.
The project supports:
- โ Traditional indicator-based strategies
- โ Machine Learning strategies
- โ Feature engineering utilities
- โ Full test suite + CI/CD
- โ MLFlow experiment tracking
- โ Dockerized execution
- โ Clean, scalable architecture
This repository demonstrates L5/L6 engineering competencies, including:
- Reproducible pipelines
- Modular code design
- Machine learning integration
- Automated testing
- Containerization
- Professional-level documentation
โโโ src โ โโโ strategies/ โ โ โโโ sma_strategy.py โ โ โโโ rsi_strategy.py โ โ โโโ macd_strategy.py โ โ โโโ ml_strategy.py โ โโโ indicators/ โ โ โโโ (EMA, SMA, RSI, MACD) โ โโโ metrics/ โ โ โโโ (Sharpe, Sortino, Win Rate, etc.) โ โโโ data/ โ โ โโโ data_loader.py โ โโโ backtester.py โ โโโ utils.py โ โโโ plotter.py โโโ tests/ โโโ Dockerfile โโโ requirements.txt โโโ README.md
- SMA crossover
- RSI reversion
- MACD trend strategy
- ML model-based strategies (XGBoost, LightGBM, etc.)
Every strategy lives in its own class and can be plugged into the backtester easily.
- SMA
- EMA
- RSI
- MACD
- Sharpe Ratio
- Sortino Ratio
- Max Drawdown
- Cumulative Return
- Win Rate
- Indicators
- Strategies
- Backtester
- Utils
- Data loader
Track:
- hyperparameters
- model versions
- performance metrics
- experiment comparisons
git clone https://github.com/Trojan3877/Algo-Quant-Backtester-
cd Algo-Quant-Backtester-
pip install -r requirements.txt
## Quickstart
```bash
# Clone & bootstrap
git clone https://github.com/Trojan3877/AlgoQuant-Backtester-Signal-Engine.git
cd AlgoQuant-Backtester-Signal-Engine
# Setup local environment
cp .env.example .env
make deps
dvc pull
scripts/setup_local.sh
# Run backtest
make backtest
# Deploy locally with Docker Compose
docker-compose up -d
# Deploy to Kubernetes (dev)
kubectl apply -f k8s/
helm install algoquant-backtester helm/algoquant-backtester
# Full prod deploy
make deploy
# Algo-Quant-Backtester-
The AlgoQuant Backtester & Signal Engine is an end-to-end DevMLOps platform for developing, validating, and deploying algorithmic trading strategies.
# AlgoQuant Backtester & Signal Engine
A production-grade DevMLOps platform for developing, validating, and deploying algorithmic trading strategies.
Ingests market data, engineers features, trains quantitative and ML-driven models, backtests strategies, and serves live trading signalsโall automated with modern MLOps tooling.
## Directory Structure
## Next Steps
1. Populate each module in `src/`
2. Configure DVC for data and model tracking
3. Set up CI/CD with GitHub Actions
4. Define Kubernetes manifests and Helm chart
5. Automate deployment with Ansible
6. Implement monitoring with Prometheus & Grafana
7. Provision cloud infra with Terraform
_Developed by Corey Leath (Trojan3877)_
git add README.md
git commit -m "Add README.md with project overview and structure"
git push
AlgoQuant-Backtester-Signal-Engine/
โโโ .github/
โ โโโ workflows/ # CI: lint, tests, performance gates
โ โโโ ci.yml
โโโ ansible/ # Configuration management
โ โโโ inventories/
โ โ โโโ dev.ini
โ โ โโโ prod.ini
โ โโโ playbook.yaml
โโโ k8s/ # Kubernetes manifests
โ โโโ deployment.yaml
โ โโโ service.yaml
โ โโโ hpa.yaml
โโโ terraform/ # Cloud infra (e.g. AWS, GCP)
โ โโโ main.tf
โโโ data/ # DVC-tracked raw + processed
โ โโโ raw/ # e.g. downloaded from Kaggle
โ โโโ processed/
โโโ src/
โ โโโ ingestion/ # Ingest Snowflake & streaming
โ โ โโโ ingest.py
โ โโโ features/ # Feature engineering & labeling
โ โ โโโ build_features.py
โ โโโ models/ # Strategy models (TensorFlow & PyTorch)
โ โ โโโ tf_signal.py
โ โ โโโ torch_rl.py
โ โโโ backtest/ # Vectorized backtester & walk-forward
โ โ โโโ backtest.py
โ โโโ serve/ # Real-time signal API (FastAPI)
โ โ โโโ app.py
โ โโโ utils/ # Common helpers (logging, config)
โ โโโ config.py
โโโ notebooks/ # Kaggle-style EDA & prototyping
โ โโโ exploration.ipynb
โโโ Dockerfile # Container for API + backtester
โโโ docker-compose.yml # Local dev stack (API, monitoring)
โโโ Makefile # `make deps`, `make lint`, `make test`, `make deploy`
โโโ requirements.txt # Python 3 deps
โโโ dvc.yaml # DVC pipeline stages
โโโ CHANGELOG.md
โโโ CONTRIBUTING.md
โโโ README.md