import type { TradeAnalysis } from './analysis.js'; import type { ChargeSchedule } from './charges.js'; import type { EquityPoint } from './equity.js'; import type { MonthlyReturn } from './monthly.js'; import type { TradeMarker } from './markers.js'; import type { BarMark, Contract, Money, RecordedFill } from './shapes.js'; import type { Summary } from './statistics.js'; import type { Trade } from './trades.js'; /** Everything a run is reported as, and nothing a chart has to compute. */ export interface Report { readonly summary: Summary; /** The trades by direction, by extreme and by run. */ readonly analysis: TradeAnalysis; readonly trades: readonly Trade[]; readonly equity: readonly EquityPoint[]; readonly monthly: readonly MonthlyReturn[]; readonly markers: readonly TradeMarker[]; } /** * The whole report, folded from the fills, the bar closes and the schedule. * * **One pass, in one order, and the order is the result.** The fills are put in * `seq` order once, here, and every fold below reads that same list: the * charges are computed in it, the trades are built from it, the curve is marked * along it and the markers come off it. A second ordering anywhere would be a * report that is right to eleven digits and different in the twelfth on * somebody else's engine, which is the failure this module is shaped to make * impossible rather than unlikely. * * **A charge belongs to the fill that incurred it.** `chargeFor` rounds one * fill's total once, and nothing here rounds it again or re-sums the collection * in another order, so `sum(trade.charges)` and `summary.charges` are the same * money and a test asserts it rather than a page claiming it. * * A run carried out under no schedule at all is charged nothing, which is a * study of the strategy before costs and is a thing worth being able to ask * for. It is not a default: `scheduleFromDeclaration` is what a run under the * declaration's own commission uses, and the caller states which it wants. */ export declare function reportOf(fills: readonly RecordedFill[], marks: readonly BarMark[], schedule: ChargeSchedule | null, contract: Contract, capital: Money): Report; //# sourceMappingURL=report.d.ts.map