Interface for state instance implementations.
Defines the contract for local, persist, and dummy backends.
Intended use: per-signal mutable state for LLM-driven strategies that track
trade confirmation metrics across the position lifetime — e.g. peak unrealised PnL,
minutes since entry, and capitulation thresholds.
Example shape:
{ peakPercent: number; minutesOpen: number }
Profitable trades endure -0.5–2.5% drawdown yet still reach peak 2–3%+.
SL trades either never go positive (Feb25) or show peak < 0.15% (Feb08, Feb13).
Capitulation rule: if position open N minutes and peak < threshold (e.g. 0.3%) —
LLM thesis was not confirmed by market, exit immediately.
Interface for state instance implementations. Defines the contract for local, persist, and dummy backends.
Intended use: per-signal mutable state for LLM-driven strategies that track trade confirmation metrics across the position lifetime — e.g. peak unrealised PnL, minutes since entry, and capitulation thresholds.
Example shape:
Profitable trades endure -0.5–2.5% drawdown yet still reach peak 2–3%+. SL trades either never go positive (Feb25) or show peak < 0.15% (Feb08, Feb13). Capitulation rule: if position open N minutes and peak < threshold (e.g. 0.3%) — LLM thesis was not confirmed by market, exit immediately.