Skip to contents

Joins the durable decision trace, execution diagnostics, completion evidence, and the availability plane reconstructed from sealed facts. Strategy code is never executed. Runs without a retained decision trace fail explicitly.

Usage

ledgr_run_explain(bt, instrument_id, ts_utc)

Arguments

bt

A ledgr_backtest object.

instrument_id

One stable instrument identifier.

ts_utc

One decision timestamp coercible to POSIXct UTC.

Value

A one-row tibble with:

  • identifiers: run_id, ts_utc, and instrument_id;

  • availability: member, held, target_restricted, target_restriction_reason, and target_restriction_reasons;

  • decision evidence: feature_identity_json, quantity, target_before_risk, and target_after_risk;

  • execution evidence: execution_outcome, execution_reason, execution_reasons, and resulting_position;

  • valuation evidence: mark_source and mark_age; and

  • terminal evidence: completion_status and complete_performance.

When no execution diagnostic exists for an unchanged target, execution_outcome is "no_action" and the two execution-reason fields are "no_target_change". These are explain-time values, not durable diagnostic reason codes.

Articles

Point-in-time universe workflow: vignette("survivorship-bias", package = "ledgr") system.file("doc", "survivorship-bias.html", package = "ledgr")