Communitygithub.com

部署閘道 (austin-starks/Public-Portfolio-Challenge)

為 NexusTrade 即時交易組合執行受控部署 + 清理流程:複製入圍者、預覽差額對帳、暫存未核准訂單、驗證成交。僅在人類明確說出「部署並清理」並指定入圍者時使用。

Public-Portfolio-Challenge) 是什麼?

此技能是一個高度受控的「部署閘道」(Stage E),專為 NexusTrade 平台的即時交易組合(live book)設計。其核心目標是透過差額(delta)交易,將現有持倉轉換為當天對指定入圍者(finalist)的全新部署,而不對重疊部位進行重複交易。技能嚴格遵循「人類在環」(human-in-the-loop) 原則:在人類明確說出「deploy + clean up」並指名特定入圍者之前,絕對不會執行任何部署或下單。 工作流程包含五個嚴格順序的步驟:首先將入圍者的策略克隆到即時組合(必須在對帳前完成),然後執行對帳預覽(僅顯示差額訂單,不下單),接著向人類展示預覽並取得明確批准,之後將訂單暫存為「未核准」狀態(人類必須在 NexusTrade UI 手動確認),最後在成交後重新執行對帳以驗證結果。 技能設有硬性前提閘道,包括訊號新鮮度檢查(入圍者的替代數據系列必須能刷新至當前)和處理停滯待處理訂單(這些訂單會阻塞新暫存)。嚴禁自行批准訂單(無批准工具),且預設使用 delta 模式,除非人類明確要求 liquidate_all。 此技能適用於 Claude Code、Cursor 或 Codex 等 AI 代理平台,確保部署過程的可審計性與安全性,避免自動下單帶來的風險。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/austin-starks/Public-Portfolio-Challenge/tree/HEAD/skills/deploy-gate

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

部署閘道 (Stage E — 受控)

在人類明確說出「deploy + clean up」並指名特定入圍者之前,不會部署任何東西,也不會下任何訂單。 此技能僅在該情況下執行。目標:透過差額交易(不對重疊部位進行重複操作),使即時持倉等於今天對所選入圍者的全新部署。

部署前閘道(強制)

  1. 訊號新鮮度閘道。 如果入圍者的替代數據系列無法延伸至當前,且沒有可用的更新路徑,則無論其認證結果如何,都不得部署——過時的排名系列等同於死倉。
  2. 先處理停滯待處理訂單。 檢查即時組合中是否有待處理/「待用戶核准 → 已取消」的訂單——它們會阻塞新的暫存。將它們列出;由人類在 UI 中取消。請注意 automaticOrderApproval 狀態(預設保持不變,除非被告知在部署時切換)。

五個步驟

  1. 先將入圍者複製到即時組合 — 使用 clone_strategies_to_portfolio(來源 = 入圍者,目標 = 即時組合),然後現場驗證克隆。這就是「部署」:它設定即時組合的策略,供下一步進行對帳。reconcile_portfolio_to_strategy 沒有 strategy_source 參數——它會根據自身的策略對即時組合進行對帳,因此克隆必須先執行。如果入圍者與已部署的即時組合完全相同,則無需克隆——請明確指出。
  2. 對帳預覽 — 使用 reconcile_portfolio_to_strategy({ portfolio_id: "<live>", mode: "delta" })。僅預覽——絕不下單。 返回 target、current、orders(已為 create_orders 格式)、估計成本、已實現損益和洗售標誌。期望一個單次差額目標——即時策略的其餘部分將透過每日再平衡逐步累積。請說明這一點;不要將其重新診斷為錯誤。
  3. 向人類展示預覽並取得明確批准。 合理性檢查:訂單僅觸及差額(重疊部位不變)、成本合理、target 等於全新部署,並且(對於參與度修正)目標涵蓋多個名稱,而不僅僅是一個。
  4. 暫存訂單 — 使用 create_orders({ portfolio_id: "<live>", orders: <來自步驟 2 的 orders 陣列> })。暫存為未核准狀態;該工具從不向經紀商提交訂單。人類在 NexusTrade UI 中手動核准這些訂單——沒有核准工具,您也無法核准它們。期權自動暫存為 LIMIT 單。
  5. 成交後驗證 — 重新執行對帳預覽;差額 orders 陣列應接近空值。報告成交狀況、任何剩餘部分、已實現損益、洗售標誌,以及最終的即時參與度(持有的不同名稱)。

規則

  • 預設使用 mode: "delta"。僅在人類明確要求重置成本基礎時使用 "liquidate_all"。
  • 未經針對該特定入圍者的明確授權,絕不執行此技能。
  • 當即時組合 ID 尚未在執行過程中固定時,透過 fetch_portfolios 發現即時目標——絕不能硬編碼未經現場/狀況確認的即時組合 ID。
  • 結案時,重新附加部署所預期的任何每週監控代理。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

austin-starks/Public-Portfolio-Challenge

Build alternative-data custom indicators on NexusTrade (Reddit/WSB mentions, congressional disclosures, insider filings, news-flow) and wire them into a certified book as a rank/tilt/filter signal. Use when adding alt-data to a strategy, building a CustomIndicator via compute sessions, auditing lookahead safety or per-ticker coverage, or deciding whether a data series is dense enough to drive a rank. Covers the compute-session workflow, the sparse-series rule, and source recipes (see references/). Invoke with the NexusTrade MCP connected.

austin-starks/Public-Portfolio-Challenge

Measure a NexusTrade options book's TRUE participation at a fixed cold-start capital base, defeating the compounded-NAV breadth illusion. Use whenever a book's headline \"holds N/21 names\" needs validating, when a live book collapses to a single name (the OSCR trap), when checking whether a SelectTop / per-name-allocation / total-budget change degraded simultaneous participation, or when a certification needs a breadth gate. Uses audit_backtest_breadth at held-fixed $25k.

austin-starks/Public-Portfolio-Challenge

The \"loudly declare\" protocol for platform, engine, or data bugs during a NexusTrade certification campaign — bugs are a first-class deliverable, not something to route around. Use whenever a NexusTrade tool errors, hangs, or returns numbers that contradict the config; whenever you're tempted to write \"probably an engine quirk\"; or when a discovered bug invalidates prior backtests and results must be quarantined. Includes the bug hand-off doc template (see references/BUG_TEMPLATE.md).

austin-starks/Public-Portfolio-Challenge

The mandatory pre-flight contract checks (Stage S0) that must pass before trusting NexusTrade's certification engine for any strategy work. Use at the start of a bakeoff or certification campaign to prove the walk-forward engine runs end-to-end, windows don't leak, fold winners persist, and the engine doesn't fabricate values for dead/not-yet-listed names. Each check has a STOP-and-report failure mode; these runs do NOT count toward any certification minimum.

austin-starks/Public-Portfolio-Challenge

The single-touch lockbox — a final anti-overfitting holdout run once, after design freeze, on a window held out from every fold, sweep, and search. Use when finalizing a bakeoff winner before deploy, setting up the A/B/C baselines as OOS bars, or running the S1.5 gate-coherence auto-relax. Covers why looking at the lockbox twice burns it, the lockbox pass conditions, and the three baselines. The lockbox is distinct from the walk-forward OOS folds.

austin-starks/Public-Portfolio-Challenge

The hard structural constraints for the Public Portfolio Challenge momentum-LEAP options book — the spread-shape rule, the take-profit convexity-cap footgun, the affordability ladder, and the known losers not to re-test. Use whenever building or auditing an options strategy structure, checking spread-shape compliance before a certification, choosing DTE/strike rungs, or deciding whether a proposed structure change is even allowed. A violation is an automatic certification FAIL.

austin-starks/Public-Portfolio-Challenge

Orchestrate an out-of-sample certification of a NexusTrade trading strategy or live book — the master discipline behind the Public Portfolio Challenge. Use whenever you must decide PASS/FAIL on whether a portfolio holds up out of sample before deploying real money, replaying the Episode 10 runbooks, or running a \"certify my book\" / \"prove it out of sample\" / \"re-certify the fix\" task with the NexusTrade MCP connected. Pulls in walk-forward-oos, breadth-audit, sweep-reoptimization, options-structure-rules, bug-protocol, and deploy-gate.

austin-starks/Public-Portfolio-Challenge

The single entry point that executes a Public Portfolio Challenge episode or addendum runbook end-to-end, delegating each stage to the functional skills. Use when asked to run/execute/replay Episode 10, its bakeoff, or its addendum with the NexusTrade MCP connected. Reads the target runbook, pins its real artifacts (IDs, the incumbent bar), sequences the stages, and stops at the gated deploy. It orchestrates; the functional skills do the work.

austin-starks/Public-Portfolio-Challenge

Run a multi-family strategy bakeoff — the SEARCH→CERTIFY funnel that screens many candidate mechanisms down to a certified deploy winner without letting the cheap search layer issue a verdict. Use when replaying the Episode 10 bakeoff, when exploring several distinct strategy families before certifying, when deciding whether \"no deployable winner\" is even a legal conclusion, or when building the per-family certification ledger. Enforces verdict-integrity: only certification can end a campaign.

austin-starks/Public-Portfolio-Challenge

Re-optimize a NexusTrade strategy with a walk-forward SWEEP and label parameter provenance — the discipline that prevents deploying inherited knobs. Use whenever a structural change (sizing, rung depth, universe membership, DTE family, adding a rank signal) forces a re-sweep, when authoring gene_intents from get_sweep_surface, when choosing sweep over GA for a deploy cert, or when selecting the cross-fold-robust winner instead of the per-fold argmax. Invoke with the NexusTrade MCP connected.

austin-starks/Public-Portfolio-Challenge

Run and read a NexusTrade walk-forward out-of-sample study — the certification engine behind the Public Portfolio Challenge. Use when certifying a fixed portfolio (backtest_only) or re-optimizing one (sweep), when setting fold_count / anchored / validation / embargo params, when monitoring a run_walk_forward_study to completion, when reading per-fold OOS returns/Sortino/drawdown, or when a variant's fold calendar needs calendar-alignment against a base control. Invoke with the NexusTrade MCP connected.

相關技能