Skip to content

Fix critical and major issues identified in codebase review#31

Merged
tommed merged 1 commit intomainfrom
claude/codebase-review-HBYM5
Apr 18, 2026
Merged

Fix critical and major issues identified in codebase review#31
tommed merged 1 commit intomainfrom
claude/codebase-review-HBYM5

Conversation

@tommed
Copy link
Copy Markdown
Contributor

@tommed tommed commented Apr 18, 2026

Critical:

  • get_vwap() for IDC now returns true session VWAP (volume-weighted average
    of all historical trades) instead of last trade price. Added _vwap_accum
    accumulator to ContinuousMatchingEngine and a get_session_vwap() method.

  • Auto-discovered signals in _discover_signals() now emit an explicit WARNING
    about look-ahead bias before creating the CsvSignalProvider, making the risk
    visible at engine level in addition to the provider-level warning.

Major:

  • Subscribed signals that are never dispatched (due to data range mismatches
    or incorrect publication_offset) now trigger a WARNING at the end of run()
    instead of silently producing no signal updates for the entire backtest.

  • Test files no longer construct _BacktestContext directly. Added
    tests/testing_utils.py with a make_minimal_backtest_context() factory that
    centralises the internal import. Both test_delivery_position.py and
    test_algo_decorator.py now import from tests.testing_utils.

https://claude.ai/code/session_01XqYtc2t1oCV8eTmXN8aaiY

Critical:
- get_vwap() for IDC now returns true session VWAP (volume-weighted average
  of all historical trades) instead of last trade price. Added _vwap_accum
  accumulator to ContinuousMatchingEngine and a get_session_vwap() method.

- Auto-discovered signals in _discover_signals() now emit an explicit WARNING
  about look-ahead bias before creating the CsvSignalProvider, making the risk
  visible at engine level in addition to the provider-level warning.

Major:
- Subscribed signals that are never dispatched (due to data range mismatches
  or incorrect publication_offset) now trigger a WARNING at the end of run()
  instead of silently producing no signal updates for the entire backtest.

- Test files no longer construct _BacktestContext directly. Added
  tests/testing_utils.py with a make_minimal_backtest_context() factory that
  centralises the internal import. Both test_delivery_position.py and
  test_algo_decorator.py now import from tests.testing_utils.

https://claude.ai/code/session_01XqYtc2t1oCV8eTmXN8aaiY
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tommed tommed merged commit 885e615 into main Apr 18, 2026
2 checks passed
@tommed tommed deleted the claude/codebase-review-HBYM5 branch April 18, 2026 20:22
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.

2 participants