Skip to content

test(research): characterize timing and cost limitations - #370

Merged
Pigbibi merged 1 commit into
mainfrom
research/characterize-timing-cost-contract
Oct 11, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
research/characterize-timing-cost-contract

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

  • Add 9 deterministic characterization tests for daily lookahead, same-row signal/fill, stale forward-filled quotes, trend and BTC DCA cash-buffer accounting, cost-free buys/sells, and missing pre-fill equity anchor.
  • Document current semantics vs future acceptance, uncomputed timing/cost validation, and explicit research comparability limits.
  • ONLY tests and documentation. The backtest model and all production/runtime/strategy/notification code are unchanged.

Relates to #366. Does NOT close #366: fee/slippage accounting and causal timing remain unresolved. Passing tests characterize existing defects; they do not claim a corrected model or real financial returns. First-fill-loss acceptance is documented as unimplemented because today's zero-cost model cannot generate that fixture naturally.

Verification

  • Exact published head: ec485c2504468a160cf19794cddd7ff1f8538556; independently verified with git ls-remote.
  • CI run 38135975559: terminal SUCCESS, including compile, repository-wide ruff, QPK pin/lock consistency and full pytest suite.
  • 9 focused local unittest tests and repository-wide ruff: passed.
  • Full local strictly offline pytest: 1504 passed, 208 subtests passed; one existing uv-lifecycle dependency-install fixture failed because its build dependencies were not all cached. Full local unittest: 486 run, same one dependency-cache error. This environment limitation was not hidden by skipping the fixture or modifying source; CI passed it.
  • Independent read-only review: no actionable findings.

No merge or deployment is requested. This remains a draft.

Tests and research contract documentation only. Model defects remain unresolved; relates to #366.
@Pigbibi
Pigbibi marked this pull request as ready for review October 11, 2026 13:23
@Pigbibi
Pigbibi merged commit c0a5799 into main Oct 11, 2026
1 check passed
@Pigbibi
Pigbibi deleted the research/characterize-timing-cost-contract branch October 11, 2026 13:23
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.

research/backtest.py 未计手续费与滑点(回测标准 v1 §3)

1 participant