/** * One walk of a backtest's bars, with the venue answering between them. * * Split from `drive.ts`, which sets a run up and writes its record, because the * walk is the one part of a backtest that runs once per bar and it is read on its * own: the order in which a frame is delivered, a bar appended and its fills * folded is the whole of what makes a backtest reproducible. */ import type { RecordedFill } from '../accounting/index.js'; import type { Engine, Value } from '../engine/index.js'; import type { Delivered, Destination } from './deliver.js'; import type { ReportWindow } from './range.js'; import type { RecordedBar, RecordedDiagnostic } from './record.js'; /** One line of the script's log, `conformance.md` section 4. */ export interface LogLine { readonly barIndex: number; readonly time: number | null; readonly value: Value; } /** What one walk of the bars produced. */ export interface Walked { readonly fills: readonly RecordedFill[]; readonly frames: readonly Delivered[]; readonly diagnostics: readonly RecordedDiagnostic[]; readonly rows: readonly (readonly Value[])[]; readonly log: readonly LogLine[]; } /** * The bars, in order, with the venue answering between them. * * The one ordering rule: deliver, then append, then collect what the append * reported, then ask the venue what this bar did. A driver that asked the venue * before appending would price a fill against a bar the strategy had not seen. */ export declare function walk(engine: Engine, destination: Destination, bars: readonly RecordedBar[], covered: ReportWindow, keep: { readonly rows?: boolean; readonly log?: boolean; }): Walked; //# sourceMappingURL=walk.d.ts.map