A Python framework for market simulation and investment strategy modeling, built from composable primitives
Project description
rebalanced
WIP: A Python framework for market simulation and investment strategy modeling, built from composable primitives.
Overview
rebalanced is a financial simulation framework built from composable primitives — reusable building blocks for modeling markets, portfolios, and trading strategies.
Planned Primitives
- Finite State Machines (FSM): Event-driven state transitions ✓ (implemented)
- Event Streams: Time-series data processing
- Portfolio Models: Pluggable representations of holdings
- Simulation Engine: Orchestration and lifecycle management
- Analytics: Reporting and visualization
Use Cases
- Strategy Backtesting: Simulate trading strategies against historical data
- Portfolio Rebalancing: Model rebalancing rules as composable state machines
- Market Simulation: Build agent-based models of market behavior
- Risk Analysis: Stress-test strategies across scenarios
Installation
pip install rebalanced
Packages
This is a monorepo with the following packages:
| Package | Description |
|---|---|
rebalanced |
Core namespace package |
rebalanced-core |
TBD: Simulation orchestration engine (planned) |
rebalanced-fsm |
Finite state machine primitives - event-driven state transitions |
rebalanced-cli |
TBD: Command-line interface for the simulation engine (planned) |
rebalanced-lens |
TBD: Analytics and reporting (planned) |
Development
This project uses uv for dependency management:
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run linters
uv run ruff check .
Status
🚧 This project is in early development. APIs are subject to change.
License
Apache 2.0 License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rebalanced-0.1.0.tar.gz.
File metadata
- Download URL: rebalanced-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ce0e481625e5700f717fed195de25cc6c1f425c5568dfee44219d5d82aeca03
|
|
| MD5 |
044342aadb77560864470ca9fbecd0c2
|
|
| BLAKE2b-256 |
d53a89cd304f68d6273d172af02db4e1e40dc38c820b84b12f3c101c9bd35f7f
|
File details
Details for the file rebalanced-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rebalanced-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cadf8638547e242369f95bc0a71feb2154b8e4c5dedf439f8b40c5bad07c8aca
|
|
| MD5 |
98a80874577997e9cd706cf9bde0e2c9
|
|
| BLAKE2b-256 |
b00a3c0c222548d69aa76e04795179ea0fb78061fb0403104440091074392099
|