Skip to content

Reports

Read-only projections for terminal, JSON and portable HTML reports.

almanak.reports

Read-only projections for terminal, JSON and portable HTML reports.

string_amount

string_amount(delta)

Base-unit amounts serialize as decimal strings; JSON numbers cannot hold them exactly.

simulation_activity

simulation_activity(wire)

Project completed intents and liquidation events into one chronological list.

Rows sort by effective simulation time, ascending: eligible_at for completed intents and the recorded event time for liquidations. Completed intents precede events recorded at equal times (stable sort over intents-first input).

liquidation_effects

liquidation_effects(event)

Liquidation facts of a recorded event; input-only events carry none.

simulation_series

simulation_series(wire, manifest=None)

Replay retained effects into a per-step portfolio series in token units.

The initial point carries the manifest's frozen initial portfolio at the window start. Each completed intent adds a step point after its effects apply; connector event effects (for example liquidations) fold into the running state without their own points, and events precede intents recorded at equal times, matching engine application order. The final point carries the checkpoint portfolio at the checkpoint time. Replay self-checks against that final portfolio: schema drift or unknown shapes mark the series complete: false instead of failing. Zero-amount wallet entries are kept, since they mark exited assets. Wallet amounts serialize as decimal strings; JSON numbers cannot hold base units exactly. Position payloads pass through verbatim; no revaluation happens here.

initial_portfolio

initial_portfolio(manifest)

Initial portfolio from the manifest's frozen initial state.

Falls back to the funds inventory (the same mapping Fund.inventory applies) when the initial state does not carry a portfolio; positions then start empty. Returns None when neither source is retained.

series_identity

series_identity(key)

Stable identity for a wallet asset or position key: its full sorted JSON.

replay_steps

replay_steps(wire)

(time, pending, effects) steps in engine application order.

Events rank before completed intents at equal times because the engine applies every event up to an intent's eligibility before executing it.

apply_effects

apply_effects(wallets, positions, effects)

Apply one transition's effects; True when the retained shape drifts.

portfolio_differs

portfolio_differs(wallets, positions, portfolio)

Self-check: replayed state against the checkpoint's final portfolio.

support_filters

support_filters(connector=None, chain=None)

Validate the --connector and --chain filters as canonical identities.

gas_lifecycle

gas_lifecycle(binding) -> dict

The connector's per-kind entry and exit transaction counts, from its funding table.

run_dashboard

run_dashboard(root, workspace=None)

The strategy's own dashboard for a run, as its deployment would draw it. A fork test ends by winding everything down, so it is drawn from the last input taken while the strategy ran (dashboard/running.json) when the run kept one, else from the checkpoint.

With workspace, the workspace's current strategy and dashboard.py draw over the run's data instead of the source the run captured: an edited dashboard is seen without a new run.