Communitygithub.com

austin-starks/公開投資組合挑戰

使用走進未來 SWEEP 重新優化 NexusTrade 策略,並標記參數來源——這是防止部署繼承旋鈕的紀律。每當結構性變更(規模、階梯深度、成分股成員、DTE 系列、新增排名訊號)迫使重新掃描時,或在從 get_sweep_surface 撰寫 gene_intents 時,或在為部署憑證選擇 sweep 而非 GA 時,或是選擇跨折疊穩健獲勝者而非每折疊 argmax 時使用。請在 NexusTrade MCP 連線狀態下調用。

公開投資組合挑戰 是什麼?

此技能強制執行結構嚴謹的 SWEEP 重新優化與參數來源標記規範,專為 NexusTrade 平台設計。在對策略進行任何結構性變更(例如調整階梯深度、成分股成員或新增替代數據排名訊號)後,開發者必須重新執行走進未來掃描,並明確標記每個部署參數的來源(來源於此策略、繼承自某研究或手動設定)。此技能提供具體的執行步驟:先透過 `get_sweep_surface` 取得可掃描欄位名稱,再以 `engine_kind:"sweep"` 與 `certification:true` 執行 `run_walk_forward_study`,確保掃描非平凡(至少 3 維度 × 3 值)。跨折疊穩健選擇(基於最小 Sortino 比率)是部署的認證路徑,而非可能過擬合的每折疊 argmax。對於不可掃描的自訂指標,則需使用手動變體網格並標記為手動設定(琥珀色)。此規則適用於 Claude Code、Cursor 與 Codex 等支援 NexusTrade MCP 的 AI 代理平台。

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

在你喜歡的 AI 中提問

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

說明文件

掃描重新優化與來源標記

三項常設方法論規則,其存在是因為某部署候選曾經基於從不同結構掃描繼承而來的旋鈕認證,並被呈現為「最佳」。

三項常設規則(對所有未來代理具約束力)

  1. 任何結構性變更皆須重新優化——絕不跨結構繼承基因組。 旋鈕(TP、總預算、每檔規模、排名窗口、VIX 閘門、進場冷卻時間、DTE 區間)是結構依賴的。每當結構改變——可負擔階梯、執行價深度、成分股成員(例如新增股票)、DTE 系列、進場/出場型態,或新增替代數據排名訊號——在認證之前,需在新的投資組合上重新執行 engine_kind:"sweep" 走進未來掃描。僅對繼承旋鈕進行 backtest_only 認證只能確認投資組合具有泛化能力,並不能證明這些旋鈕適合該結構。
  2. 將「探索設計」與「優化所選設計」分開。 篩選候選設計 → 選定一個 → 然後掃描該精確設計的旋鈕 → 接着進行 backtest_only 認證。如果篩選選定設計 X,掃描基礎必須是 X 本身,而非其相鄰變體。絕不掃描失敗者變體,卻讓所選投資組合保持手動調整。
  3. 在交付物中標記每個部署參數的來源—— swept-on-this-book / inherited-from <study-id> / hand-set。「繼承」是琥珀色,非綠色,直到在當前結構上重新掃描。

自我檢查觸發詞: 「沿用旋鈕」、「重複使用優勝者參數」、「在新階梯上使用相同配置」、「已認證,無需重新掃描」、「只需提高配置比例」。每一項都應提示:自這些旋鈕被搜尋後,結構是否改變?若是 → 在認證前重新掃描。

執行掃描

  1. 首先在所選投資組合(或乾淨克隆)上執行 get_sweep_surface,以取得 真正的可掃描欄位名稱。從乾淨種子重新掃描——對已經掃描過的投資組合重新掃描可能導致基因堆疊/重複;請對欄位進行稽核以避免重複條件。
  2. 使用 engine_kind:"sweep"、inner_mode:"optimize"、certification:true、mode:"validation"、錨定、5 折疊(4 可接受)、2022→今日、oos_width_days:252 執行 run_walk_forward_study。完整參數區塊請參閱 walk-forward-oos。GA 會過擬合且被拒絕用於部署認證——掃描是認證路徑。 先使用 preview_only:true 編譯基因並進行成本檢查。
  3. 每個掃描必須非平凡:≥3 個 gene_intents 維度 × 各 ≥3 個數值(例如 BuyingPowerPct、TakeProfitPct、RollTriggerDte、排名深度、delta 區間、DTE)。1 維度或 2 個數值的掃描不符合資格。

精確掃描欄位對應(搞錯這些,掃描便無意義)

  • 止盈 = Action 範圍上的 TakeProfitPct。 絕不將其作為 ExitCondition/OptionPositionPercentChange 掃描。
  • 展延 DTE = Action 範圍上的 RollTriggerDte(僅展延 CloseOption)。
  • CloseOption 盈虧觸發條件:minPnlPercent:100 = +100% TP;maxPnlPercent:-50 = −50% 停損;DTE 展延 = {type:"dte","maxDte":45}。

選擇優勝者(穩健,非 argmax)

讀取 aggregate.crossFoldRobustSelection—— metric:"minSortino"、candidateKey、score、perFoldSortino:具備最高最小跨折疊驗證 Sortino 比率的網格單元。 將其與每個折疊的 selectedCandidateKey、aggregate.dominantCandidateKey 和 winnerStableAcrossFolds 進行比較。部署跨折疊穩健配置,絕不部署每折疊 argmax——每折疊優勝者是高變異性雜訊。

然後在該優勝者可能成為決賽入圍者之前,對其執行完整的 walk-forward-oos Stage-C 檢查 1–7,並附加來源標籤(規則 3)。

自訂指標不可掃描

掃描引擎的 allowedIndicatorTypes 不包含 CustomIndicator,因此替代數據指標型態探索是一個手動構建的變體網格(create_portfolio_variant:深度複製基礎 + JSON-Pointer 修補,先 dry_run),每個變體都經過 backtest_only 認證並標記為 hand-set(琥珀色)。如果優勝者需要旋鈕重新掃描,經典旋鈕(配置/預算/TP/SelectTop/DTE)仍可掃描。請參閱 alt-data-indicators。

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 GATED deploy + cleanup flow for a NexusTrade live book — clone the finalist, preview a delta reconcile, stage UNAPPROVED orders, verify fills. Use ONLY after the human explicitly says \"deploy + clean up\" and names a finalist. Covers the clone-before-reconcile ordering, the single-tick reconcile expectation, stale-pending-order hygiene, the signal-freshness gate, and why you can never approve orders yourself. Nothing here runs during certification.

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

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.

相關技能