Communitygithub.com

austin-starks/Public-Portfolio-Challenge

Orquesta una certificación fuera de muestra de una estrategia de trading de NexusTrade o de un libro en vivo — la disciplina maestra detrás del Public Portfolio Challenge. Úsalo siempre que debas decidir PASS/FAIL sobre si una cartera se mantiene fuera de muestra antes de desplegar dinero real, reproducir los runbooks del Episodio 10, o ejecutar una tarea de "certificar mi libro" / "probar fuera de muestra" / "recertificar la corrección" con el MCP de NexusTrade conectado. Incorpora walk-forward-oos, breadth-audit, sweep-reoptimization, options-structure-rules, bug-protocol y deploy-gate.

¿Qué es Public-Portfolio-Challenge?

Esta habilidad actúa como el **orquestador y verificador independiente** para el Public Portfolio Challenge, utilizando las herramientas deterministas de NexusTrade para emitir un veredicto holístico PASS/FAIL basado en pliegues fuera de muestra (OOS), nunca en métricas agregadas de entrenamiento. Es útil para traders y desarrolladores que necesitan validar si una cartera de trading sobrevive fuera de muestra antes de arriesgar capital real, evitando el sobreoptimismo de los backtests. Funciona en cualquier plataforma que soporte el MCP de NexusTrade y sigue una estructura de cinco fases: inventario de línea base, construcción y certificación, presentación, y despliegue (solo tras autorización explícita). Sus principios clave incluyen verificar a nivel de campo (no por nombre), rechazar la optimización por pliegue, y reportar resultados nulos honestamente sin torturar variantes.

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

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Certificación de Cartera

La habilidad general para el Public Portfolio Challenge. Eres el orquestador + verificador independiente: ejecutas las herramientas deterministas de NexusTrade directamente y los números son tuyos — no hay ningún agente cuyos resultados estés cuestionando. La certificación es un veredicto holístico PASS/FAIL extraído de pliegues fuera de muestra walk-forward, nunca un número agregado único.

Primeros principios (vinculantes en cada ejecución)

  1. OOS es el único titular. Nunca presentes números de entrenamiento/validación como prueba de generalización. Un gran backtest de ciclo completo con un colapso train→OOS es un FAIL.
  2. El valor reside en el DISEÑO, no en el optimizador. El sweep es un modesto ajustador de perillas que confirma el vecindario de un diseño. Dedica esfuerzo al diseño de la estrategia; pídele poco al sweep.
  3. Despliega la configuración robusta entre pliegues, nunca el argmax por pliegue. La puntuación de validación es un proxy ruidoso; el ganador por pliegue tiene alta varianza. Usa el Sortino OOS maximin / selección robusta.
  4. Verifica a nivel de CAMPO, nunca por nombre mostrado. Usa conditionFieldAudit; copia exactamente los IDs de indicadores del catálogo. Confirma el SUJETO por campo/postura, nunca por su nombre.
  5. Verifica, no afirmes. Cada afirmación sobre el comportamiento del motor debe ser verificada contra eventos, campos o una reproducción antes de que aparezca en un entregable. "Probablemente una rareza del motor" → ejecuta el bug-protocol, no improvises.
  6. Un resultado nulo reportado honestamente es un resultado válido. No tortures variantes hasta que una "gane" — esa es la trampa del argmax por pliegue disfrazada. Empates o deltas a nivel de ruido → mantén la configuración actual.
  7. Sin despliegue, sin órdenes hasta que el humano diga explícitamente "desplegar + limpiar" (el deploy-gate).

Estructura de ejecución estándar

Cada campaña de certificación sigue la misma forma escalonada. Adapta el medio; los extremos son fijos.

  • Etapa A — Línea base + inventario. Confirma el SUJETO por campo (get_portfolio), verifica nuevamente la barra actual, haz un control puntual de un backtest_portfolio fresco + audit_backtest_posture, y — si el libro está en vivo — verifica el estado de órdenes pendientes y automaticOrderApproval. Entrega un párrafo del estado antes. Cuando el comportamiento en vivo sea el problema, reprodúcelo con números duros primero (query_portfolio_events), luego corrige.
  • Etapa B/C — Construir + certificar. Realiza la certificación propiamente dicha. Consulta walk-forward-oos para la mecánica del estudio y las comprobaciones obligatorias por pliegue, breadth-audit para la participación fija de $25k, options-structure-rules para el gate duro de forma del spread, y sweep-reoptimization si algún cambio estructural fuerza un nuevo sweep.
  • Etapa D — Presentar, luego detener. Entrega un paquete listo para la decisión: veredicto arriba, una línea; tabla OOS por pliegue + agregado; comparación lado a lado con la configuración actual con el trade hecho explícito; reglas en lenguaje natural del finalista + conditionFieldAudit + id de build; etiquetas de procedencia en cada parámetro (swept-on-this-book / inherited-from <study-id> / hand-set — heredado es ámbar); advertencias honestas (visión retrospectiva en el universo congelado, realismo de llenado de opciones, apalancamiento/fragilidad, peor drawdown fue la venta de abril de 2025, advertencias de línea base). Incluye el registro de bugs. Sin despliegue.
  • Etapa E — Desplegar (CON PUERTA). Solo después de "desplegar + limpiar" explícito. Consulta deploy-gate.

La prueba holística PASS (sin regla de verde por pliegue)

Certifica PASS cuando la mayoría de los pliegues OOS sean rentables, el Sortino OOS sea positivo y razonablemente estable (piso aproximado ~0.5), el drawdown esté dentro de la tolerancia que realmente mantendrías, el despliegue sea estable entre pliegues, y la degradación train→OOS sea modesta. Un pliegue débil ≠ FAIL. Pérdidas OOS persistentes, drawdown explosivo o fortaleza solo en entrenamiento = FAIL. Una violación de restricción dura (forma del spread, colapso de amplitud) = FAIL automático independientemente del rendimiento.

"Mejor que la configuración actual" (campañas variantes)

Al probar una variante contra una barra en vivo/certificada, "mejor" = mantenida FIJA en los mismos pliegues, mejora el rendimiento OOS sin empeorar el riesgo, O mejora materialmente el riesgo (Sortino/DD) con rendimiento similar, O demuestra mejora en el régimen débil (pliegue bajista), sin degradar la amplitud. Las comparaciones deben estar alineadas por calendario (ejecuta un control base en el calendario recortado de la variante — consulta walk-forward-oos).

Palabras de activación de autoverificación

  • "el backtest lo prueba" → pliegues OOS o no pasó.
  • "reutilizar las perillas del ganador" / "ya certificado" → ¿cambió la estructura? Si sí → nuevo sweep (sweep-reoptimization) antes de certificar.
  • "19/21 nombres" / "gran amplitud" → mide a $25k FIJO (breadth-audit); la amplitud compuesta es una ilusión.
  • "el indicador parece predictivo" → certifícalo, no lo mires a ojo.
  • "probablemente una rareza del motor" → bug-protocol: verifica, no afirmes.

Runbooks de origen (ejemplos prácticos de esta disciplina)

  • episode-10/BAKEOFF_RUNBOOK.md — comprobaciones de cordura del motor, bakeoff de 16 variantes, certificación walk-forward, caja fuerte.
  • episode-10/addendum/RUNBOOK.md — rediseñar entradas y salidas, luego probar el comportamiento OOS.
  • episode-10/addendum/CAMPAIGN_LOG.md — las lecciones completas del apéndice y el registro de despliegue.

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.

Skills relacionados