Communitygithub.com

austin-starks/公共投资组合挑战

编排 NexusTrade 交易策略或实盘账簿的样本外认证——这是公共投资组合挑战的核心纪律。当必须决定一个投资组合在样本外是否经得起考验、是否值得投入真实资金时,请使用此技能。它也适用于重演第 10 集的操作手册,或在连接了 NexusTrade MCP 的情况下运行“认证我的账簿”/“样本外证明”/“重新认证修复”等任务。该技能整合了样本外滚动验证、广度审计、扫描再优化、期权结构规则、错误协议和部署门禁。

公共投资组合挑战 是什么?

该技能为 NexusTrade 平台提供了一个严格的、独立的投资组合认证框架,被称为“公共投资组合挑战”。它作为一个编排器和验证器,直接使用 NexusTrade 工具来得出 PASS/FAIL 的判定,该判定完全基于样本外(OOS)滚动验证的结果,而绝非单一的汇总数字。该技能强调了几个关键原则,包括:仅关注 OOS 表现、重视策略设计而非参数扫描、部署稳健的跨折配置、验证字段而非显示名称、记录所有状态变化。 工作流程遵循一个标准化的 5 阶段结构:阶段 A 用于建立基线和审计;阶段 B/C 是核心的认证过程(利用技能子模块,如样本外滚动验证、广度审计和扫描再优化);阶段 D 生成包含完整溯源标签和疑虑透明说明的决策就绪包;阶段 E(阶段 D 中的“部署门禁”)是仅在人类明确批准后才进行的部署步骤。该技能提供了机器可解析的 PASS 判定逻辑、用于比较变体的“优于当前方案”规则,以及用于防止常见错误的自我检查触发词列表。它明确支持在第 10 集操作手册中找到的工作实例。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

投资组合认证

公共投资组合挑战的统领技能。你是编排器 + 独立验证器:你直接运行确定性的 NexusTrade 工具,数字由你自己掌控——不存在任何你对其结果进行事后质疑的智能体。认证是一个整体的 PASS/FAIL 判定,该判定源自样本外滚动验证折,绝不是一个单一的汇总数字。

首要原则(每次运行均须遵守)

  1. OOS 是唯一的核心指标。 切勿将训练/验证集的数字作为泛化能力的证据。一个全周期回测表现优秀但训练到 OOS 出现崩溃的策略,判定为 FAIL。
  2. 价值存在于设计之中,而非优化器。 参数扫描只是一个适度的参数调节器,用于确认某个设计所在的邻域。应将精力投入策略设计;对扫描结果抱持有限期望。
  3. 部署跨折稳健配置,而非单折最优配置。 验证分数是一个有噪声的代理指标;单折胜出者方差很高。请使用最大化最小 OOS Sortino比率或稳健选择方法。
  4. 在字段级别进行验证,而非按显示名称验证。 使用 conditionFieldAudit;从目录中精确复制指标 ID。通过字段/形态确认主体,切勿按其名称确认。
  5. 验证,而非断言。 关于引擎行为的任何声明,在出现在交付物中之前,都必须对照事件、字段或复现结果进行检查。“可能是引擎的怪癖”→运行错误协议,切勿敷衍了事。
  6. 诚实报告的空结果是有效结论。 不要为了“胜出”而折磨变体——这本质上是换汤不换药的单折最优配置陷阱。如果结果持平或差异属于噪声级别→保留当前方案。
  7. 在人类明确表示“部署并清理”之前,不得部署,不得下单(即部署门禁)。

标准运行结构

每个认证活动都遵循相同的分段模式。可调整中间部分,但首尾部分是固定的。

  • 阶段 A — 基线 + 盘点。 通过字段确认主体(get_portfolio),重新验证当前方案条,抽查一次新鲜的 backtest_portfolio + audit_backtest_posture,并且——如果账簿是实盘的——则检查待处理订单状态和 automaticOrderApproval。提供一段“之前”状态说明。当问题是实盘行为时,先用硬数字复现(query_portfolio_events),然后修复。
  • 阶段 B/C — 构建 + 认证。 执行正式的认证过程。关于研究机制和每折强制性检查,请参考样本外滚动验证;关于固定 $25k 参与度,请参考广度审计;关于严格的价差形状门禁,请参考期权结构规则;如果任何结构性变更强制要求重新扫描,请参考扫描再优化。
  • 阶段 D — 呈现,然后停止。 交付一份可供决策的文档:顶部一行显示判定;每折 OOS 表格 + 汇总;与当前方案并排对比,明确指出交易差异;入围者的纯英文规则 + conditionFieldAudit + 构建 ID;每个参数上都有溯源标签(swept-on-this-book / inherited-from <study-id> / hand-set——继承为琥珀色);诚实的疑虑说明(冻结宇宙中的后见之明、期权成交价填写现实主义、杠杆/脆弱性、最大回撤是2025年4月的抛售、基线疑问)。包含错误日志。不进行部署。
  • 阶段 E — 部署(门禁)。 仅在明确“部署并清理”后执行。参见部署门禁。

整体 PASS 测试(没有单折必须全绿的规定)

当满足以下条件时,认证为 PASS:大多数 OOS 折是盈利的,OOS Sortino比率为正且相当稳定(大致下限 ~0.5),回撤在你实际能够承受的容忍度内,部署跨折稳定,且训练到 OOS 的退化程度较小。一个弱折 ≠ FAIL。持续的 OOS 亏损、爆炸性回撤,或仅凭训练集表现优异 = FAIL。违反硬性约束(价差形状、广度崩溃)= 自动 FAIL,无论回报表现如何。

“优于当前方案”(变体活动)

在测试针对实盘/已认证基准的变体时,“优于”的定义为:在相同折上固定持有,在风险不增加的情况下改善 OOS 回报,或者以相似回报为代价实质性改善风险(Sortino/DD),或者明显改善了弱势市场状态(熊市折),同时广度没有退化。比较必须日历对齐(在变体的截断日历上运行一个基础控制组——参见样本外滚动验证)。

自我检查触发词

  • “回测证明了这一点” → 有 OOS 折才算数。
  • “复用胜出者的参数” / “已经认证过” → 结构是否发生了变化?如果是 → 在认证前重新扫描(扫描再优化)。
  • “19/21 个名称” / “广度不错” → 在固定的 $25k 上测量(广度审计);复利增长下的广度是一种错觉。
  • “这个指标看起来有预测性” → 认证它,而不是拍脑袋。
  • “可能是引擎的怪癖” → 错误协议:验证,切勿断言。

源操作手册(该纪律的工作实例)

  • episode-10/BAKEOFF_RUNBOOK.md — 引擎健全性检查、16 个变体对比测试、样本外滚动认证、锁定箱。
  • episode-10/addendum/RUNBOOK.md — 重新设计入场和出场,然后证明行为在 OOS 中的表现。
  • episode-10/addendum/CAMPAIGN_LOG.md — 附录的完整经验教训和部署日志。

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

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.

相关技能