Skip to content

fix(backtest): reject internal calendar gaps in daily research inputs - #182

Merged
Pigbibi merged 1 commit into
mainfrom
fix/audit-f3-data-integrity-20260908
Sep 7, 2026
Merged

fix(backtest): reject internal calendar gaps in daily research inputs#182
Pigbibi merged 1 commit into
mainfrom
fix/audit-f3-data-integrity-20260908

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Scope

  • F3 / RA-10: reject missing calendar days inside the supplied daily panel window before adjacent opens are treated as one-day returns.
  • Do not require dates outside the input range, invent prices, or reject gaps limited to unselected symbols while the overall calendar remains complete.
  • Exactly src/backtest.py and its existing accounting test file. No dependency/lock edits, provider calls, real replay, publishing, or historical artifact replacement.

Synthetic validation

  • Base accounting tests: 24 passed / 18 subtests.
  • RED: 2 failed subtests for internal Sunday and Tuesday gaps.
  • GREEN accounting + orchestrator: 30 passed / 20 subtests.
  • Full UTC-aligned isolated tests: 130 passed / 66 subtests, with env-i and network denied.
  • Full Ruff, pip check (50 packages), diff/scope and added-line credential-pattern checks passed.

Existing environment limitations

  • Stale uv.lock contains older Firestore/joblib than current pyproject and CI requirements-lock.txt; no lock files were changed. The isolated environment fully resolved current CI requirements, with QPK 7f140f07 and all declared dependencies checked. Missing existing packages were downloaded only for installation; tests denied network.
  • First full local-CST run: 129 passed / 66 subtests and one unchanged exporter test failure. Its local-now fixture disagrees with the unchanged UTC cutoff around midnight. Running with CI-equivalent TZ=UTC passed all 130 tests; no exporter/test workaround was committed.
  • This is an offline input-quality correction, not new promotion or performance evidence.

@Pigbibi
Pigbibi merged commit 9f3bb23 into main Sep 7, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/audit-f3-data-integrity-20260908 branch September 7, 2026 22:31
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