/** * Guard: 2-phase trailing stop with profit-locking tiers. * Phase 1: wide retrace tolerance while position builds. * Phase 2: tiered profit floors (e.g., at 3% ROE lock 1%, at 6% lock 3%, etc.) */ export interface GuardConfig { /** Max retrace from entry allowed in Phase 1 (percentage, e.g., 2 = 2%) */ phase1MaxRetrace: number; /** ROE threshold to transition from Phase 1 to Phase 2 (percentage) */ phase2Trigger: number; /** Profit-locking tiers: [roeTrigger, floorRoe] pairs sorted ascending */ profitTiers: [number, number][]; /** Hard stop loss from entry (percentage, e.g., 5 = -5%) */ hardStop: number; } export interface GuardState { phase: 1 | 2; peakRoe: number; currentFloor: number; } export declare const GUARD_PRESETS: Record; export declare function createGuardState(): GuardState; export declare function evaluateGuard(roe: number, state: GuardState, config: GuardConfig): { action: "hold" | "close"; newState: GuardState; };