Build, test, and iterate trading ideas — fast
Meet Algo Trading Stack — a lightweight simulator/backtester and live-data sandbox.
It models futures-specific mechanics (tick size/value, margins, leverage), ATR-based risk, realistic slippage & commissions, and includes a clean PyQt GUI for visualizing candlesticks, stops, and equity curves.
Why it’s different
- Extensible by design — while examples focus on futures, the same engine can be extended to stocks, crypto, or any asset class by adjusting configs.
- Config-driven — YAML files define assets, risk models, margins, fees, and data sources. Swap brokers or markets without touching the core code.
- Pluggable bots — bots are modular and easy to build; start with CoinFlip or Trend-Following, then drop in your own logic.
- Interchangeable exit strategies — from simple ATR stops to advanced RL/bandit selectors, exits follow a unified interface and can be mixed and matched.
How to use this wiki
This wiki is here to guide you based on what you’re looking for. Whether you just want to understand how the system works, explore configurations, build your own bot, or contribute new features — start with the section that matches your goal:
-
▶ Getting Started
New here? Start with Get Started to run your first backtest, open the GUI, and see how configs drive everything. -
⚙ Learn the Architecture
Want to understand how the system fits together? Go to High Level Design for an overview of the Backtester Engine, Trading Environment, Bots, Exits, and UI. -
📦 Explore Core Classes
Need details on how the code works under the hood? See Core Classes forBacktesterEngine
,TradingEnvironment
,Order
,Position
,Portfolio
, and how they interact. -
📝 Modify Config Files
Want to trade different markets or change risk parameters? Go to Config Files to learn how YAML defines assets, fees, margins, slippage, and backtest setups. -
🤖 Implement Your Own Bot
Ready to build a strategy? Start at Bots & Strategies to see how CoinFlipBot and TrendFollowingBot extend the base class — then follow the guide to create your own bot. -
⏱ Design or Swap Exit Strategies
Looking to control risk? Visit Exit Strategies for everything from simple ATR stops to advanced RL/bandit hybrids. Exits are interchangeable, so you can plug the same strategy into different bots. -
🔌 Extend the Platform
Need to integrate with a new broker or experiment with ML-based exits? Head to Extending the Platform for guidance on adding APIs, training custom models, and wiring new modules.
Who this wiki is for
- New users → Start with Getting Started and Architecture.
- Strategy developers → See Bots & Strategies and Exit Strategies.
- Contributors → Review Core Classes and Config Files to understand the internals.
Disclaimer: This project is for educational purposes only and is not financial advice.