Skip to content

fix(research): apply CN parameters and reject failed promotion reviews - #254

Merged
Pigbibi merged 3 commits into
mainfrom
codex/cn-ai-research-example-20260908
Sep 8, 2026
Merged

fix(research): apply CN parameters and reject failed promotion reviews#254
Pigbibi merged 3 commits into
mainfrom
codex/cn-ai-research-example-20260908

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

CN proxy backtests previously recorded candidate parameters while only applying min_history_days. The runner now forwards the actual parameters, preserves an explicitly empty defensive universe, and retains warmup by observed trading dates instead of weekday offsets. The reproduced holiday case retained 211 observations where 225 were requested.

The existing pilot now exposes a bounded optimize(drift, budget) callback for the 510300/510500/cash example through BacktestOrchestrator and run_grid_search. It searches at most 12 combinations over three parameter keys, with a baseline and up to three development diagnostics. Explicit development inputs, calendar coverage and warmup are required; holdout prices are excluded, failed trials are retained, and missing inputs park without synthetic fallback. Signals also check their actually visible history before firing: a reproduced month-end case previously called a 220-day strategy with only 219 prior dates. Current-day prices and duplicate asset rows cannot satisfy that warmup.

Validation: 71 tests and 4 subtests passed on the currently pinned QPK, with two HITL integration tests explicitly skipped because that pin lacks the cycle. Seven bad-input cases passed after the final nullable-price regression. Those two integration tests separately passed against the frozen QPK source now proposed in QuantStrategyLab/QuantPlatformKit#595. Full Ruff and diff checks passed. Independent review found no new P1/P2.

The final warmup/accounting regression slice passed 64 tests and 4 subtests across four related files, with the same two explicit HITL integration skips. It covers the exact history threshold, later rebalances, next-trading-day execution and cash→ETF→cash commission conservation. The current pin already runs the full 12-combination learning search and contains the strict runner protocol; missing HITL cycle and CN's unimplemented strict runner are separate limitations.

This is a close-only learning proxy, not promotion-grade or live evidence. Existing legacy Tencent CSV artifacts lack the verified license/adjustment manifest required by the strict publisher. Real executable accounting, strict WFA/OOS, approved forward paired-shadow inputs and eventual QPK package adoption remain outstanding. No provider request, model call, broker connection, deployment or dependency-pin upgrade is included.
The evidence-gate caller also rejects every nonzero review-process exit, including exit 1 and termination by a signal. A successful later artifact no longer hides an earlier failed review. Five regression tests with eight subtests use real local synthetic child processes; the primary agent independently reproduced the old exit-1 success and reran the fixed tests. Existing explicit skips, optional-script behavior, validators and dependency pins remain unchanged.

Pigbibi and others added 3 commits September 8, 2026 23:30
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi Pigbibi changed the title fix(backtest): apply CN parameters and add bounded ETF research callback fix(research): apply CN parameters and reject failed promotion reviews Sep 8, 2026
@Pigbibi
Pigbibi merged commit 3110dfa into main Sep 8, 2026
2 checks passed
@Pigbibi
Pigbibi deleted the codex/cn-ai-research-example-20260908 branch September 8, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant