import type { Report } from '../accounting/index.js'; import type { Diagnostic } from '../diagnostics/index.js'; import type { BacktestResult } from './drive.js'; import type { RecordedBar, RunRecord } from './record.js'; /** The report a record folds to, or why it could not be folded. */ export type ReplayResult = { readonly ok: true; readonly report: Report; } | { readonly ok: false; readonly diagnostic: Diagnostic; }; /** * The record's own report, computed again from its own fills. * * The bars are the record's where it carries them and the caller's where it * points at them, and either way they are hashed against what the record names * before a figure is computed from them. */ export declare function replay(record: RunRecord, bars?: readonly RecordedBar[] | null): ReplayResult; /** * The same run, executed again. * * Everything the run depended on is in the record: the program, the bars, the * settings and the inputs. So a rerun takes no argument the record does not * already hold, except the bars a referenced record points at rather than * carries, and the record it produces is comparable with the original field for * field and byte for byte. */ export declare function rerun(record: RunRecord, bars?: readonly RecordedBar[] | null): BacktestResult; type BarsResult = { readonly ok: true; readonly bars: readonly RecordedBar[]; } | { readonly ok: false; readonly diagnostic: Diagnostic; }; /** * The bars a record was made from, proved to be those bars. * * A record carrying its own bars is still checked against any that are supplied * beside them, because supplying a different set is exactly the mistake worth * catching: the caller believes they are replaying this run and they are * studying another one. */ export declare function barsOf(record: RunRecord, supplied: readonly RecordedBar[] | null): BarsResult; export {}; //# sourceMappingURL=replay.d.ts.map