Skip to main content

Crate af_backtest

Crate af_backtest 

Source
Expand description

af-backtest — deterministic historical replay for product adapters.

This crate owns the reusable mechanics only: ordered historical ingress, state transitions, decision traces, value curves, metrics, and bounded report projection. Domain event types, accounting, execution semantics, data providers, and concrete strategies stay in product/extension crates.

Structs§

BacktestConfig
Replay limits.
BacktestProjection
A transport/chat-safe projection of a potentially large full report.
BacktestReport
Full replay output.
BacktestSummary
Aggregate metrics for a replay.
ProjectionPolicy
Caps for projecting a report to chat or API consumers.
ReplayStep
Captured decision trace for one event.
ValuePoint
Value after one event.

Enums§

BacktestError
Failure while validating input or replaying.

Traits§

BacktestModel
Product-supplied deterministic replay behavior.

Functions§

run_backtest
Execute a deterministic replay. Events with the same timestamp are allowed and preserve input order; decreasing timestamps fail closed.