The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

Public API / @insiderfinance/totalfinance

@insiderfinance/totalfinance/backtest/artifacts

import from '@insiderfinance/totalfinance/backtest/artifacts'

Every public export in this entry point, including type-only declarations. Search by name or concept.

Jump to an export (29)

BACKTEST_RUN_ARTIFACT_TYPE · BACKTEST_RUN_KINDS · BACKTEST_RUN_KIND_LIST · BACKTEST_RUN_LIMITS · BacktestHygieneBlock · BacktestRunArtifactInput · BacktestRunArtifactLimits · BacktestRunComparison · BacktestRunIdentity · BacktestRunInputs · BacktestRunKind · BacktestRunKindDescriptor · BacktestRunReplay · BacktestRunReport · BacktestRunResults · IdListSection · InputOf · MembershipSection · NamedDelta · ReadBacktestRunResult · RebalanceDelta · RecordedModels · ReplayModels · RunOf · VariationDelta · backtestRunArtifact · compareBacktestRuns · readBacktestRun · replayBacktestRun

value

BACKTEST_RUN_ARTIFACT_TYPE

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export declare const BACKTEST_RUN_ARTIFACT_TYPE: 'totalfinance.backtest-run';
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

BACKTEST_RUN_KINDS

The frozen data projection of the kind table — what an agent reads before choosing a kind.

export declare const BACKTEST_RUN_KINDS: Readonly<Record<BacktestRunKind, BacktestRunKindDescriptor>>;
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

BACKTEST_RUN_KIND_LIST

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export declare const BACKTEST_RUN_KIND_LIST: readonly BacktestRunKind[];
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

value

BACKTEST_RUN_LIMITS

Decision 9's bounded-work table (core's `ARTIFACT_WORK_LIMITS`, re-exported for this subpath's callers).

export declare const BACKTEST_RUN_LIMITS: Readonly<{ maximumEmbeddedBytes: Readonly<{ default: 1048576; maximum: 8388608; }>; embeddedRowLimit: Readonly<{ default: 5000; maximum: 50000; }>; maximumDifferences: Readonly<{ default: 1000; maximum: 100000; }>; maximumLeaves: Readonly<{ default: 2000000; maximum: 2000000; }>; gridPoints: Readonly<{ default: 256; maximum: 4096; }>; restarts: Readonly<{ maximum: 64; }>; holdoutEvaluations: Readonly<{ maximum: 100000; }>; listedIds: Readonly<{ default: 200; maximum: 10000; }>; }>;
Fields, parameters & returned members (22)
Name / typeMeaning & unitOptional / default
embeddedRowLimit
Readonly<{ default: 5000; maximum: 50000; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
embeddedRowLimit.default
5000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
embeddedRowLimit.maximum
50000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
gridPoints
Readonly<{ default: 256; maximum: 4096; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
gridPoints.default
256

unitless by name
Required / declared member
No @default declared; consult the signature and description.
gridPoints.maximum
4096

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdoutEvaluations
Readonly<{ maximum: 100000; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdoutEvaluations.maximum
100000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
listedIds
Readonly<{ default: 200; maximum: 10000; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
listedIds.default
200

unitless by name
Required / declared member
No @default declared; consult the signature and description.
listedIds.maximum
10000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumDifferences
Readonly<{ default: 1000; maximum: 100000; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumDifferences.default
1000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumDifferences.maximum
100000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumEmbeddedBytes
Readonly<{ default: 1048576; maximum: 8388608; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumEmbeddedBytes.default
1048576

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumEmbeddedBytes.maximum
8388608

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumLeaves
Readonly<{ default: 2000000; maximum: 2000000; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumLeaves.default
2000000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
maximumLeaves.maximum
2000000

unitless by name
Required / declared member
No @default declared; consult the signature and description.
restarts
Readonly<{ maximum: 64; }>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
restarts.maximum
64

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestHygieneBlock

The research-hygiene verdicts a caller attaches to a single run — verbatim `@insiderfinance/totalfinance/risk` results.

/** The research-hygiene verdicts a caller attaches to a single run — verbatim `@insiderfinance/totalfinance/risk` results. */
export interface BacktestHygieneBlock {
    researchProtocol?: Record<string, unknown>;
    deflatedSharpe?: Record<string, unknown>;
    backtestOverfitting?: Record<string, unknown>;
}
Fields, parameters & returned members (3)
Name / typeMeaning & unitOptional / default
backtestOverfitting
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
deflatedSharpe
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
researchProtocol
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunArtifactInput

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface BacktestRunArtifactInput<Kind extends BacktestRunKind> {
    kind: Kind;
    /** The verb's result, verbatim. */
    run: RunOf<Kind>;
    /** The request as it was called — rows included; callbacks recorded and not stored; models recorded by description. */
    input: InputOf<Kind>;
    /** Row-set labels (`dataset.returns`, `run.holdings`, `run.ledger.events`) to store by `TableHandle` instead of embedding. */
    referenceRowSets?: readonly string[];
    /** Storage locators to stamp on the minted handles, keyed by row-set label. */
    locators?: Record<string, string>;
    /** Verbatim `@insiderfinance/totalfinance/risk` verdicts for a single run; a grid carries its own and refuses this. */
    hygiene?: BacktestHygieneBlock;
    snapshotHash?: string;
    libraryVersion?: string;
    createdFrom?: string[];
    provenance?: Provenance;
    limits?: BacktestRunArtifactLimits;
}
Fields, parameters & returned members (23)
Name / typeMeaning & unitOptional / default
createdFrom
string[]

unitless by name
Optional
No @default declared; consult the signature and description.
hygiene
BacktestHygieneBlock
Verbatim `@insiderfinance/totalfinance/risk` verdicts for a single run; a grid carries its own and refuses this.
unitless by name
Optional
No @default declared; consult the signature and description.
hygiene.backtestOverfitting
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
hygiene.deflatedSharpe
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
hygiene.researchProtocol
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
input
InputOf<Kind>
The request as it was called — rows included; callbacks recorded and not stored; models recorded by description.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
libraryVersion
string

unitless by name
Optional
No @default declared; consult the signature and description.
limits
BacktestRunArtifactLimits

unitless by name
Optional
No @default declared; consult the signature and description.
limits.embeddedRowLimit
number

unitless by name
Optional
No @default declared; consult the signature and description.
limits.maximumEmbeddedBytes
number

unitless by name
Optional
No @default declared; consult the signature and description.
locators
Record<string, string>
Storage locators to stamp on the minted handles, keyed by row-set label.
unitless by name
Optional
No @default declared; consult the signature and description.
provenance
Provenance

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.asOf
number

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
Optional
No @default declared; consult the signature and description.
provenance.dataset
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.provider
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.receivedAt
number

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.requestId
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.sourceVersion
string

unitless by name
Optional
No @default declared; consult the signature and description.
provenance.warnings
QuantWarning[]

unitless by name
Optional
No @default declared; consult the signature and description.
referenceRowSets
readonly string[]
Row-set labels (`dataset.returns`, `run.holdings`, `run.ledger.events`) to store by `TableHandle` instead of embedding.
unitless by name
Optional
No @default declared; consult the signature and description.
run
RunOf<Kind>
The verb's result, verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
snapshotHash
string

unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunArtifactLimits

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface BacktestRunArtifactLimits {
    maximumEmbeddedBytes?: number;
    embeddedRowLimit?: number;
}
Fields, parameters & returned members (2)
Name / typeMeaning & unitOptional / default
embeddedRowLimit
number

unitless by name
Optional
No @default declared; consult the signature and description.
maximumEmbeddedBytes
number

unitless by name
Optional
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunComparison

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface BacktestRunComparison<Kind extends BacktestRunKind = BacktestRunKind> {
    kind: Kind;
    artifactIds: {
        baseline: string | null;
        candidate: string | null;
    };
    runHashes: {
        baseline: string;
        candidate: string;
    };
    identical: boolean;
    sameInputs: boolean;
    sameUniverse: boolean;
    sameStrategy: boolean;
    sameModels: boolean;
    sameConventions: boolean;
    /** The performance block and the run-level totals, name by name. */
    metrics: NamedDelta[];
    /** Final-holding membership (names held at the last rebalance) — single runs only. */
    holdings: MembershipSection | null;
    /** Rebalance-by-rebalance turnover and cost deltas over the shared index range, listed up to `listedIds`. */
    rebalances: {
        compared: number;
        rows: RebalanceDelta[];
        remainderCount: number;
    } | null;
    /** Per-variation deltas of the grid's selection metric, matched by parameters — grids only. */
    variations: {
        matched: number;
        baselineOnly: number;
        candidateOnly: number;
        rows: VariationDelta[];
        remainderCount: number;
        best: {
            baseline: number | null;
            candidate: number | null;
            moved: boolean;
        };
    } | null;
    hygiene: {
        baseline: string | null;
        candidate: string | null;
        changed: boolean;
    } | null;
    /** The structural diff of the two stored runs through the parity walk. */
    run: {
        differenceCount: number;
        retainedDifferences: number;
        addedPaths: string[];
        removedPaths: string[];
        truncated: boolean;
    };
    /** Under an explicit tolerance: every metric within it; `null` without one. */
    withinTolerance: boolean | null;
    assumptions: {
        conventionsVersion: string;
        kind: Kind;
        tolerance: ComparisonTolerance | null;
        limits: {
            maximumDifferences: number;
            maximumLeaves: number;
            listedIds: number;
        };
    };
    diagnostics: {
        warnings: QuantWarning[];
    };
}
Fields, parameters & returned members (64)
Name / typeMeaning & unitOptional / default
artifactIds
{ baseline: string | null; candidate: string | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifactIds.baseline
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifactIds.candidate
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions
{ conventionsVersion: string; kind: Kind; tolerance: ComparisonTolerance | null; limits: { maximumDifferences: number; maximumLeaves: number; listedIds: number; }; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.limits
{ listedIds: number; maximumDifferences: number; maximumLeaves: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.limits.listedIds
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.limits.maximumDifferences
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.limits.maximumLeaves
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.tolerance
ComparisonTolerance | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.tolerance.absolute
number
Absolute tolerance in the leaf's own unit; `≥ 0`, finite.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.tolerance.relative
number
Relative tolerance as a fraction of the baseline's magnitude; `≥ 0`, finite.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics
{ warnings: QuantWarning[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
QuantWarning[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings
MembershipSection | null
Final-holding membership (names held at the last rebalance) — single runs only.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.entered
IdListSection

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.entered.count
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.entered.ids
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.entered.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
holdings.exited
IdListSection

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.exited.count
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.exited.ids
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.exited.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
holdings.kept
IdListSection

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.kept.count
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.kept.ids
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
holdings.kept.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
hygiene
{ baseline: string | null; candidate: string | null; changed: boolean; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
hygiene.baseline
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
hygiene.candidate
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
hygiene.changed
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identical
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
metrics
NamedDelta[]
The performance block and the run-level totals, name by name.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
rebalances
{ compared: number; remainderCount: number; rows: RebalanceDelta[]; } | null
Rebalance-by-rebalance turnover and cost deltas over the shared index range, listed up to `listedIds`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
rebalances.compared
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
rebalances.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
rebalances.rows
RebalanceDelta[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
run
{ addedPaths: string[]; differenceCount: number; removedPaths: string[]; retainedDifferences: number; truncated: boolean; }
The structural diff of the two stored runs through the parity walk.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
run.addedPaths
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
run.differenceCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
run.removedPaths
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
run.retainedDifferences
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
run.truncated
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
runHashes
{ baseline: string; candidate: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
runHashes.baseline
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
runHashes.candidate
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
sameConventions
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
sameInputs
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
sameModels
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
sameStrategy
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
sameUniverse
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations
{ baselineOnly: number; best: { baseline: number | null; candidate: number | null; moved: boolean; }; candidateOnly: number; matched: number; remainderCount: number; rows: VariationDelta[]; } | null
Per-variation deltas of the grid's selection metric, matched by parameters — grids only.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.baselineOnly
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.best
{ baseline: number | null; candidate: number | null; moved: boolean; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.best.baseline
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.best.candidate
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.best.moved
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.candidateOnly
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.matched
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
variations.rows
VariationDelta[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
withinTolerance
boolean | null
Under an explicit tolerance: every metric within it; `null` without one.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunIdentity

The FC8 identity list, read from the run's assumptions and the request — never recomputed.

/** The FC8 identity list, read from the run's assumptions and the request — never recomputed. */
export interface BacktestRunIdentity {
    /** The engine's content-addressed run id (the sweep id for a grid). */
    runId: string;
    /** Every child run id, in variation order (grids only). */
    childRunIds: string[] | null;
    universeId: string;
    /** Content hash of the universe history's member rows. */
    universeHistoryHash: string;
    /** The signal as the engine disclosed it (`assumptions.signal`). */
    strategy: Record<string, unknown>;
    recipe: {
        recipeName: string;
        recipeVersion: number;
    } | null;
    pointInTimePolicy: string;
    conventions: {
        conventionsVersion: string;
        sessionInstantConvention: string;
        pricing: string;
    };
    calendar: {
        sessions: number;
        firstMarkTimestampMs: number | null;
        lastMarkTimestampMs: number | null;
    };
    engine: {
        operation: string;
        runVersion: number;
    };
    models: RecordedModels;
    seed: number | null;
    benchmark: boolean;
    annualization: {
        periodsPerYear: number;
        riskFreeRate: number;
    };
    initialCapital: number;
    baseCurrency: string;
    /** The grid's axes (grids only). */
    variations: Array<{
        path: string;
        values: unknown[];
    }> | null;
}
Fields, parameters & returned members (65)
Name / typeMeaning & unitOptional / default
annualization
{ periodsPerYear: number; riskFreeRate: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
annualization.periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
annualization.riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
baseCurrency
string

ISO-4217 currency code
Required / declared member
No @default declared; consult the signature and description.
benchmark
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
calendar
{ sessions: number; firstMarkTimestampMs: number | null; lastMarkTimestampMs: number | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
calendar.firstMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
calendar.lastMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
calendar.sessions
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
childRunIds
string[] | null
Every child run id, in variation order (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
conventions
{ conventionsVersion: string; sessionInstantConvention: string; pricing: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
conventions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
conventions.pricing
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
conventions.sessionInstantConvention
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
engine
{ operation: string; runVersion: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
engine.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
engine.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
initialCapital
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models
RecordedModels

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.commission
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution
ExecutionPolicyDescription | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.ambiguity
import('@insiderfinance/totalfinance/backtest/execution').AmbiguityPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs
{ borrow: string | null; commission: string; latencySessions: number | null; marketImpact: string | null; participation: number | null; slippage: string; spread: string | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs.borrow
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs.commission
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs.latencySessions
number | null

trading sessions
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs.marketImpact
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs.participation
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs.slippage
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.costs.spread
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.fill
{ label: string; version: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.fill.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.fill.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.lockedCrossed
import('@insiderfinance/totalfinance/backtest/execution').LockedCrossedPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.margin
import('@insiderfinance/totalfinance/backtest/execution').MarginPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.margin.buyingPowerMultiplier
number
Gross notional an account may hold per unit of equity (1 = cash account).
decimal fraction / multiple
Required / declared member
No @default declared; consult the signature and description.
models.execution.margin.forcedLiquidation
import('@insiderfinance/totalfinance/backtest/execution').ForcedLiquidationPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.margin.initialMarginRate
number
Fraction of a new position's notional that must be equity at entry.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
models.execution.margin.maintenanceMarginRate
number
Fraction of gross notional that must remain equity after every fold.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
models.execution.observation
'quote' | 'bar' | 'trade' | 'order-book'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.partialFills
import('@insiderfinance/totalfinance/backtest/execution').PartialFillPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.queue
import('@insiderfinance/totalfinance/backtest/execution').QueueModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.realism
'simplified' | 'declared'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.sessions
{ auction: 'ignore' | 'open-close-only' | null; halts: number; priceLimits: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.sessions.auction
'ignore' | 'open-close-only' | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.sessions.halts
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.sessions.priceLimits
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.staleQuotes
import('@insiderfinance/totalfinance/backtest/execution').StaleQuotePolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.staleQuotes.behavior
'reject' | 'fill-at-last'
`reject` refuses the run (`backtest.stale_quote`); `fill-at-last` fills at the stale quote and reports it.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.staleQuotes.maximumAgeMs
number | null
A quote older than this at the decision instant is stale; `null` = never stale.
milliseconds
Required / declared member
No @default declared; consult the signature and description.
models.execution.timeInForce
{ default: import('@insiderfinance/totalfinance/core').TimeInForce; expireAtSessionClose: boolean; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.timeInForce.default
import('@insiderfinance/totalfinance/core').TimeInForce

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.execution.timeInForce.expireAtSessionClose
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
models.slippage
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
pointInTimePolicy
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recipe
{ recipeName: string; recipeVersion: number; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recipe.recipeName
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recipe.recipeVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
runId
string
The engine's content-addressed run id (the sweep id for a grid).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
seed
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
strategy
Record<string, unknown>
The signal as the engine disclosed it (`assumptions.signal`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
universeHistoryHash
string
Content hash of the universe history's member rows.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
universeId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
variations
{ path: string; values: unknown[]; }[] | null
The grid's axes (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunInputs

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface BacktestRunInputs {
    'cross-sectional': CrossSectionalBacktestRequest;
    'cross-sectional-grid': CrossSectionalBacktestGridRequest;
    options: OptionsBacktestConfig;
    portfolio: PortfolioBacktestRequest;
    environment: EnvironmentEpisodeInput;
}
Fields, parameters & returned members (802)

This large namespace is split into complete field pages. No fields are omitted.

Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

BacktestRunKind

The run kinds this subpath records.

/** The run kinds this subpath records. */
export type BacktestRunKind = 'cross-sectional' | 'cross-sectional-grid' | 'options' | 'portfolio' | 'environment';
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunKindDescriptor

The frozen, data-only description of one run kind.

/** The frozen, data-only description of one run kind. */
export interface BacktestRunKindDescriptor {
    kind: BacktestRunKind;
    runVersion: number;
    /** The direct verb the run re-issues on replay. */
    operation: string;
    /** Bulk row sets of the request (dotted paths); each may be embedded or referenced by table handle. */
    inputRowSets: readonly string[];
    /** Bulk row sets of the run (dotted paths under `run.`); each may be embedded or referenced. */
    resultRowSets: readonly string[];
    /** Request fields that, when they carry a caller function, make the run non-replayable. */
    callbackFields: readonly string[];
    /** Request fields recorded by description (execution policy, cost models); replay takes them back as `models`. */
    modelFields: readonly string[];
}
Fields, parameters & returned members (7)
Name / typeMeaning & unitOptional / default
callbackFields
readonly string[]
Request fields that, when they carry a caller function, make the run non-replayable.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
inputRowSets
readonly string[]
Bulk row sets of the request (dotted paths); each may be embedded or referenced by table handle.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
kind
BacktestRunKind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
modelFields
readonly string[]
Request fields recorded by description (execution policy, cost models); replay takes them back as `models`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
operation
string
The direct verb the run re-issues on replay.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
resultRowSets
readonly string[]
Bulk row sets of the run (dotted paths under `run.`); each may be embedded or referenced.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunReplay

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface BacktestRunReplay<Kind extends BacktestRunKind = BacktestRunKind> {
    kind: Kind;
    artifactId: string;
    /** The recomputed report (the same projection as the saved one). */
    recomputed: BacktestRunReport<Kind>;
    runHash: {
        saved: string;
        recomputed: string;
    };
    /** `true` exactly when the recomputed run hash equals the saved one. */
    matches: boolean;
    parity: ArtifactReplayParity;
    assumptions: {
        conventionsVersion: string;
        kind: Kind;
        runVersion: number;
        operation: string;
        libraryVersion: {
            saved: string | null;
            current: string | null;
        };
        referencedRowSets: string[];
        models: {
            execution: 'recorded-default' | 'supplied' | 'none';
            transactionCostModel: 'supplied' | 'none';
        };
    };
    diagnostics: {
        warnings: QuantWarning[];
    };
}
Fields, parameters & returned members (133)
Name / typeMeaning & unitOptional / default
artifactId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions
{ conventionsVersion: string; kind: Kind; runVersion: number; operation: string; libraryVersion: { saved: string | null; current: string | null; }; referencedRowSets: string[]; models: { execution: 'recorded-default' | 'supplied' | 'none'; transactionCostModel: 'supplied' | 'none'; }; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.libraryVersion
{ current: string | null; saved: string | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.libraryVersion.current
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.libraryVersion.saved
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.models
{ execution: 'recorded-default' | 'supplied' | 'none'; transactionCostModel: 'supplied' | 'none'; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.models.execution
'none' | 'supplied' | 'recorded-default'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.models.transactionCostModel
'none' | 'supplied'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.referencedRowSets
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics
{ warnings: QuantWarning[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
QuantWarning[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
matches
boolean
`true` exactly when the recomputed run hash equals the saved one.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity
ArtifactReplayParity

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.addedPaths
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.assumptions
{ conventionsVersion: string; limits: { maximumDifferences: number; maximumLeaves: number; }; comparison: 'canonical JSON bytes'; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.assumptions.comparison
'canonical JSON bytes'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.assumptions.limits
{ maximumDifferences: number; maximumLeaves: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.assumptions.limits.maximumDifferences
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.assumptions.limits.maximumLeaves
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.comparedLeafCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
parity.diagnostics
{ warnings: QuantWarning[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.diagnostics.warnings
QuantWarning[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.differenceCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
parity.differences
import('@insiderfinance/totalfinance/core/artifacts').ValueDifference[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.identical
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.recomputedHash
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.removedPaths
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.savedHash
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
parity.truncated
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed
BacktestRunReport<Kind>
The recomputed report (the same projection as the saved one).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions
{ conventionsVersion: string; kind: Kind; runVersion: number; operation: string; replayable: boolean; nonReplayableField: string | null; inputPolicy: 'embedded' | 'referenced'; embeddedRowLimit: number; modelPolicy: string; projection: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.embeddedRowLimit
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.inputPolicy
'embedded' | 'referenced'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.modelPolicy
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.nonReplayableField
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.projection
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.replayable
boolean
`false` exactly when a caller function participated.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.assumptions.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.diagnostics
{ warnings: QuantWarning[]; embeddedRows: number; referencedRows: number; runWarningCount: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.diagnostics.embeddedRows
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.diagnostics.referencedRows
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.diagnostics.runWarningCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
recomputed.diagnostics.warnings
QuantWarning[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.execution
{ completed: true; }
Reserved (Decision 8): a cooperative checkpoint/resume lands in Stage 7B without changing the format.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.execution.completed
true

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.hygiene
BacktestHygieneBlock | null
The caller's hygiene block (single runs) or the grid's own verdicts (grids), verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.hygiene.backtestOverfitting
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
recomputed.hygiene.deflatedSharpe
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
recomputed.hygiene.researchProtocol
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
recomputed.identity
BacktestRunIdentity

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.annualization
{ periodsPerYear: number; riskFreeRate: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.annualization.periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.annualization.riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.baseCurrency
string

ISO-4217 currency code
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.benchmark
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.calendar
{ firstMarkTimestampMs: number | null; lastMarkTimestampMs: number | null; sessions: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.calendar.firstMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.calendar.lastMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.calendar.sessions
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.childRunIds
string[] | null
Every child run id, in variation order (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.conventions
{ conventionsVersion: string; pricing: string; sessionInstantConvention: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.conventions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.conventions.pricing
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.conventions.sessionInstantConvention
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.engine
{ operation: string; runVersion: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.engine.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.engine.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.initialCapital
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models
RecordedModels

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.commission
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution
ExecutionPolicyDescription | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.ambiguity
import('@insiderfinance/totalfinance/backtest/execution').AmbiguityPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs
{ borrow: string | null; commission: string; latencySessions: number | null; marketImpact: string | null; participation: number | null; slippage: string; spread: string | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs.borrow
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs.commission
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs.latencySessions
number | null

trading sessions
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs.marketImpact
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs.participation
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs.slippage
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.costs.spread
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.fill
{ label: string; version: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.fill.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.fill.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.lockedCrossed
import('@insiderfinance/totalfinance/backtest/execution').LockedCrossedPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.margin
import('@insiderfinance/totalfinance/backtest/execution').MarginPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.margin.buyingPowerMultiplier
number
Gross notional an account may hold per unit of equity (1 = cash account).
decimal fraction / multiple
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.margin.forcedLiquidation
import('@insiderfinance/totalfinance/backtest/execution').ForcedLiquidationPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.margin.initialMarginRate
number
Fraction of a new position's notional that must be equity at entry.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.margin.maintenanceMarginRate
number
Fraction of gross notional that must remain equity after every fold.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.observation
'quote' | 'bar' | 'trade' | 'order-book'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.partialFills
import('@insiderfinance/totalfinance/backtest/execution').PartialFillPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.queue
import('@insiderfinance/totalfinance/backtest/execution').QueueModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.realism
'simplified' | 'declared'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.sessions
{ auction: 'ignore' | 'open-close-only' | null; halts: number; priceLimits: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.sessions.auction
'ignore' | 'open-close-only' | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.sessions.halts
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.sessions.priceLimits
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.staleQuotes
import('@insiderfinance/totalfinance/backtest/execution').StaleQuotePolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.staleQuotes.behavior
'reject' | 'fill-at-last'
`reject` refuses the run (`backtest.stale_quote`); `fill-at-last` fills at the stale quote and reports it.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.staleQuotes.maximumAgeMs
number | null
A quote older than this at the decision instant is stale; `null` = never stale.
milliseconds
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.timeInForce
{ default: import('@insiderfinance/totalfinance/core').TimeInForce; expireAtSessionClose: boolean; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.timeInForce.default
import('@insiderfinance/totalfinance/core').TimeInForce

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.execution.timeInForce.expireAtSessionClose
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.models.slippage
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.pointInTimePolicy
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.recipe
{ recipeName: string; recipeVersion: number; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.recipe.recipeName
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.recipe.recipeVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.runId
string
The engine's content-addressed run id (the sweep id for a grid).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.seed
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.strategy
Record<string, unknown>
The signal as the engine disclosed it (`assumptions.signal`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.universeHistoryHash
string
Content hash of the universe history's member rows.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.universeId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.identity.variations
{ path: string; values: unknown[]; }[] | null
The grid's axes (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.inputs
Record<string, unknown>
The request with bulk row sets embedded or referenced, callbacks omitted, models by description.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.referencedData
Record<string, TableHandle>
Table references for every row set that was not embedded, keyed by label (`dataset.returns`, `run.holdings`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.run
Record<string, unknown>
The verb's result verbatim, with referenced result row sets replaced by their table handles.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.runHash
string
`contentHash` of the stored run (the projection above) — the run's identity.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
recomputed.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
runHash
{ recomputed: string; saved: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
runHash.recomputed
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
runHash.saved
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

BacktestRunReport

The typed report every verb reads and writes — the artifact's `result`, verbatim.

/** The typed report every verb reads and writes — the artifact's `result`, verbatim. */
export type BacktestRunReport<Kind extends BacktestRunKind = BacktestRunKind> = Readonly<Record<string, unknown>> & {
    kind: Kind;
    runVersion: number;
    /** The verb's result verbatim, with referenced result row sets replaced by their table handles. */
    run: Record<string, unknown>;
    /** The request with bulk row sets embedded or referenced, callbacks omitted, models by description. */
    inputs: Record<string, unknown>;
    /** Table references for every row set that was not embedded, keyed by label (`dataset.returns`, `run.holdings`). */
    referencedData: Record<string, TableHandle>;
    /** `contentHash` of the stored run (the projection above) — the run's identity. */
    runHash: string;
    identity: BacktestRunIdentity;
    /** The caller's hygiene block (single runs) or the grid's own verdicts (grids), verbatim. */
    hygiene: BacktestHygieneBlock | null;
    /** Reserved (Decision 8): a cooperative checkpoint/resume lands in Stage 7B without changing the format. */
    execution: {
        completed: true;
    };
    assumptions: {
        conventionsVersion: string;
        kind: Kind;
        runVersion: number;
        operation: string;
        /** `false` exactly when a caller function participated. */
        replayable: boolean;
        nonReplayableField: string | null;
        inputPolicy: 'embedded' | 'referenced';
        embeddedRowLimit: number;
        modelPolicy: string;
        projection: string;
    };
    diagnostics: {
        warnings: QuantWarning[];
        embeddedRows: number;
        referencedRows: number;
        runWarningCount: number;
    };
};
Fields, parameters & returned members (94)
Name / typeMeaning & unitOptional / default
assumptions
{ conventionsVersion: string; kind: Kind; runVersion: number; operation: string; replayable: boolean; nonReplayableField: string | null; inputPolicy: 'embedded' | 'referenced'; embeddedRowLimit: number; modelPolicy: string; projection: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.embeddedRowLimit
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.inputPolicy
'embedded' | 'referenced'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.modelPolicy
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.nonReplayableField
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.projection
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.replayable
boolean
`false` exactly when a caller function participated.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
assumptions.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics
{ embeddedRows: number; referencedRows: number; runWarningCount: number; warnings: QuantWarning[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.embeddedRows
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.referencedRows
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
diagnostics.runWarningCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
diagnostics.warnings
QuantWarning[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
execution
{ completed: true; }
Reserved (Decision 8): a cooperative checkpoint/resume lands in Stage 7B without changing the format.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
execution.completed
true

unitless by name
Required / declared member
No @default declared; consult the signature and description.
hygiene
BacktestHygieneBlock | null
The caller's hygiene block (single runs) or the grid's own verdicts (grids), verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
hygiene.backtestOverfitting
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
hygiene.deflatedSharpe
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
hygiene.researchProtocol
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
identity
BacktestRunIdentity

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.annualization
{ periodsPerYear: number; riskFreeRate: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.annualization.periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
identity.annualization.riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
identity.baseCurrency
string

ISO-4217 currency code
Required / declared member
No @default declared; consult the signature and description.
identity.benchmark
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.calendar
{ firstMarkTimestampMs: number | null; lastMarkTimestampMs: number | null; sessions: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.calendar.firstMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
identity.calendar.lastMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
identity.calendar.sessions
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.childRunIds
string[] | null
Every child run id, in variation order (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.conventions
{ conventionsVersion: string; pricing: string; sessionInstantConvention: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.conventions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.conventions.pricing
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.conventions.sessionInstantConvention
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.engine
{ operation: string; runVersion: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.engine.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.engine.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.initialCapital
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models
RecordedModels

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.commission
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution
ExecutionPolicyDescription | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.ambiguity
import('@insiderfinance/totalfinance/backtest/execution').AmbiguityPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs
{ borrow: string | null; commission: string; latencySessions: number | null; marketImpact: string | null; participation: number | null; slippage: string; spread: string | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs.borrow
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs.commission
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs.latencySessions
number | null

trading sessions
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs.marketImpact
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs.participation
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs.slippage
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.costs.spread
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.fill
{ label: string; version: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.fill.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.fill.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.lockedCrossed
import('@insiderfinance/totalfinance/backtest/execution').LockedCrossedPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.margin
import('@insiderfinance/totalfinance/backtest/execution').MarginPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.margin.buyingPowerMultiplier
number
Gross notional an account may hold per unit of equity (1 = cash account).
decimal fraction / multiple
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.margin.forcedLiquidation
import('@insiderfinance/totalfinance/backtest/execution').ForcedLiquidationPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.margin.initialMarginRate
number
Fraction of a new position's notional that must be equity at entry.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.margin.maintenanceMarginRate
number
Fraction of gross notional that must remain equity after every fold.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.observation
'quote' | 'bar' | 'trade' | 'order-book'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.partialFills
import('@insiderfinance/totalfinance/backtest/execution').PartialFillPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.queue
import('@insiderfinance/totalfinance/backtest/execution').QueueModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.realism
'simplified' | 'declared'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.sessions
{ auction: 'ignore' | 'open-close-only' | null; halts: number; priceLimits: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.sessions.auction
'ignore' | 'open-close-only' | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.sessions.halts
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.sessions.priceLimits
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.staleQuotes
import('@insiderfinance/totalfinance/backtest/execution').StaleQuotePolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.staleQuotes.behavior
'reject' | 'fill-at-last'
`reject` refuses the run (`backtest.stale_quote`); `fill-at-last` fills at the stale quote and reports it.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.staleQuotes.maximumAgeMs
number | null
A quote older than this at the decision instant is stale; `null` = never stale.
milliseconds
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.timeInForce
{ default: import('@insiderfinance/totalfinance/core').TimeInForce; expireAtSessionClose: boolean; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.timeInForce.default
import('@insiderfinance/totalfinance/core').TimeInForce

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.execution.timeInForce.expireAtSessionClose
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.models.slippage
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.pointInTimePolicy
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.recipe
{ recipeName: string; recipeVersion: number; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.recipe.recipeName
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.recipe.recipeVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.runId
string
The engine's content-addressed run id (the sweep id for a grid).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.seed
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.strategy
Record<string, unknown>
The signal as the engine disclosed it (`assumptions.signal`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.universeHistoryHash
string
Content hash of the universe history's member rows.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.universeId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
identity.variations
{ path: string; values: unknown[]; }[] | null
The grid's axes (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
inputs
Record<string, unknown>
The request with bulk row sets embedded or referenced, callbacks omitted, models by description.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
referencedData
Record<string, TableHandle>
Table references for every row set that was not embedded, keyed by label (`dataset.returns`, `run.holdings`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
run
Record<string, unknown>
The verb's result verbatim, with referenced result row sets replaced by their table handles.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
runHash
string
`contentHash` of the stored run (the projection above) — the run's identity.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

BacktestRunResults

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface BacktestRunResults {
    'cross-sectional': CrossSectionalBacktestResult;
    'cross-sectional-grid': CrossSectionalBacktestGridResult;
    options: OptionsBacktestResult;
    portfolio: PortfolioBacktestResult;
    environment: EnvironmentEpisodeResult;
}
Fields, parameters & returned members (909)

This large namespace is split into complete field pages. No fields are omitted.

Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

IdListSection

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface IdListSection {
    count: number;
    ids: string[];
    remainderCount: number;
}
Fields, parameters & returned members (3)
Name / typeMeaning & unitOptional / default
count
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
ids
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

type

InputOf

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export type InputOf<K extends BacktestRunKind> = BacktestRunInputs[K];
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

MembershipSection

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface MembershipSection {
    entered: IdListSection;
    exited: IdListSection;
    kept: IdListSection;
}
Fields, parameters & returned members (12)
Name / typeMeaning & unitOptional / default
entered
IdListSection

unitless by name
Required / declared member
No @default declared; consult the signature and description.
entered.count
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
entered.ids
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
entered.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
exited
IdListSection

unitless by name
Required / declared member
No @default declared; consult the signature and description.
exited.count
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
exited.ids
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
exited.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
kept
IdListSection

unitless by name
Required / declared member
No @default declared; consult the signature and description.
kept.count
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
kept.ids
string[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
kept.remainderCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

NamedDelta

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface NamedDelta {
    name: string;
    baselineValue: number | null;
    candidateValue: number | null;
    absoluteDelta: number | null;
    /** Under an explicit tolerance: whether the delta is within it; `null` without one. */
    withinTolerance: boolean | null;
}
Fields, parameters & returned members (5)
Name / typeMeaning & unitOptional / default
absoluteDelta
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
baselineValue
number | null

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
candidateValue
number | null

currency amount (the field or record currency)
Required / declared member
No @default declared; consult the signature and description.
name
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
withinTolerance
boolean | null
Under an explicit tolerance: whether the delta is within it; `null` without one.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.

interface

ReadBacktestRunResult

Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.

export interface ReadBacktestRunResult<Kind extends BacktestRunKind = BacktestRunKind> {
    report: BacktestRunReport<Kind>;
    artifact: AnalysisArtifact;
    migrationsApplied: AppliedMigration[];
    modelMigrationsApplied: AppliedMigration[];
    /** Labels whose referenced rows were supplied, verified by hash, and restored into `report`. */
    restoredRowSets: string[];
}
Fields, parameters & returned members (122)
Name / typeMeaning & unitOptional / default
artifact
AnalysisArtifact

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.artifactType
string
Dot-namespaced artifact type, e.g. `'options.chain-analysis'` — names the result schema.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.conventionsVersion
string
The library conventions revision the artifact was CREATED under — stamped from core's `CONVENTIONS_VERSION` (the market snapshot's law, one law), never an echo of the result and never caller-set. Covered by the id; validated as a non-empty string on read.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.createdFrom
string[]
Parent artifact ids this one was derived from, oldest first.
unitless by name
Optional
No @default declared; consult the signature and description.
artifact.id
string
Content hash of the body (everything but `id` and `provenance`) — stamped at creation.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.inputs
import('@insiderfinance/totalfinance/core/artifacts').ArtifactInputs

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.inputs.inputsHash
string
Hash of everything replay needs: `{ snapshotHash, parameters }` — stamped, not caller-set, and RECOMPUTED from the stored fields on every validation pass (create and read), so a tampered hash or tampered inputs are refused even when the outer id was re-minted to match.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.inputs.parameters
unknown
The small, JSON-safe call parameters, embedded verbatim. Reference big inputs via tables.
unitless by name
Optional
No @default declared; consult the signature and description.
artifact.inputs.snapshotHash
string
`marketSnapshotContentHash(...)` of the snapshot the analysis read, when one was used.
unitless by name
Optional
No @default declared; consult the signature and description.
artifact.kind
'totalfinance.analysis-artifact'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.producedBy
import('@insiderfinance/totalfinance/core/artifacts').ArtifactProducedBy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.producedBy.libraryVersion
string
The TotalFinance version that produced it, when the caller knows it (e.g. from package.json).
unitless by name
Optional
No @default declared; consult the signature and description.
artifact.producedBy.operation
string
The public operation name, e.g. `'analyzeChain'` or `'options.blackScholes.explain'`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.provenance
Provenance
Data lineage, caller-supplied, outside the id (labels are not identity).
unitless by name
Optional
No @default declared; consult the signature and description.
artifact.provenance.asOf
number

an instant: epoch milliseconds or a YYYY-MM-DD / zoned ISO string (the resolveAsOf convention)
Optional
No @default declared; consult the signature and description.
artifact.provenance.dataset
string

unitless by name
Optional
No @default declared; consult the signature and description.
artifact.provenance.provider
string

unitless by name
Optional
No @default declared; consult the signature and description.
artifact.provenance.receivedAt
number

unitless by name
Optional
No @default declared; consult the signature and description.
artifact.provenance.requestId
string

unitless by name
Optional
No @default declared; consult the signature and description.
artifact.provenance.sourceVersion
string

unitless by name
Optional
No @default declared; consult the signature and description.
artifact.provenance.warnings
QuantWarning[]

unitless by name
Optional
No @default declared; consult the signature and description.
artifact.result
Record<string, unknown>
The producing call's return value, verbatim: `{ …, assumptions, diagnostics }`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.schemaVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
artifact.tables
Record<string, TableHandle>
Named large-table references — rows live where storage puts them, identity lives here.
unitless by name
Optional
No @default declared; consult the signature and description.
migrationsApplied
AppliedMigration[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
modelMigrationsApplied
AppliedMigration[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report
BacktestRunReport<Kind>

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions
{ conventionsVersion: string; embeddedRowLimit: number; inputPolicy: 'embedded' | 'referenced'; kind: Kind; modelPolicy: string; nonReplayableField: string | null; operation: string; projection: string; replayable: boolean; runVersion: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.embeddedRowLimit
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.inputPolicy
'embedded' | 'referenced'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.modelPolicy
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.nonReplayableField
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.projection
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.replayable
boolean
`false` exactly when a caller function participated.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.assumptions.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.diagnostics
{ embeddedRows: number; referencedRows: number; runWarningCount: number; warnings: QuantWarning[]; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.diagnostics.embeddedRows
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.diagnostics.referencedRows
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.diagnostics.runWarningCount
number

count (integer)
Required / declared member
No @default declared; consult the signature and description.
report.diagnostics.warnings
QuantWarning[]

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.execution
{ completed: true; }
Reserved (Decision 8): a cooperative checkpoint/resume lands in Stage 7B without changing the format.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.execution.completed
true

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.hygiene
BacktestHygieneBlock | null
The caller's hygiene block (single runs) or the grid's own verdicts (grids), verbatim.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.hygiene.backtestOverfitting
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
report.hygiene.deflatedSharpe
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
report.hygiene.researchProtocol
Record<string, unknown>

unitless by name
Optional
No @default declared; consult the signature and description.
report.identity
BacktestRunIdentity

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.annualization
{ periodsPerYear: number; riskFreeRate: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.annualization.periodsPerYear
number

per year (count)
Required / declared member
No @default declared; consult the signature and description.
report.identity.annualization.riskFreeRate
number

decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
report.identity.baseCurrency
string

ISO-4217 currency code
Required / declared member
No @default declared; consult the signature and description.
report.identity.benchmark
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.calendar
{ firstMarkTimestampMs: number | null; lastMarkTimestampMs: number | null; sessions: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.calendar.firstMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
report.identity.calendar.lastMarkTimestampMs
number | null

epoch milliseconds (UTC instant)
Required / declared member
No @default declared; consult the signature and description.
report.identity.calendar.sessions
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.childRunIds
string[] | null
Every child run id, in variation order (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.conventions
{ conventionsVersion: string; pricing: string; sessionInstantConvention: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.conventions.conventionsVersion
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.conventions.pricing
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.conventions.sessionInstantConvention
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.engine
{ operation: string; runVersion: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.engine.operation
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.engine.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.initialCapital
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models
RecordedModels

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.commission
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution
ExecutionPolicyDescription | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.ambiguity
import('@insiderfinance/totalfinance/backtest/execution').AmbiguityPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs
{ borrow: string | null; commission: string; latencySessions: number | null; marketImpact: string | null; participation: number | null; slippage: string; spread: string | null; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs.borrow
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs.commission
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs.latencySessions
number | null

trading sessions
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs.marketImpact
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs.participation
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs.slippage
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.costs.spread
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.fill
{ label: string; version: string; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.fill.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.fill.version
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.label
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.lockedCrossed
import('@insiderfinance/totalfinance/backtest/execution').LockedCrossedPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.margin
import('@insiderfinance/totalfinance/backtest/execution').MarginPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.margin.buyingPowerMultiplier
number
Gross notional an account may hold per unit of equity (1 = cash account).
decimal fraction / multiple
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.margin.forcedLiquidation
import('@insiderfinance/totalfinance/backtest/execution').ForcedLiquidationPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.margin.initialMarginRate
number
Fraction of a new position's notional that must be equity at entry.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.margin.maintenanceMarginRate
number
Fraction of gross notional that must remain equity after every fold.
decimal rate (0.05 = 5%)
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.observation
'quote' | 'bar' | 'trade' | 'order-book'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.partialFills
import('@insiderfinance/totalfinance/backtest/execution').PartialFillPolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.queue
import('@insiderfinance/totalfinance/backtest/execution').QueueModel

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.realism
'simplified' | 'declared'

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.sessions
{ auction: 'ignore' | 'open-close-only' | null; halts: number; priceLimits: number; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.sessions.auction
'ignore' | 'open-close-only' | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.sessions.halts
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.sessions.priceLimits
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.staleQuotes
import('@insiderfinance/totalfinance/backtest/execution').StaleQuotePolicy

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.staleQuotes.behavior
'reject' | 'fill-at-last'
`reject` refuses the run (`backtest.stale_quote`); `fill-at-last` fills at the stale quote and reports it.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.staleQuotes.maximumAgeMs
number | null
A quote older than this at the decision instant is stale; `null` = never stale.
milliseconds
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.timeInForce
{ default: import('@insiderfinance/totalfinance/core').TimeInForce; expireAtSessionClose: boolean; }

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.timeInForce.default
import('@insiderfinance/totalfinance/core').TimeInForce

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.execution.timeInForce.expireAtSessionClose
boolean

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.models.slippage
string | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.pointInTimePolicy
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.recipe
{ recipeName: string; recipeVersion: number; } | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.recipe.recipeName
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.recipe.recipeVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.runId
string
The engine's content-addressed run id (the sweep id for a grid).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.seed
number | null

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.strategy
Record<string, unknown>
The signal as the engine disclosed it (`assumptions.signal`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.universeHistoryHash
string
Content hash of the universe history's member rows.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.universeId
string

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.identity.variations
{ path: string; values: unknown[]; }[] | null
The grid's axes (grids only).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.inputs
Record<string, unknown>
The request with bulk row sets embedded or referenced, callbacks omitted, models by description.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.kind
Kind

unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.referencedData
Record<string, TableHandle>
Table references for every row set that was not embedded, keyed by label (`dataset.returns`, `run.holdings`).
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.run
Record<string, unknown>
The verb's result verbatim, with referenced result row sets replaced by their table handles.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.runHash
string
`contentHash` of the stored run (the projection above) — the run's identity.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
report.runVersion
number

unitless by name
Required / declared member
No @default declared; consult the signature and description.
restoredRowSets
string[]
Labels whose referenced rows were supplied, verified by hash, and restored into `report`.
unitless by name
Required / declared member
No @default declared; consult the signature and description.
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)

Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.