⠀⠀⡰⡖⠒⠒⢒⢦⠀⠀
⠀⢠⠃⠈⢆⣀⣎⣀⣱⡀ QUBX | Quantitative Backtesting Environment
⠀⢳⠒⠒⡞⠚⡄⠀⡰⠁ (c) 2024, by Dmytro Mariienko
⠀⠀⠱⣜⣀⣀⣈⣦⠃⠀⠀⠀
Qubx is a next-generation quantitative trading framework designed for efficient backtesting and live trading. Built with Python, it offers a robust environment for developing, testing, and deploying trading strategies.
poetry install# Create a simple strategy template (default)
poetry run qubx init
# Or specify a name and symbols
poetry run qubx init --name my_strategy --symbols BTCUSDT,ETHUSDTcd my_strategy
# Run in paper trading mode
poetry run qubx run config.yml --paper
# Or run in Jupyter mode for interactive development
./jpaper.sh# List available strategy templates
poetry run qubx init --list-templates
# Create strategy with full project structure and MACD example
poetry run qubx init --template project --name my_project- Initialize:
poetry run qubx init- Create strategy from template - Develop: Edit
strategy.pyto implement your trading logic - Test:
poetry run qubx run config.yml --paper- Run in paper mode - Debug:
./jpaper.sh- Use Jupyter for interactive development - Deploy: Configure for live trading when ready
- 🚀 High-performance backtesting engine
- 🔄 Live trading support
- 📊 Advanced data analysis tools
- 📈 Integration with multiple exchanges
- 🛠 Comprehensive strategy development toolkit
- 🔍 Detailed performance analytics
For detailed documentation, visit Qubx Documentation
To build and run Qubx, you need:
- Python 3.10 or higher
- C/C++ compiler for Cython compilation
- Poetry for dependency management
pip install qubx- Clone the repository
- Install dependencies using Poetry:
poetry installExample trading strategies can be found in the examples/ directory.
Qubx comes with a command-line interface that provides several useful commands:
qubx --help # Show all available commandsAvailable commands:
qubx init- Create a new strategy from templatequbx run- Start a strategy with given configurationqubx simulate- Run strategy simulationqubx ls- List all strategies in a directoryqubx release- Package a strategy into a zip filequbx deploy- Deploy a strategy from a zip filequbx browse- Browse backtest results using interactive TUI
Run the test suite:
just test- Check code style:
just style-check - Build package:
just build - Run verbose tests:
just test-verbose
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.