Communitygithub.com

austin-starks/Public-Portfolio-Challenge

NexusTrade 워크포워드 아웃오브샘플 연구를 실행하고 결과를 확인합니다. Public Portfolio Challenge의 인증 엔진입니다. 고정 포트폴리오 인증(backtest_only) 또는 재최적화(sweep), 폴드 수/앵커/검증/엠바고 파라미터 설정, 실행 완료 모니터링, 폴드별 OOS 수익률/Sortino/드로다운 확인, 변형의 폴드 캘린더를 기본 대조군과 정렬해야 할 때 사용합니다.

Public-Portfolio-Challenge란 무엇인가요?

이 스킬은 워크포워드 아웃오브샘플(OOS) 인증 엔진을 통해 포트폴리오 성과를 엄격하게 검증하는 방법을 제공합니다. 2022년부터 현재까지의 기간을 5개의 앵커드 폴드로 나누어 검증 모드로 실행하며, 각 폴드의 OOS 구간에서 수익률, Sortino 비율, 최대 드로다운을 측정합니다. 고정된 전략서를 인증(backtest_only)하거나 실패 시 유전 알고리즘(sweep)으로 재최적화할 수 있으며, 인증 시 활동 기준, 수익률 0% 이상, Sortino 0.5 이상 정책이 적용됩니다. 주요 기능으로는 연구 실행 전 미리보기, 실행 모니터링, 폴드별 OOS 결과 분석, 독립 재백테스트와의 일관성 확인, 퇴화도 평가, 드로다운 정직성 검증, 그리고 옵션 구조 규칙 준수 확인 등이 포함됩니다. LaunchAgent 전략은 과거 데이터를 오염시키므로 인증 전에 반드시 제거해야 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/austin-starks/Public-Portfolio-Challenge/tree/HEAD/skills/walk-forward-oos

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

워크포워드 OOS 인증

결정론적 아웃오브샘플 엔진입니다. 워크포워드, 검증 모드, 앵커드, 5개 폴드, 2022→오늘 — OOS 폴드가 최종 판정이며, 단일 백테스트가 아닙니다.

연구 호출

mcp__nexustrade__run_walk_forward_study (도구는 지연 로딩됨 — ToolSearch를 통해 로드). 항상 먼저 preview_only: true로 실행하여 폴드 캘린더와 비용을 확인하고, 2022→오늘 기간을 포함하는지 확인하십시오(2022 베어와 2025년 4월 매도세를 모두 포함해야 함 — 이 책의 가장 깊은 드로다운은 2025년 4월 이벤트이므로 폴드가 이를 포함해야 함). 그런 다음 false로 전환하고 study_id를 기록하십시오.

{
  "portfolio_id": "<대상 또는 깨끗한 클론>",
  "global_start_date": "2022-01-01",
  "global_end_date":   "<오늘>",
  "fold_count": 5,
  "walk_forward_mode": "anchored",
  "mode": "validation",              // 폴드별 독립 OOS
  "oos_width_days": 252,
  "embargo_days": 14,
  "interval": "Day",
  "inner_mode": "backtest_only",     // 고정 책 인증 — 폴드별 최적화 없음
  "preview_only": true               // 실제 실행하려면 false로 전환
}
  • 고정 책 인증: inner_mode: "backtest_only" (engine_kind ga/default — 고정 구성 인증에는 sweep이 거부됨).
  • 재최적화 (실패 또는 구조적 변경 시에만): engine_kind: "sweep", inner_mode: "optimize", certification: true, gene_intents 추가. GA는 과적합되어 배포 인증에서 거부됨 — sweep이 인증 경로입니다. sweep-reoptimization 참조.
  • certification: true는 활동 기준 + percentChange ≥ 0 + sortino ≥ 0.5 정책을 적용하고 validation_percent를 50으로 기본 설정합니다.

실시간 책 인증 전 사전 점검

  1. get_portfolio — 전략 세트, conditionFieldAudit, 종료 사다리 캡처.
  2. LaunchAgent 제거. LaunchAgent 전략은 과거 데이터에서 실행될 수 없음 — 한 번 실행되고 수천 개의 cooldownSkip 이벤트를 기록하여 폴드를 오염시킵니다. LaunchAgent가 없는 클론(재조정 및 청산 규칙만 있음)을 인증하고 그렇게 했다고 명시하십시오.
  3. 스프레드 형태 확인 실시간 구조 확인(options-structure-rules 참조). 장기 수직 스프레드는 심각한 위반 → 책을 있는 그대로 인증할 수 없음; 즉시 재최적화로 진행.
  4. 볼록성 한도 함정: 여러 개의 "항상" 이익실현 종료 조건이 있는 경우(예: P/L ≥ 20% / 50% / 200%), 가장 낮은 것이 먼저 적용되어 모든 승자를 약 +20%로 제한하여 콜옵션 근거를 무효화합니다. 이를 표시하십시오 — 수익률이 let-winners-run 책을 따라가지 못하는 가장 흔한 원인입니다.

연구 모니터링

list_walk_forward_studies / get_walk_forward_study_results <study_id>를 종료 상태(COMPLETE / ERROR / CANCELLED)가 될 때까지 폴링합니다. jq로 파싱 — 페이로드가 크므로 덤프하지 마십시오. 알려진 실패 모드를 주시하고 표면화하십시오(은폐하지 마십시오 — 이는 버그 프로토콜 트리거입니다):

  • 무음 실패 / ERROR — 폴드 통계 없음 / 빈 validationAggregate. 보고하십시오; 판정을 임의로 만들지 마십시오.
  • 잘못된 기간 — 폴드 캘린더가 2022-01-01에서 시작하지 않음 / 베어를 건너뜀.
  • 백테스트 오염 — 폴드에서 LaunchAgent 실행됨 (사전 점검에서 제거되었어야 함).
  • 거래 없는 / NaN 폴드 — 상위 포지션 마킹 손상; 해당 폴드를 보고, NaN을 평균하지 마십시오.
  • 연구가 예상 비용/시간을 초과하여 실제로 중단됨 → 중지, 요약, 인간 대기 (엔진이 다른 탭에서 수리 중일 수 있음).

필수 폴드별 확인 (이것이 판정입니다)

  1. 폴드별 OOS 테이블 — 각 폴드: 훈련 기간, OOS 기간, OOS 수익률, OOS 최대 드로다운, OOS Sortino, 중앙값 배포, 고유 기초자산, 참여율. validationAggregate 포함.
  2. 독립 재백테스트 지점 확인 — 전체 주기(2022-01-01→오늘), 2022 베어(2022-01-01→2023-01-01), 최근 12개월에 대해 backtest_portfolio ($25k) 실행; 전체 주기 실행에 대해 audit_backtest_posture 실행. 연구 폴드는 새로운 독립 백테스트와 일치해야 합니다. 옵션 책의 기준선 ≠ SPY — 실제 기초자산 또는 동일 가중치 우주 B&H를 사용하고 이를 명시하십시오.
  3. 퇴화도 — 폴드별 훈련 대비 OOS. 훈련→OOS 큰 붕괴 = 과적합, 전체 주기 백테스트가 좋아 보여도 마찬가지.
  4. 드로다운 정직성 — 폴드별 OOS 수익률 옆에 OOS 최대 드로다운 제시; 리스크를 먼저 제시하십시오. 이 레버리지에서 폴드는 큰 수익률과 50–77% 드로다운을 동시에 기록할 수 있습니다.
  5. 범위 게이트 고정 $25k에서 (breadth-audit).
  6. 재현성 / 필드 감사 — conditionFieldAudit이 의도한 노브와 일치; 재실행 시 compare_backtests {tolerance_bps: 0} 실행. 표시 이름이 아닌 필드로 확인하십시오.
  7. 스프레드 형태 준수 (options-structure-rules) — 위반 시 강력 거부.

캘린더 정렬 (변형 vs 기본)

워크포워드 엔진은 폴드 캘린더를 지표/데이터의 적용 범위에 맞춰 자르므로, 변형의 연구는 기본과 다른 폴드를 가질 수 있습니다. 항상 변형의 잘린 캘린더와 동일한 global_end_date 로 기본 CONTROL을 실행하고 폴드 대 폴드로 비교하십시오. 폴드별 신호 적용 범위를 폴드별 OOS 옆에 보고하십시오. 신호가 있는 곳에서만 승리하는 변형은 발견된 사실이지 속임수가 아닙니다 — 그러나 그렇게 명시하십시오.

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

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.

관련 스킬