REALBT
REALBT (REAListic BackTesting) is a Python-based backtesting framework built to simulate trading strategy performance under realistic market conditions. Built from two years working in fintech, it fills a gap that tools like backtesting.py leave open.
What Makes It Different
Most backtesting engines model transaction costs but skip market friction. REALBT models three friction types that closer mirror real trading:
- Slippage (
costs/liquidity.py) — price movement caused by order execution - Market Impact (
costs/market_impact.py) — effect of the trade itself on price - Transaction Costs (
costs/transaction_cost.py) — commissions and fees
This combination makes strategy evaluation meaningfully more accurate than idealized backtests.
Other Features
- CLI (
python realbt/cli.py) —new(scaffold project),fetch-data(pull historical prices),run(execute a strategy from a config file) - Modular, fully Python, no C extensions
- Supports custom strategy definitions
- Built-in data fetching and result visualization
Motivation
Built to deepen understanding of finance fundamentals while producing something useful for the community. The backtesting-as-toy-car analogy: test your strategy on realistic historical data before committing real capital, just as you'd test a toy car on a realistic track before buying the real thing.
Related Pages
Sources
- GitHub Repo: REALBT -
wiki/sources/github/realbt.md - Obsidian Source: REALBT - A Simple Back-testing Engine in Pure Python -
wiki/sources/obsidian/realbt-a-simple-back-testing-engine-in-pure-python.md
Evidence
Linked source: GitHub Repo: REALBT
Linked source: Obsidian Source: REALBT - A Simple Back-testing Engine in Pure Python