Commit Graph

118 Commits

Author SHA1 Message Date
dekun 6d63c52ae0 Show OO amplitude, Call/Put size, and min leverage in control.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:43:42 +08:00
dekun bd7640e36a Show both Call and Put legs for OO positions in control.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:40:45 +08:00
dekun 9f7b1b24e6 Show 永期/期期 in control monitor mode column.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:32:49 +08:00
dekun 43a2a9634d Keep OO amplitude refreshed while holding a position.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:30:51 +08:00
dekun 0ac03cc726 Align OO Call/Put position cards with per-leg mark, size, leverage.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:25:03 +08:00
dekun e7115e396a Fix SyntaxError in open_capacity that crashed the API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:14:07 +08:00
dekun 24a860ad3f Split OO budget per leg and size Call/Put independently.
Each half of the risk budget buys its own qty from ask; equal qty no longer forced.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 17:08:05 +08:00
dekun 24943adf13 Fix option-option exit preview to use budget times reward ratio.
Plan no longer shows perp exit_unit*k as the OO target.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:41:51 +08:00
dekun eaf94448a2 Treat option-option amplitude as a maximum cap.
Reject opens when range exceeds the setting; update UI and docs labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:35:39 +08:00
dekun 7d21bc26c7 Realign market pair when hedge mode switches.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:31:26 +08:00
dekun 0659611d82 Show OTM option quotes in option-option mode.
Align session to amplitude Call/Put pair and replace perp/ATM market panels.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:30:29 +08:00
dekun 8d3c181246 Hide perp signal direction in option-option mode.
Plan panel shows Call+Put structure and OO selection/exit labels instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:18:40 +08:00
dekun 42e56d940c Add delete for closed trade records.
Only closed groups can be removed from local history; equity is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:06:36 +08:00
dekun ec244c63c6 Add option-option hedge mode with SIM/LIVE parity.
Mutual hedge_mode, amplitude OTM selection, 1:1 risk sizing, win-leg/full close, dual audits and docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:01:16 +08:00
dekun 04e5c11027 Count expiry settlements as martingale losses.
Even small-profit expiry closes count toward consecutive loss days; only non-expiry profitable days break the streak.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 15:08:44 +08:00
dekun 930e6c26c5 Clear trade history when resetting sim equity.
Deleting groups/fills/residuals and resetting strategy counters keeps funds reset a clean slate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 14:49:51 +08:00
dekun 0f552eb50e Add martingale mode for risk-based percent sizing.
Enable in settings (default off): after N consecutive loss days, double the effective risk_loss_pct up to a configurable max; blocked when base pct > 3%.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 09:55:29 +08:00
dekun b09bcd8414 Show min option hours in control risk/open column.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 07:56:32 +08:00
dekun 1252f45aac Add strategy residual table with manual close at panel bottom.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 07:47:22 +08:00
dekun 09abb8d35b Show residual bid as price/size and recovery percent from bid premium.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 07:43:27 +08:00
dekun a10ecf7409 Gate one-open-per-expiry by historical expiry_ymd across days.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 07:35:44 +08:00
dekun 5c334a4d89 Use all-time closed groups for funds bar trade stats.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:07:47 +08:00
dekun d97f7d20e5 Fix funds bar day stats: align trades, win rate, and PL ratio.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:05:11 +08:00
dekun a7aee8f425 Add control residual options table with liquidity-only manual close.
Fleet status exposes enriched residuals; manual close skips the premium recovery gate while auto mid-close remains unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 15:13:29 +08:00
dekun 469e7a258a Harden residual mid-close: IOC partial fills, exchange reconcile, atomic book.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 14:41:00 +08:00
dekun 640ecc9530 Sell residual options at latest bid via IOC limit, not market.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 14:25:03 +08:00
dekun 62c91d4bd0 Close residual options when premium recovers above configurable threshold.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 14:19:21 +08:00
dekun 60b3743e8d Add initial funds to fleet stats and color total PnL.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 12:51:47 +08:00
dekun cd46d7748c Move fleet stats to nav page; backfill funds and loss metrics from curve/status.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 12:43:17 +08:00
dekun 0c12d76212 Show margin and premium in control positions; align exchange price digits.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 12:32:25 +08:00
dekun 8745d8e6d1 Add fleet stats table with funds, fees, loss streak, and totals.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 12:25:30 +08:00
dekun ead3545df8 Show WeCom machine name after brand title on shell and login.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 11:43:02 +08:00
dekun 9427d9c429 Skip used/residual expiries so ATM monitors the next day.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 10:31:07 +08:00
dekun 079dc83132 Show strategy stats in control monitor detail modal.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 09:49:27 +08:00
dekun 0e3b9e53ac Enrich WeCom open/close notifies with Chinese qty, margin, and PnL.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 08:58:49 +08:00
dekun 9c515644a3 Add risk leverage basis option: actual ask vs selection leverage.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 17:01:18 +08:00
dekun f1da2778ef Add one-expiry-per-day open rhythm gate (default on).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 16:39:32 +08:00
dekun 22c42a19a0 Count exit fees in live/SIM net PnL as entry fee x2.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 09:27:41 +08:00
dekun dffcc4eeb9 Show option bid as price/size and option leverage on plan and trades.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 16:01:34 +08:00
dekun dffcd77837 Add trade move points; label option UPL price as bid not mark.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 15:44:52 +08:00
dekun 8ceb521049 Add WeCom machine name for multi-node push labels.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 17:28:32 +08:00
dekun 021b0d0a22 Align emergency option close to OKX: use bid only, never mark.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 17:15:38 +08:00
dekun c05478015d Read risk_loss_pct exit base and option lev from strategy settings.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 15:03:26 +08:00
dekun 67f22626e9 Show risk params box on control cards and modal.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 14:58:30 +08:00
dekun a317822f7a Improve control monitor cards: green when running, detail modal with positions.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 11:07:54 +08:00
dekun 08fe06d074 Fix control unauthorized: map strategy 401 to 502 and keep fleet headers on redirect.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 10:57:06 +08:00
dekun da5eb4c18c Add Fleet control plane and split manage.sh deploy menu.
Strategy nodes gain fleet token APIs; control/ app for local ops; manage.sh offers strategy vs control one-click deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 10:46:40 +08:00
dekun 200702d066 Harden strategy SoT: fail-closed funds gate, shared open pipeline, LIVE switch guards.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 01:06:32 +08:00
dekun 4c537e7520 Reset auto USDC cooldown in unit tests for stable assertions.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 00:34:36 +08:00
dekun cc0f0ffd0d Run OKX auto USDC convert before option pick when trading USDC is short.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 00:28:11 +08:00