Adriano 15a4138bbd fix(agents): tighten hypothesis prompt + normalize max_drawdown
Run reale phase1-real-001 ha rivelato due problemi:

1. 67% parse_error perche' qwen3 nestava indicatori non supportati
   (es. "(sma (indicator realized_vol 30) 150)"). Il prompt SYSTEM
   ora esplicita le regole strette: indicator non e' annidabile,
   sma/rsi/etc. esistono solo come 1o argomento di indicator,
   crossover/crossunder accetta espressioni-serie come (feature close)
   o (indicator sma N).

2. max_drawdown calcolato su equity assoluta (P&L in unita' BTC) +1.0
   produceva drawdown nominali enormi (>89000) per strategie con
   posizioni perdenti su BTC a $96k. Normalizziamo dividendo per il
   notional iniziale (close[0]), cosi' max_dd diventa drawdown
   relativo al wealth iniziale.

Test suite resta 122 PASSED, ruff e mypy clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 11:23:50 +02:00

Multi_Swarm_Coevolutive — Phase 1

Lean spike del PoC. Vedi docs/superpowers/specs/2026-05-09-decisione-strategica-design.md per il razionale e docs/superpowers/plans/2026-05-09-phase1-lean-spike.md per il piano implementativo.

Setup

uv sync
cp .env.example .env  # compilare token e API key
uv run pytest         # verifica che tutto installi

Cerbero locale

Phase 1 backtest legge dataset OHLCV cached, ma alcune feature di indicatore sono delegate a Cerbero. Avviare Cerbero locale prima di eseguire un run:

cd /home/adriano/Documenti/Git_XYZ/CerberoSuite/Cerbero_mcp
docker compose up -d

Comandi principali

uv run pytest                                # tutti i test
uv run pytest tests/unit -v                  # solo unit
uv run pytest tests/integration -v -m integration  # solo integration
uv run python scripts/run_phase1.py          # run completo Phase 1
uv run streamlit run src/multi_swarm/dashboard/streamlit_app.py
S
Description
No description provided
Readme 418 KiB
Languages
Python 100%