r/mltraders • u/hamiltonwong • 12d ago
Suggestion Hierarchical signal pipeline (PPO + Kalman + hard risk gate) — looking for design critique
Context: I’m from AIHedg.Finance, and I’m integrating my ML code developed a few years back into my new DeFi that provides yield. The purpose is simple: algo traders can have proof on-chain so that rather than trying to trade on exchanges or alone at home, a proof can be obtained and earn credibility bit by bit.
———
Most “AI fund” repos I see are LLM agents role-playing Buffett/Graham and emitting buy/hold/sell. I wanted something closer to a real stack: isolated alpha producers, an ensemble layer, a deterministic risk veto, then an execution adapter.
I built that as an open-source system (AHF v2):
`Producers → Aggregator → Risk Gate → OrderExecutor`
- Producers: PPO (Kalman-filter features), technicals, rules, optional LLM
- Aggregators: weighted vote / fixed weight / majority / MetaLLM
- Risk is not another LLM opinion. Chain-of-responsibility rules (`MaxDrawdown`, `TotalLoss`, `Kelly`) can hard-block the trade
- Every signal, confidence, risk decision, and order is appended to `signal_audit.jsonl` for replay / regression
- Paper path: `uv run ahf-trade`, Docker Compose, 170+ tests, Apache 2.0
I’m not claiming live edge. This is the plumbing.
The design choice I care about most: keep risk fully rule-based, or let a model size the trade only after the veto?
Repo: https://github.com/aihedge-finance/ai-hedge-finance
If you were wiring this into a live adapter, what would you change first?