RegimeFlow is a regime-aware quantitative trading stack for backtesting, live execution, and research automation. It combines a C++20 engine, Python bindings, regime detection workflows, live broker adapters, risk controls, and a dynamic plugin system across Linux, Windows, and macOS.
Documentation: https://gregorian-09.github.io/regime-flow/
| If you want to... | Start here |
|---|---|
| Install the Python package and run a backtest quickly | docs/getting-started/quick-install.md |
| Build RegimeFlow from source | docs/getting-started/installation.md |
| Run the first source-based backtest | docs/getting-started/quickstart.md |
| Use the Python API and CLI | python/README.md and docs/python/overview.md |
| Inspect live-trading boundaries and broker support | docs/live/overview.md and docs/live/brokers.md |
| Consume RegimeFlow from CMake or vcpkg | docs/getting-started/quick-install.md |
| Contribute code or plugins | CONTRIBUTING.md |
- HMM-based and plugin-driven regime detection, including transformer-oriented plugin examples.
- Event-driven backtesting with walk-forward optimization, slippage, transaction-cost modeling, and risk overlays.
- Live adapters for Alpaca, Binance, and Interactive Brokers when built with
ENABLE_IBAPI=ON. - Dynamic plugins for strategies, regime detectors, risk managers, and execution models across
.so,.dylib, and.dlltargets. - Python bindings and a Python CLI for research workflows, reporting, and dashboard generation.
- Packaging for wheels, Linux
.deb/.rpmartifacts, and vcpkg overlay/custom-registry consumption.
| Platform | Compiler | Status |
|---|---|---|
| Linux x86_64 | GCC 10+, Clang | CI |
| Windows x64 | MSVC 2022 | CI |
| macOS arm64 | Apple Clang | CI |
| macOS x86_64 | Apple Clang | CI |
The canonical install and support matrix lives in docs/getting-started/installation.md.
pip install regimeflow
regimeflow-backtest --helpcmake -S . -B build
cmake --build build --target all
ctest --test-dir build --output-on-failurefind_package(RegimeFlow CONFIG REQUIRED)
target_link_libraries(your_target PRIVATE RegimeFlow::regimeflow_engine)Detailed install paths, support tiers, and feature flags are in docs/getting-started/installation.md and docs/getting-started/quick-install.md.
import regimeflow as rf
cfg = rf.BacktestConfig.from_yaml("examples/backtest_basic/config.yaml")
engine = rf.BacktestEngine(cfg)
results = engine.run("moving_average_cross")
print(rf.analysis.performance_summary(results))
rf.analysis.write_report_html(results, "report.html")ctest --test-dir build --output-on-failure
pytest python/testsdocs/user guides, tutorials, architecture notes, API reference, and reportsexamples/end-to-end configs, Python workflows, and plugin examplesinclude/public C++ headerssrc/C++ libraries and CLI toolspython/Python package, bindings, and Python-specific docstests/C++ and Python testspackaging/Debian, RPM, and vcpkg consumer assetsports/vcpkg overlay/custom registry port definition
See CONTRIBUTING.md.
Released under the MIT License. See LICENSE.