Skip to content

Preserve rejected orders in results and exports #43

Description

@stefan-jansen

Findings: BR-032.

Make every rejected order visible through BacktestResult, aggregate metrics, DataFrame conversion,
and persisted artifacts. Records must include stable identity, symbol, timestamp, requested order
details, terminal status, and structured reason.

Primary surfaces: order domain types, portfolio ledger, engine.py, result.py, export schemas and
tests.

Acceptance:

  • The unaffordable public run_backtest reproduction returns one rejected order and a rejection
    count of one while preserving zero fills and unchanged equity.
  • No-order and all-orders-rejected runs are distinguishable without retaining Engine.
  • Rejected-order records round trip through the documented result artifact format.
  • Existing result consumers receive a documented compatible schema evolution.

Dependencies: Issue 1.


Plan reference: /home/stefan/ml4t/libraries/ml4t-backtest-dev/.workspace/work/backtest-stable-release/milestone-1/plan.md - Issue 3 in milestone 0.1.0-m1 - Financial correctness and auditability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions