Communitygithub.com

austin-starks/Public-Portfolio-Challenge

单次触碰锁箱——在设计冻结后,对从每一折、扫描和搜索中保留的窗口执行一次最终的反过拟合保留测试。在部署前确定比赛获胜者、将A/B/C基线设为OOS基准线或运行S1.5门控一致性自动松弛时使用。涵盖为何查看锁箱两次会烧毁它、锁箱通过条件以及三个基线。锁箱与滚动前向的OOS折不同。

Public-Portfolio-Challenge 是什么?

该技能定义了一种严格的单次触碰锁箱方法,作为反过拟合的最后防线,专门用于金融投资组合回测,支持Claude Code等AI代理平台。锁箱是一个固定的保留窗口(默认126天),在所有滚动前向OOS折(walk-forward-oos)之外,仅在设计完全冻结后触碰一次。技能详细说明了通过条件(如OOS收益率不低于最差单折、最大回撤≤55%等),并强调触碰锁箱后再次迭代设计会烧毁锁箱,需使用新的保留窗口。此外,技能还介绍了三个基线(A/B/C):A为全市场等权买入持有(仅作为收益率基准),B为朴素LEAP梯子(在特定宽度下作为Sortino基准),C为冻结的现有基准,以及S1.5阶段的门控一致性自动松弛机制,用于在基准过于严苛时自动调整B的仓位预算以使其与55%的仓位上限可比,而无需人工决策。该技能适用于任何需要严格防过拟合验证的金融回测工作流。

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

在你喜欢的 AI 中提问

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

文档

单次触碰锁箱与基线

锁箱是一个最终的保留数据集,任何折、扫描或搜索都不会触碰它——这是抵抗日历拟合选择压力的最后一道防线。它与滚动前向的OOS折(walk-forward-oos)不同,后者在搜索期间会被反复使用;锁箱仅被触碰一次。

锁箱

  • 是什么: 滚动前向的跨度在运行日期之前提前 lockbox_width_days = 126(约6个月)处停止。那个最终窗口 (运行日期 − 126天) → 运行日期 就是锁箱——从所有折、所有扫描、所有搜索中保留出来。
  • 如何操作: 只有那些已经在滚动前向聚合上通过了每道门的、组装好的部署形态书籍,才能在设计冻结后(阶段S2),在锁箱上恰好运行一次。
  • 通过条件(在S0阶段冻结,看到结果后不要移动它们):
    • 锁箱OOS收益率 ≥ 最差的单折滚动前向OOS收益率;
    • 锁箱最大回撤 ≤ 55%;
    • 持仓清晰(audit_backtest_posture,所有四个条件);
    • 宽度 ≥ 9个合格标的(audit_backtest_breadth——参见宽度审计)。

单次触碰是绝对的

如果你查看了锁箱然后又迭代了设计,那么锁箱就被烧毁了——将滚动前向的跨度向后移动,在部署前预留一个新鲜的尾部。锁箱失败被视为日历拟合选择压力,意味着无法部署,除非有记录在案的所有者覆盖操作明确指明该锁箱。

三个基线(A/B/C)作为OOS基准线(阶段S1)

通过 create_portfolio 从已提交的 snapshots/*.json 文件加载。在当前的引擎上对A和B进行评分;复制C的已冻结发布数据作为需要超越的标杆。

  • A — 等权买入持有(全市场标的)。仅作为收益率基准,绝不是Sortino基准——它的Sortino反映的是权益市场牛市的平滑性,这是杠杆多头溢价组合无法匹配的。
  • B — 朴素LEAP梯子(规范说明:所有标的,无排名/筛选,14天周期,每个标的占投资组合8%,预算上限95%,结构为第一个可承受的梯级: [Δ0.50 call → Δ0.55/0.25 → Δ0.55/0.40 → Δ0.50/0.42 vertical],所有期限180–365天,当DTE ≤ 45时单次退出)。仅在宽度≥9/20的折中作为Sortino基准。
  • C — 冻结的现有基准,包含已发布的每折OOS数据,逐字复制(不要重新运行以“改进”它们)。

S1.5 — 门控一致性自动松弛(确定性,无需所有者干预)

在设计开始之前,检查“超越基线B”和≤55%仓位上限是否可以同时满足——B是一个约95%部署的投资组合,因此受仓位上限限制的决赛选手无法超越其部署水平。如果不可满足,自动松弛基线B:降低B的 totalBudget,直到其自身的每日中位数部署≤55%,重新运行其S1评分,并记录原始B与仓位匹配后的B。这不是门控放松,也不是所有者决策——只有基准被调整为可比较;阈值保持冻结。

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 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.

相关技能