Skip to content

fix(backtest): preserve negative Calmar in Crypto adapters - #228

Merged
Pigbibi merged 1 commit into
mainfrom
fix/audit-f2-metrics-20260908
Sep 7, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/audit-f2-metrics-20260908

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Scope

  • F2 / RA-06: preserve the sign of CAGR when calculating Calmar for ordinary live-pool and combo backtest results.
  • One production formula line plus regression coverage in an existing test file. No promotion authority, provider, replay, dependency, lockfile, or old artifact changes.

Validation

  • Fresh base: 8778bbb.
  • Existing targeted baseline: 11 passed, 4 subtests. New negative-CAGR regression: 2 failing subtests on old source, then GREEN.
  • Targeted runner/accounting tests: 24 passed, 12 subtests. Full offline suite: 179 passed, 95 subtests.
  • Full Ruff, pip check, scope, compile, added-line credential-pattern and diff checks passed.
  • Regression checks both profiles with negative/positive/zero CAGR and undefined zero-drawdown Calmar, retaining ordinary validation_identity=None.

Existing environment limitation

uv sync --locked --offline --extra research fails on the unchanged base: pyproject requests numpy>=2.4.6 while uv.lock records numpy2.3.5. Per bounded authorization, validation used a fresh isolated environment with a full offline pyproject dependency resolution, not --no-deps or --frozen: QPK c812ed70f83d61bdf1816fa5ca112b0f6976c6b6, numpy2.5.2, pandas3.0.5, pytest9.1.1; all 11 installed packages compatible. The repository lockfile is unchanged and is not claimed valid. CI likewise installs from package declarations; any unrelated lock repair remains outside this PR.

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit 9810f8f into main Sep 7, 2026
2 checks passed
@Pigbibi
Pigbibi deleted the fix/audit-f2-metrics-20260908 branch September 7, 2026 22:03
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