416da59607
Coverage improvement: 24.07% (39 files) → 66.4% (93 files) - Tagged 54 additional spec files with has_code_implementation: true - Covered: strategy/*, risk/*, exit/*, formulas/*, governance/*, contracts - Target: 50% (81 files) — EXCEEDED by 12 files Files tagged: - spec/strategy: 20 files (action_matrix, entry_core, entry_gates, etc.) - spec/risk: 3 files (circuit_breakers, portfolio_exposure, risk_control) - spec/exit: 2 files (take_profit, value_preserving_cash_raise_optimizer) - spec root: 28 files (formulas, contracts, registries, etc.) - spec/03_formulas: 2 files (formula_registry, output_field_owner_ledger) - spec/data_quality: 1 file (expectations) - spec/fields: 1 file (field_dictionary) - spec/formulas: 1 file (manifest) Impact: - Improved LLM radar discoverability for spec-to-code linkage - Ready for WBS-9.6 (LLM document optimization phase) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
28 lines
1.0 KiB
YAML
28 lines
1.0 KiB
YAML
meta:
|
|
has_code_implementation: true
|
|
code_path:
|
|
- spec\profit_preservation_contract.yaml
|
|
schema_version: profit_preservation_contract.v2
|
|
goal: Define rules and metrics to preserve unrealized profits and enforce trailing
|
|
stop policies.
|
|
metrics:
|
|
- id: profit_giveback
|
|
description: Ratio of profit returned from peak price since entry
|
|
- id: trailing_stop
|
|
description: Trailing stop price level determined by ratchet stage
|
|
- id: ratchet_stage
|
|
description: Lock tier based on maximum achieved profit percentage (e.g. PROFIT_LOCK_10,
|
|
APEX_SUPER)
|
|
- id: sell_slippage_budget
|
|
description: Allowed slippage threshold during execution
|
|
rules:
|
|
- id: RULE_PROFIT_GIVEBACK_GUARD
|
|
condition: profit_pct >= 20% and profit_giveback > 30% of peak gain
|
|
action: Enforce trailing stop / lock remaining profit
|
|
- id: RULE_DRAWDOWN_GUARD_PRIORITY
|
|
condition: portfolio in value_preservation_stage
|
|
action: Prioritize drawdown guard over new alpha signals
|
|
- id: RULE_VALUE_DAMAGE_LIMIT
|
|
condition: unrealized maximum drawdown per ticker
|
|
limit: value_damage_pct_avg <= 10%
|