Skip to content

fix(backtest): half-open canonical WFO test fetches - #185

Merged
Trujillofa merged 1 commit into
mainfrom
fix/autopilot-half-open-wfo-test-end
Aug 26, 2026
Merged

fix(backtest): half-open canonical WFO test fetches#185
Trujillofa merged 1 commit into
mainfrom
fix/autopilot-half-open-wfo-test-end

Conversation

@Trujillofa

Copy link
Copy Markdown
Owner

Summary

Follow-up to #179. Canonical experiment_autopilot WFO still passed raw window.test_end into inclusive fetch_range (time <= end). A fill sitting on that exclusive end could complete a trade that a half-open test window would leave unfilled.

This wires wfo_inclusive_fetch_bounds() into future autopilot OOS runs only.

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Documentation update
  • Tests

Testing

uv run pytest tests/test_backtest_quality_bar.py tests/test_experiment_autopilot.py tests/test_backtest.py tests/test_backtest_execution_parity_v2.py -q
uv run ruff check .
uv run ruff format --check .

55 passed on the four files above; quality-bar + autopilot 44 passed.

Checklist

  • I have read CLAUDE.md
  • Tests added/updated
  • No secrets committed
  • Not a live-go

Apply wfo_inclusive_fetch_bounds() to experiment_autopilot OOS windows so
a bar at exclusive test_end cannot complete a trade. Frozen historical
artifacts are not rewritten.
@Trujillofa
Trujillofa merged commit b7178ac into main Aug 26, 2026
3 checks passed
@Trujillofa
Trujillofa deleted the fix/autopilot-half-open-wfo-test-end branch August 26, 2026 22:38
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