MAT backtesting engine (BTC/ETH futures) plus DRE MVP orchestration components.
Project description
Sistema de optimización MAT + Decision Resilience Engine (DRE)
Framework de investigación y ejecución para optimización cuantitativa resiliente:
- MAT: backtest compuesto BTC/ETH (futuros USDT) con ventanas deslizantes, funding y optimización de reglas de señal.
- DRE (MVP): orquestador con FSM, governance append-only, checkpoints/resume, API FastAPI, storage memoria/Redis y puente de medición a MAT.
Aviso legal: software experimental para investigación. El rendimiento pasado no garantiza resultados futuros.
Qué aporta este proyecto
- Reproducibilidad: CI y tests activos, dataset sintético y contratos versionados.
- Resiliencia de decisiones: flujo con estados, auditoría, colisión
run_id/data_hash, checkpoints y reanudación. - Operabilidad real: API HTTP, almacenamiento Redis opcional y trazas append-only en SQLite.
- Extensibilidad: separación clara entre simulador MAT, skills DRE y contratos ICD.
Instalación
Uso rápido desde PyPI (MAT)
pip install sistema-optimizacion-mat
Entorno completo del repo (MAT + DRE)
pip install -r requirements.txt -r requirements-dev.txt
Inicio rápido MAT
python scripts/bootstrap_synthetic_candles_db.py
pytest tests/ -q
python compound_optimize_runner.py --db data/synthetic_signal_tune.db --holdout-frac 0.2
Salida: JSON en stdout (por ejemplo p_win_terminal, p_ruin, walk_forward).
Optimización de señales:
python scripts/optimize_signal_grid.py --db data/synthetic_signal_tune.db --preset smoke --skip-pairs --holdout-frac 0.2
- Dataset esperado:
docs/DATASET.md - Ejemplos
--signal-config:docs/signal_rules_examples.md
API DRE (MVP)
Levantar servicio:
python scripts/run_dre_api.py --db data/dre_governance.sqlite
Endpoints:
GET /dre/healthPOST /dre/simulatePOST /dre/resume
Ejemplo mínimo:
curl -X POST "http://127.0.0.1:8000/dre/simulate" \
-H "Content-Type: application/json" \
-d '{
"run_id": "opt_20260506_000100_v5.0",
"data_hash": "sha256:demo",
"rng_seed": 7,
"variant": "standard"
}'
Arquitectura y documentos
- Índice docs:
docs/README.md - PDR DRE (01–05):
docs/pdr/README.md - Arquitectura técnica DRE v1.1:
docs/DRE_TECHNICAL_ARCHITECTURE.md - Estado implementación vs roadmap:
docs/DRE_IMPLEMENTATION_STATUS.md - Módulo DRE:
dre/README.md
Estado actual
- Tests:
pytest tests/ -q(incluyetest_dre_*). - Calidad:
ruff check .. maincon pipeline estable y documentación lista para comité técnico.
Licencia y seguridad
- Licencia: MIT
- Reporte de seguridad: SECURITY.md
- Historial: CHANGELOG.md
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 sistema_optimizacion_mat-0.2.0.tar.gz.
File metadata
- Download URL: sistema_optimizacion_mat-0.2.0.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27608c1e4c2cfb326b07d71d4d9c4265da5bde3c1b0da1777181e4db070f4a6b
|
|
| MD5 |
41146820c7bc90a58d2509d72e3d5a7d
|
|
| BLAKE2b-256 |
a1e06a4af19f9c2659ddae71066a7c1660b6931d9e0eb0e9ea36b965c73d55a5
|
Provenance
The following attestation bundles were made for sistema_optimizacion_mat-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on emilianob-ux/SISTEMA-OPTIMIZACION-MAT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sistema_optimizacion_mat-0.2.0.tar.gz -
Subject digest:
27608c1e4c2cfb326b07d71d4d9c4265da5bde3c1b0da1777181e4db070f4a6b - Sigstore transparency entry: 1445659286
- Sigstore integration time:
-
Permalink:
emilianob-ux/SISTEMA-OPTIMIZACION-MAT@7243ba94edc5c2455dab3bca10f3bb3295fbdb1b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/emilianob-ux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7243ba94edc5c2455dab3bca10f3bb3295fbdb1b -
Trigger Event:
release
-
Statement type:
File details
Details for the file sistema_optimizacion_mat-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sistema_optimizacion_mat-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54015ed66e9129ab6efb02a514f7ce56166eeb1d2d53013b3c4ab9ef69188128
|
|
| MD5 |
93c95df609abb988aaef17ce6768ddbb
|
|
| BLAKE2b-256 |
83d88aee4ebf2d144ae5469ce0e22481b168e9d73a9929a0149690904586e0e5
|
Provenance
The following attestation bundles were made for sistema_optimizacion_mat-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on emilianob-ux/SISTEMA-OPTIMIZACION-MAT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sistema_optimizacion_mat-0.2.0-py3-none-any.whl -
Subject digest:
54015ed66e9129ab6efb02a514f7ce56166eeb1d2d53013b3c4ab9ef69188128 - Sigstore transparency entry: 1445659470
- Sigstore integration time:
-
Permalink:
emilianob-ux/SISTEMA-OPTIMIZACION-MAT@7243ba94edc5c2455dab3bca10f3bb3295fbdb1b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/emilianob-ux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7243ba94edc5c2455dab3bca10f3bb3295fbdb1b -
Trigger Event:
release
-
Statement type: