uv(parity): phase-2 crawl — full TP/SL codepath inventory (cubic curve, 5 SL mechanisms, AdvancedSL LIVE-confirmed)
This commit is contained in:
@@ -63,3 +63,54 @@ argument; today UV would exit on intra-bar spikes BLUE never sees.
|
||||
4. Align check order (TP_FLOOR → TP → SL → MAX_HOLD) or document the tie rule.
|
||||
5. Price-basis equivalence: OBF-mid feed for the ticker (C11) or a measured
|
||||
BingX-mark-vs-OBF-mid divergence bound in the dossier.
|
||||
|
||||
---
|
||||
## PHASE 2 — full codepath crawl (operator: "assume you are a py parser")
|
||||
|
||||
The matrix above UNDERSTATED both mechanisms. Live-verified inventory
|
||||
(BLUE process 431423 env checked directly):
|
||||
|
||||
### TP — the full stack (transcription order)
|
||||
1. **Base**: `fixed_tp_pct=0.0020` (ENGINE_KWARGS trader:134).
|
||||
2. **Soft cubic curve** `prod/clean_arch/tp_curve.py` (64 lines, pure):
|
||||
`tp = clamp(base − 0.00013·(clamp(our_lev/2,0,1))³, floor=0.00187, base)`;
|
||||
`our_leverage = notional/capital` (SYSTEM leverage, not exchange).
|
||||
Applied via `_tp_curve_context` (trader:805) → `_sync_tp_threshold`
|
||||
(trader:906) → `eng.set_live_tp_pct` per loop. ALSO published to HZ
|
||||
`DOLPHIN_FEATURES["live_tp_threshold"]`.
|
||||
3. **OB modulation** ×1.40 cascade / ×0.60 withdrawal / ×0.75 per-asset
|
||||
(alpha_exit_manager:177-207) on top of the curve output.
|
||||
4. **TP_FLOOR ratchet** (aem:232, DOLPHIN_TP_FLOOR=ON).
|
||||
5. Evaluation price: OBF WS mid injection (trader:932).
|
||||
|
||||
### SL — the mechanisms (all LIVE, transcription order)
|
||||
1. **Catastrophic floor** 0.0120 (env DOLPHIN_CATASTROPHIC_FLOOR_PCT),
|
||||
armed per-trade at setup (trader:2022/2287).
|
||||
2. **Overlay floor** 0.0050 + **USD max-loss $500** (env, trader:464-470)
|
||||
for LONG-overlay positions; `_catastrophic_floor_for_open_position`
|
||||
(trader:2496) picks base vs overlay + converts USD cap to pct;
|
||||
ratchet only tightens (trader:2486-2488).
|
||||
3. **Bucket SL table** `_BUCKET_SL_PCT` (trader:242): 7 vol/corr buckets
|
||||
0.008–0.030 — hibernate-protect mode only (trader:2424).
|
||||
4. **Withdrawal-stress hard SL 0.10** (aem:186).
|
||||
5. **AdvancedSLRuntime** `adaptive_exit/advanced_sl.py` (1203 lines) —
|
||||
**CONFIRMED LIVE** (`DOLPHIN_ENABLE_ADVANCED_SL_LIVE=1` in process env;
|
||||
snapshot /mnt/dolphin_training/advanced_sl/latest_advanced_sl.json;
|
||||
evaluate() at trader:4847, HZ-bound :2589). Scoring machine: momentum,
|
||||
stall-fraction, mean-reversion snapback, market-support, V7-forecast,
|
||||
pnl-decay → decisions. NOT yet parsed line-by-line — next session's
|
||||
first target, then the whole stack transcribes to UV ticker qua timing
|
||||
(1s ticks; curve inputs notional/capital via E-feed; OB fields via the
|
||||
MAX_HOLD ingress codex built), then test-to-death per mechanism.
|
||||
|
||||
### Transcription plan (UV side)
|
||||
- tp_curve.py is PURE and dependency-free → vendor/import as-is into UV
|
||||
ticker: recompute effective TP per tick from live notional/capital.
|
||||
- OB modulation + TP_FLOOR: extend MaxHoldIngress → ExitIngress (already
|
||||
carries cascade/regime/imbalance/withdrawal) — one ingress, all exits.
|
||||
- SL: catastrophic floor = present (1.2%); add overlay-floor/USD-cap hooks
|
||||
(UV has no LONG overlay yet — stub with loud NA); bucket table only if
|
||||
hibernate mode ports; AdvancedSL LAST (biggest, needs its own pass).
|
||||
- Tie order: adopt BLUE's TP_FLOOR→TP→SL→MAX_HOLD exactly.
|
||||
- Tests: per-mechanism suites, mutation-RED each branch, curve property
|
||||
tests (monotonic in lev, floor/cap clamps, poison inputs).
|
||||
|
||||
Reference in New Issue
Block a user