diff --git a/SPEC.md b/SPEC.md index e644a7e83b..f74d7ac25f 100644 --- a/SPEC.md +++ b/SPEC.md @@ -1845,6 +1845,34 @@ Every fifth cycle the task publishes `rebalances` over the last 30 days: window. A collector that fails or takes longer than 30 seconds keeps its last family. +Every 5 minutes a task publishes the `liq_pnl_*` series of six windows, each +labelled `window`: `1d`, `1w`, `1m`, `ytd`, `1y` and `all`. Each window is one +`GET /pnl` report built by the same code path as the endpoint, with its own +ledger catch-up first. Every window ends on the last day with fills +(`availableRange.lastDate`); the starts are that day, 6 days, 30 days and 364 +days before it, January 1 of its year, and the first day with fills, and no +start is before the first day with fills. The windows run one at a time inside a +120-second budget, `1w` first. The task has its own report admission of one, so +it never takes one of the two live `/pnl` permits. + +- Each window is its own family (`collector="pnl_"`). A window whose + report fails, times out, or does not fit the budget keeps its last samples, + and its collector time stops advancing. The exporter dropped such a window + until its next cycle; this is a deliberate difference. +- Summary, cost, capital, per-symbol and sample series copy `/pnl`'s fields. A + decimal that does not parse, and a capital figure that is not computed, leave + their series absent. Per-symbol rows whose symbols strip to the same label + (`tAAPL` and `wtAAPL`) are all left out, with an error log, rather than one + replacing the other; the exporter wrote both lines. +- `liq_pnl_day_*{day}` come from the report's day buckets. A day sums its + symbols after the prefix rule, so `tAAPL` and `wtAAPL` add up. The running + totals run over every bucket, and only the last 90 buckets are published, so + the last bucket's running total equals the window total. A symbol stays in the + running totals after its last day. A day component that does not parse leaves + out the day value it adds up and every later running total that includes it, + and logs an error. The exporter counted such a component as 0 (a deliberate + difference: a 0 would read as a real day). + **Exception to financial-integrity rules.** Some ported series reproduce the exporter's published sentinels: a ratio with a zero denominator is published as 0, and a missing balance component counts as 0. These follow the exporter's diff --git a/docs/observability.md b/docs/observability.md index cf8f096627..586aa0d515 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -154,75 +154,104 @@ sample time, so only `outcome="paused"` shows that stall. ### Catalog -| Name | Labels | Family | Published | -| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------- | -| `liq_bot_info` | `git_commit` | `health` | `1`; first 12 characters of the build commit (`dev` in local builds) | -| `liq_bot_start_timestamp_seconds` | | `health` | Unix time the process started | -| `liq_settings_info` | `broker`, `log_level`, `orderbook`, `server_port`, `trading_mode`, `turnkey_organization`, `wallet_address`, `wallet_kind` | `settings` | `1`; a missing wallet or organization gives `""`, port 0 gives `""`, `trading_mode` is always `""` | -| `liq_settings_equity_target` | | `settings` | primary chain default target share; absent with only per-symbol targets | -| `liq_settings_equity_deviation` | | `settings` | always | -| `liq_settings_usdc_target` | | `settings` | the one active corridor's target (the primary chain's with several); absent without one | -| `liq_settings_usdc_deviation` | | `settings` | as above | -| `liq_settings_cash_reserved` | | `settings` | absent when not configured | -| `liq_settings_execution_threshold_usd` | | `settings` | dollar threshold; absent for a share-count threshold | -| `liq_settings_order_polling_seconds` | | `settings` | always | -| `liq_settings_inventory_poll_seconds` | | `settings` | always | -| `liq_settings_deployment_block` | | `settings` | always | -| `liq_asset_counter_trading` | `symbol` | `settings` | `1` or `0`, every symbol the primary chain lists | -| `liq_asset_extended_hours` | `symbol` | `settings` | `1` or `0`; absent while counter trading is disabled | -| `liq_asset_rebalancing` | `symbol` | `settings` | `1` when the symbol starts new rebalancing operations | -| `liq_usdc_corridor_target` | `chain` | `settings` | every configured USDC corridor, whatever the USDC mode | -| `liq_usdc_corridor_deviation` | `chain` | `settings` | as above | -| `liq_equity_onchain_available` | `symbol` | `inventory` | primary chain vault | -| `liq_equity_offchain_available` | `symbol` | `inventory` | broker | -| `liq_equity_inflight_total` | `symbol` | `inventory` | primary chain vault plus broker in flight | -| `liq_equity_total` | `symbol` | `inventory` | onchain plus offchain plus in flight; excludes wallet tokens and other chains | -| `liq_equity_unwrapped` | `symbol` | `inventory` | Base wallet unwrapped tokens | -| `liq_equity_wrapped` | `symbol` | `inventory` | Base wallet wrapped tokens | -| `liq_equity_ratio` | `symbol` | `inventory` | onchain over onchain plus offchain; `0` when both are 0 | -| `liq_equity_chain_available` | `chain`, `symbol` | `inventory` | each chain vault a snapshot read, in its wrapped shares: never sum across chains or with broker | -| `liq_usdc_onchain_available` | | `inventory` | primary chain vault | -| `liq_usdc_onchain_inflight` | | `inventory` | primary chain vault in flight | -| `liq_usdc_offchain_available` | | `inventory` | broker cash after the reserve | -| `liq_usdc_offchain_gross` | | `inventory` | broker cash before the reserve; absent until read | -| `liq_usdc_offchain_inflight` | | `inventory` | broker cash in flight | -| `liq_usdc_alpaca_usdc` | | `inventory` | USDC token in the broker account; absent until read | -| `liq_usdc_alpaca_total` | | `inventory` | gross broker cash, or available broker cash until the gross is read | -| `liq_usdc_inflight_total` | | `inventory` | vault plus broker in flight | -| `liq_usdc_inflight_ethereum_wallet` | | `inventory` | absent until read | -| `liq_usdc_inflight_base_wallet` | | `inventory` | absent until read | -| `liq_usdc_total` | | `inventory` | vault plus broker total plus in flight | -| `liq_usdc_ratio` | | `inventory` | vault over vault plus broker total; `0` when both are 0 | -| `liq_usdc_rebalanceable` | | `inventory` | withdrawable minus the reserve, never below 0; absent until withdrawable is read | -| `liq_usdc_chain_available` | `chain` | `inventory` | each hedged chain vault a snapshot has read | -| `liq_usdc_chain_inflight` | `chain` | `inventory` | as above | -| `liq_usdc_chain_ratio` | `chain` | `inventory` | vault available over itself plus gross broker cash; absent until the gross is read or both are 0 | -| `liq_position_last_price_usd` | `symbol` | `prices` | live price of each symbol with a position; refreshed every 60 s | -| `liq_equity_exposure_usd` | `symbol` | `prices` | net position times that price | -| `liq_hedge_latency_ms` | `quantile`, `stage` | `latencies` | 24 h nearest-rank `p50`, `p90`, `p95`, `p99`, `max`; absent for a stage without samples | -| `liq_hedge_latency_ms_samples` | `stage` | `latencies` | samples behind each stage | -| `liq_open_exposure_fill_count` | `symbol` | `latencies` | fills after the symbol's latest hedge placement | -| `liq_open_exposure_oldest_ts_seconds` | `symbol` | `latencies` | block time of the oldest unhedged fill | -| `liq_reliability_log_count_24h` | `level` | `reliability` | errors and warnings in 24 h; both rows once seeded after a start, 0 without file logging | -| `liq_log_target_count_24h` | `level`, `target` | `reliability` | per target with events in 24 h; one-minute buckets, no entry cap | -| `liq_failure_event_count_24h` | `event_type` | `reliability` | lifecycle failure events in 24 h | -| `liq_job_queue` | `job_type`, `state` | `reliability` | queue counts now, not windowed | -| `liq_block_lag_blocks` | `chain` | `infra` | latest sampled lag of each hedged chain; absent until known | -| `liq_block_lag_sampled_ts_seconds` | `chain` | `infra` | time of that sample | -| `liq_poll_cycles_24h` | `chain` | `infra` | order-fill poll cycles in 24 h | -| `liq_poll_errors_24h` | `chain` | `infra` | failed cycles in 24 h | -| `liq_poll_skipped_ticks_24h` | `chain` | `infra` | dropped poll ticks in 24 h | -| `liq_poll_duration_ms` | `chain`, `quantile` | `infra` | 24 h poll duration; absent with no cycles | -| `liq_dependency_calls_24h` | `dependency`, `operation` | `infra` | external calls in 24 h | -| `liq_dependency_errors_24h` | `dependency`, `operation` | `infra` | failed calls in 24 h | -| `liq_dependency_latency_ms` | `dependency`, `operation`, `quantile` | `infra` | 24 h call latency | -| `liq_rebalance_stage_ms` | `kind`, `quantile`, `stage` | `rebalances` | 30 d completed stage duration; refreshed every 5 min | -| `liq_attestation_last_ms` | `kind` | `rebalances` | latest CCTP attestation in 30 d; absent with none | -| `liq_collector_last_success_ts_seconds` | `collector` | store | Unix time each family was last published | +| Name | Labels | Family | Published | +| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| `liq_bot_info` | `git_commit` | `health` | `1`; first 12 characters of the build commit (`dev` in local builds) | +| `liq_bot_start_timestamp_seconds` | | `health` | Unix time the process started | +| `liq_settings_info` | `broker`, `log_level`, `orderbook`, `server_port`, `trading_mode`, `turnkey_organization`, `wallet_address`, `wallet_kind` | `settings` | `1`; a missing wallet or organization gives `""`, port 0 gives `""`, `trading_mode` is always `""` | +| `liq_settings_equity_target` | | `settings` | primary chain default target share; absent with only per-symbol targets | +| `liq_settings_equity_deviation` | | `settings` | always | +| `liq_settings_usdc_target` | | `settings` | the one active corridor's target (the primary chain's with several); absent without one | +| `liq_settings_usdc_deviation` | | `settings` | as above | +| `liq_settings_cash_reserved` | | `settings` | absent when not configured | +| `liq_settings_execution_threshold_usd` | | `settings` | dollar threshold; absent for a share-count threshold | +| `liq_settings_order_polling_seconds` | | `settings` | always | +| `liq_settings_inventory_poll_seconds` | | `settings` | always | +| `liq_settings_deployment_block` | | `settings` | always | +| `liq_asset_counter_trading` | `symbol` | `settings` | `1` or `0`, every symbol the primary chain lists | +| `liq_asset_extended_hours` | `symbol` | `settings` | `1` or `0`; absent while counter trading is disabled | +| `liq_asset_rebalancing` | `symbol` | `settings` | `1` when the symbol starts new rebalancing operations | +| `liq_usdc_corridor_target` | `chain` | `settings` | every configured USDC corridor, whatever the USDC mode | +| `liq_usdc_corridor_deviation` | `chain` | `settings` | as above | +| `liq_equity_onchain_available` | `symbol` | `inventory` | primary chain vault | +| `liq_equity_offchain_available` | `symbol` | `inventory` | broker | +| `liq_equity_inflight_total` | `symbol` | `inventory` | primary chain vault plus broker in flight | +| `liq_equity_total` | `symbol` | `inventory` | onchain plus offchain plus in flight; excludes wallet tokens and other chains | +| `liq_equity_unwrapped` | `symbol` | `inventory` | Base wallet unwrapped tokens | +| `liq_equity_wrapped` | `symbol` | `inventory` | Base wallet wrapped tokens | +| `liq_equity_ratio` | `symbol` | `inventory` | onchain over onchain plus offchain; `0` when both are 0 | +| `liq_equity_chain_available` | `chain`, `symbol` | `inventory` | each chain vault a snapshot read, in its wrapped shares: never sum across chains or with broker | +| `liq_usdc_onchain_available` | | `inventory` | primary chain vault | +| `liq_usdc_onchain_inflight` | | `inventory` | primary chain vault in flight | +| `liq_usdc_offchain_available` | | `inventory` | broker cash after the reserve | +| `liq_usdc_offchain_gross` | | `inventory` | broker cash before the reserve; absent until read | +| `liq_usdc_offchain_inflight` | | `inventory` | broker cash in flight | +| `liq_usdc_alpaca_usdc` | | `inventory` | USDC token in the broker account; absent until read | +| `liq_usdc_alpaca_total` | | `inventory` | gross broker cash, or available broker cash until the gross is read | +| `liq_usdc_inflight_total` | | `inventory` | vault plus broker in flight | +| `liq_usdc_inflight_ethereum_wallet` | | `inventory` | absent until read | +| `liq_usdc_inflight_base_wallet` | | `inventory` | absent until read | +| `liq_usdc_total` | | `inventory` | vault plus broker total plus in flight | +| `liq_usdc_ratio` | | `inventory` | vault over vault plus broker total; `0` when both are 0 | +| `liq_usdc_rebalanceable` | | `inventory` | withdrawable minus the reserve, never below 0; absent until withdrawable is read | +| `liq_usdc_chain_available` | `chain` | `inventory` | each hedged chain vault a snapshot has read | +| `liq_usdc_chain_inflight` | `chain` | `inventory` | as above | +| `liq_usdc_chain_ratio` | `chain` | `inventory` | vault available over itself plus gross broker cash; absent until the gross is read or both are 0 | +| `liq_position_last_price_usd` | `symbol` | `prices` | live price of each symbol with a position; refreshed every 60 s | +| `liq_equity_exposure_usd` | `symbol` | `prices` | net position times that price | +| `liq_hedge_latency_ms` | `quantile`, `stage` | `latencies` | 24 h nearest-rank `p50`, `p90`, `p95`, `p99`, `max`; absent for a stage without samples | +| `liq_hedge_latency_ms_samples` | `stage` | `latencies` | samples behind each stage | +| `liq_open_exposure_fill_count` | `symbol` | `latencies` | fills after the symbol's latest hedge placement | +| `liq_open_exposure_oldest_ts_seconds` | `symbol` | `latencies` | block time of the oldest unhedged fill | +| `liq_reliability_log_count_24h` | `level` | `reliability` | errors and warnings in 24 h; both rows once seeded after a start, 0 without file logging | +| `liq_log_target_count_24h` | `level`, `target` | `reliability` | per target with events in 24 h; one-minute buckets, no entry cap | +| `liq_failure_event_count_24h` | `event_type` | `reliability` | lifecycle failure events in 24 h | +| `liq_job_queue` | `job_type`, `state` | `reliability` | queue counts now, not windowed | +| `liq_block_lag_blocks` | `chain` | `infra` | latest sampled lag of each hedged chain; absent until known | +| `liq_block_lag_sampled_ts_seconds` | `chain` | `infra` | time of that sample | +| `liq_poll_cycles_24h` | `chain` | `infra` | order-fill poll cycles in 24 h | +| `liq_poll_errors_24h` | `chain` | `infra` | failed cycles in 24 h | +| `liq_poll_skipped_ticks_24h` | `chain` | `infra` | dropped poll ticks in 24 h | +| `liq_poll_duration_ms` | `chain`, `quantile` | `infra` | 24 h poll duration; absent with no cycles | +| `liq_dependency_calls_24h` | `dependency`, `operation` | `infra` | external calls in 24 h | +| `liq_dependency_errors_24h` | `dependency`, `operation` | `infra` | failed calls in 24 h | +| `liq_dependency_latency_ms` | `dependency`, `operation`, `quantile` | `infra` | 24 h call latency | +| `liq_rebalance_stage_ms` | `kind`, `quantile`, `stage` | `rebalances` | 30 d completed stage duration; refreshed every 5 min | +| `liq_attestation_last_ms` | `kind` | `rebalances` | latest CCTP attestation in 30 d; absent with none | +| `liq_pnl_summary_usd` | `stream`, `window` | `pnl_` | the 11 summary streams plus `inventory_drift`, `onchain_notional`, `offchain_notional`; absent when the decimal does not parse | +| `liq_pnl_summary_shares` | `kind`, `window` | `pnl_` | `matched`, `inventory_drift`, `open_long`, `open_short`, `unmatched_offchain` | +| `liq_pnl_summary_count` | `kind`, `window` | `pnl_` | `onchain_fill`, `offchain_fill`, `matched_lot`, `open_lot`, `unmatched_offchain_fill` | +| `liq_pnl_cost_usd` | `category`, `window` | `pnl_` | tracked costs by category | +| `liq_pnl_revenue_usd` | `category`, `window` | `pnl_` | `dividend_income` | +| `liq_pnl_cost_entries` | `window` | `pnl_` | cost entries | +| `liq_pnl_cost_missing_observations` | `window` | `pnl_` | missing cost observations | +| `liq_pnl_cost_coverage` | `source`, `status`, `window` | `pnl_` | `1` per cost source | +| `liq_pnl_capital_avg_deployed_usd` | `window` | `pnl_` | absent when not computed | +| `liq_pnl_capital_annualized_return_pct` | `window` | `pnl_` | absent when not computed | +| `liq_pnl_capital_coverage_days` | `window` | `pnl_` | absent when not computed | +| `liq_pnl_capital_sample_days` | `window` | `pnl_` | always | +| `liq_pnl_symbol_usd` | `col`, `symbol`, `window` | `pnl_` | the 11 streams plus `inventory_drift`, per symbol | +| `liq_pnl_symbol_shares` | `kind`, `symbol`, `window` | `pnl_` | `matched`, `inventory_drift`, `open_long`, `open_short` | +| `liq_pnl_symbol_lots` | `symbol`, `window` | `pnl_` | matched lots | +| `liq_pnl_symbol_volume_shares` | `symbol`, `window` | `pnl_` | matched shares times 2 (one per leg); absent when they do not parse | +| `liq_pnl_sample_total_fills` | `window` | `pnl_` | fills | +| `liq_pnl_sample_symbols` | `window` | `pnl_` | symbols with fills | +| `liq_pnl_sample_first_ts_seconds` | `window` | `pnl_` | first fill time; absent without fills | +| `liq_pnl_sample_last_ts_seconds` | `window` | `pnl_` | last fill time; absent without fills | +| `liq_pnl_warnings` | `window` | `pnl_` | warnings in the report | +| `liq_pnl_day_usd` | `day`, `symbol`, `window` | `pnl_` | each day bucket's total per symbol; last 90 buckets; absent when its total does not parse | +| `liq_pnl_day_cum_usd` | `day`, `symbol`, `window` | `pnl_` | running total over every bucket, every symbol seen so far | +| `liq_pnl_day_stream_usd` | `day`, `stream`, `window` | `pnl_` | each day bucket's 4 chart streams; absent, with every later running total, when a component does not parse | +| `liq_pnl_day_cum_stream_usd` | `day`, `stream`, `window` | `pnl_` | running total per chart stream | +| `liq_collector_last_success_ts_seconds` | `collector` | store | Unix time each family was last published | `symbol` labels drop a leading `wt` or `t` only before an uppercase letter (`tAAPL` and `wtAAPL` give `AAPL`; `tsla` stays). +The `liq_pnl_*` rows are published per `window` (`1d`, `1w`, `1m`, `ytd`, `1y`, +`all`) every 5 minutes. A window whose report fails keeps its last samples, and +its `pnl_` collector time stops advancing. + ### Adding a family 1. Spec the names in SPEC.md first. A new meaning gets a new name; an existing diff --git a/scripts/liq-parity/compare.py b/scripts/liq-parity/compare.py index f6a96f9f13..f8aacd230b 100644 --- a/scripts/liq-parity/compare.py +++ b/scripts/liq-parity/compare.py @@ -113,6 +113,36 @@ "liq_attestation_last_ms", } +# Every PnL series: one family per window, `window` label on each. +PNL_NAMES = { + "liq_pnl_summary_usd", + "liq_pnl_summary_shares", + "liq_pnl_summary_count", + "liq_pnl_cost_usd", + "liq_pnl_revenue_usd", + "liq_pnl_cost_entries", + "liq_pnl_cost_missing_observations", + "liq_pnl_cost_coverage", + "liq_pnl_capital_avg_deployed_usd", + "liq_pnl_capital_annualized_return_pct", + "liq_pnl_capital_coverage_days", + "liq_pnl_capital_sample_days", + "liq_pnl_symbol_usd", + "liq_pnl_symbol_shares", + "liq_pnl_symbol_lots", + "liq_pnl_symbol_volume_shares", + "liq_pnl_sample_total_fills", + "liq_pnl_sample_symbols", + "liq_pnl_sample_first_ts_seconds", + "liq_pnl_sample_last_ts_seconds", + "liq_pnl_warnings", + "liq_pnl_day_usd", + "liq_pnl_day_cum_usd", + "liq_pnl_day_stream_usd", + "liq_pnl_day_cum_stream_usd", +} +PORTED |= PNL_NAMES + # Names only the bot publishes. BOT_ONLY = { "liq_collector_last_success_ts_seconds", @@ -177,8 +207,12 @@ # Documented differences. ("absolute", tolerance): values may differ by up to # the tolerance. "values": keys are compared, values are not. "ignore": the -# name is not compared at all. The item that ports a name adds its entry, with -# the evidence for it. +# name is not compared at all. "kept_window": a series of a `window` the +# exporter has no series of at all is not reported as extra in the bot. +# "kept_window_bot_absent": as "kept_window", and a series the exporter has +# and the bot lacks is not reported either, while the bot publishes that name +# for the same window; values are still compared where both have the series. The item that ports a name adds its entry, with the +# evidence for it. KNOWN_DIFFS = { # The exporter derives the start from integer uptime at poll time. "liq_bot_start_timestamp_seconds": ("absolute", 2.0), @@ -219,6 +253,27 @@ "liq_reliability_log_count_24h": "values", "liq_log_target_count_24h": "ignore", } +# A PnL window whose report failed or did not fit the cycle budget keeps its +# last value in the bot, with a stalled liq_collector_last_success_ts_seconds +# {collector="pnl_"}. The exporter drops that window from its pnl +# family until its next cycle (exporter.py collect_pnl: a failed or skipped +# window adds no samples before set_family). A deliberate difference. +KNOWN_DIFFS.update({name: "kept_window" for name in PNL_NAMES}) +# A day component of /pnl that does not parse: the exporter counts it as 0 +# (t0.devops 8dca7be exporter.py pnl_day_samples, `dec(row.get(field)) or +# Decimal(0)` and `dec(row.get("totalPnlUsd")) or Decimal(0)`), so it still +# publishes that day's value and every running total after it. The bot leaves +# those series out and logs an error (src/metrics/liquidity/pnl.rs +# day_component; every_window_matches_the_exporter_golden pins the two series +# the fixture's bad component feeds). So a day series can be missing from the +# bot only. The values both sides publish are still compared. +PNL_DAY_NAMES = { + "liq_pnl_day_usd", + "liq_pnl_day_cum_usd", + "liq_pnl_day_stream_usd", + "liq_pnl_day_cum_stream_usd", +} +KNOWN_DIFFS.update({name: "kept_window_bot_absent" for name in PNL_DAY_NAMES}) # (bot type, exporter type) that --known-diffs accepts for every name. The # bot publishes every liq_* name as a gauge; the exporter is untyped. @@ -364,11 +419,32 @@ def compared(key): exporter = {key: value for key, value in exporter.items() if key[0] not in not_ported} + def window(key): + return dict(key[1]).get("window") + + windowed = {"kept_window", "kept_window_bot_absent"} + exporter_windows = {window(key) for key in exporter + if known.get(key[0]) in windowed} + + def kept_window(key): + return known.get(key[0]) in windowed and window(key) not in exporter_windows + + # A bot_absent name excuses a missing series only while the bot still + # publishes that name for the window: a bad day component leaves out + # single series, so a whole name missing from a window is a finding. + bot_absent_windows = {(key[0], window(key)) for key in bot + if known.get(key[0]) == "kept_window_bot_absent"} + + def excused_absence(key): + return (known.get(key[0]) == "kept_window_bot_absent" + and (key[0], window(key)) in bot_absent_windows) + findings = type_findings(bot_text, exporter_text, dropped, known_diffs) for key in exporter.keys() - bot.keys(): - findings[key] = f"missing from bot: {format_series(key)}" + if not excused_absence(key): + findings[key] = f"missing from bot: {format_series(key)}" for key in bot.keys() - exporter.keys(): - if key[0] not in BOT_ONLY: + if key[0] not in BOT_ONLY and not kept_window(key): findings[key] = f"extra in bot: {format_series(key)}" for key in bot.keys() & exporter.keys(): if values_differ(bot[key], exporter[key], known.get(key[0])): diff --git a/scripts/liq-parity/golden.py b/scripts/liq-parity/golden.py index e965b99c22..90b4d0e3cd 100644 --- a/scripts/liq-parity/golden.py +++ b/scripts/liq-parity/golden.py @@ -78,6 +78,27 @@ def run_rebalance(exporter, fixture): exporter.collect_rebalance_timings("from", "to") +def run_pnl(exporter, fixture): + """Every /pnl call, the range probe and each window, returns the + fixture, so each window publishes the same report under its own + window label.""" + def bot_get(path, params=None, timeout=15): + if path != "/pnl": + raise RuntimeError(f"unexpected bot read {path}") + return fixture + + exporter.bot_get = bot_get + exporter.collect_pnl() + + +def run_pnl_window_all(exporter, fixture): + """One report as the `all` window, through the exporter's two PnL + builders, as collect_pnl combines them.""" + exporter.REGISTRY.set_family( + "pnl", + exporter.pnl_samples(fixture, "all") + exporter.pnl_day_samples(fixture, "all")) + + # case name -> how the fixture reaches the exporter CASES = { "settings": run_state, @@ -88,6 +109,9 @@ def run_rebalance(exporter, fixture): "reliability": run_reliability, "infra": run_infra, "rebalance": run_rebalance, + # PnL windows and day buckets + "pnl": run_pnl, + "pnl-days": run_pnl_window_all, } diff --git a/scripts/liq-parity/test_compare.py b/scripts/liq-parity/test_compare.py index 6e35b00ed2..c9356d7473 100644 --- a/scripts/liq-parity/test_compare.py +++ b/scripts/liq-parity/test_compare.py @@ -41,7 +41,7 @@ def test_reports_missing_extra_and_value_findings_after_drop_list_and_known_diff 'missing from bot: liq_asset_rebalancing{symbol="TSLA"}\n' "value differs: liq_settings_usdc_target bot=0.45 exporter=0.4\n" "not yet ported (exporter-only names, ignored): " - "liq_pending_orders_total, liq_pnl_summary_usd\n" + "liq_future_total, liq_future_usd\n" "3 finding(s)\n" )) @@ -63,8 +63,8 @@ def test_without_known_diffs_the_start_time_jitter_and_the_gauge_types_are_findi "bot=1700000000.0 exporter=1700000001.9\n" "value differs: liq_settings_usdc_target bot=0.45 exporter=0.4\n" "not yet ported (exporter-only names, ignored): " - "liq_asset_flags, liq_equity_ratio_deviation, liq_pending_orders_total, " - "liq_pnl_summary_usd, liq_up\n" + "liq_asset_flags, liq_equity_ratio_deviation, liq_future_total, " + "liq_future_usd, liq_up\n" "10 finding(s)\n" )) @@ -194,6 +194,59 @@ def test_a_mismatch_whose_values_move_between_pairs_is_still_reported(self): "value differs: liq_bot_start_timestamp_seconds bot=100.0 exporter=103.3", ]) + def test_a_pnl_window_only_the_bot_kept_is_not_a_finding(self): + bot = ("liq_bot_info 1\n" + 'liq_pnl_warnings{window="1w"} 2\n' + 'liq_pnl_warnings{window="1d"} 2\n' + 'liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"} 1\n') + exporter = ("liq_bot_info 1\n" + 'liq_pnl_warnings{window="1w"} 2\n') + + findings, _ = compare.compare([(bot, exporter)], True, True) + self.assertEqual(findings, [ + 'extra in bot: liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"}', + ]) + + findings, _ = compare.compare([(bot, exporter)], True, False) + self.assertEqual(findings, [ + 'extra in bot: liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"}', + 'extra in bot: liq_pnl_warnings{window="1d"}', + ]) + + def test_a_pnl_day_series_only_the_exporter_has_is_not_a_finding(self): + bot = ("liq_bot_info 1\n" + 'liq_pnl_warnings{window="1w"} 2\n' + 'liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"} 1\n') + exporter = ("liq_bot_info 1\n" + 'liq_pnl_warnings{window="1w"} 2\n' + 'liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"} 1.5\n' + 'liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="1w"} 0\n' + 'liq_pnl_warnings{window="1d"} 2\n') + + findings, _ = compare.compare([(bot, exporter)], True, True) + self.assertEqual(findings, [ + 'missing from bot: liq_pnl_warnings{window="1d"}', + 'value differs: liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"} ' + "bot=1.0 exporter=1.5", + ]) + + findings, _ = compare.compare([(bot, exporter)], True, False) + self.assertIn( + 'missing from bot: liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="1w"}', + findings) + + def test_a_pnl_day_name_the_bot_drops_for_a_whole_window_is_a_finding(self): + bot = ("liq_bot_info 1\n" + 'liq_pnl_warnings{window="1w"} 2\n') + exporter = ("liq_bot_info 1\n" + 'liq_pnl_warnings{window="1w"} 2\n' + 'liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"} 1\n') + + findings, _ = compare.compare([(bot, exporter)], True, True) + self.assertEqual(findings, [ + 'missing from bot: liq_pnl_day_usd{day="2026-03-02",symbol="AAPL",window="1w"}', + ]) + def test_a_snapshot_without_liq_series_fails_instead_of_passing(self): empty = os.path.join(HERE, "testdata", "empty.prom") err = io.StringIO() @@ -246,14 +299,14 @@ def test_a_legitimately_absent_series_does_not_make_a_snapshot_unusable(self): []) def test_a_bot_name_published_in_one_pair_is_compared_in_every_pair(self): - exporter = "liq_bot_info{git_commit=\"a\"} 1\nliq_pending_orders_total 2\n" + exporter = "liq_bot_info{git_commit=\"a\"} 1\nliq_future_total 2\n" with_name = exporter without_name = "liq_bot_info{git_commit=\"a\"} 1\n" findings, not_ported = compare.compare( [(with_name, exporter), (without_name, exporter)], True, True) - self.assertEqual(findings, ["unlisted bot name: liq_pending_orders_total"]) + self.assertEqual(findings, ["unlisted bot name: liq_future_total"]) self.assertEqual(not_ported, []) def test_a_bot_name_outside_the_lists_is_a_finding(self): diff --git a/scripts/liq-parity/testdata/exporter.prom b/scripts/liq-parity/testdata/exporter.prom index e3eb817c73..cc8ca0ac6f 100644 --- a/scripts/liq-parity/testdata/exporter.prom +++ b/scripts/liq-parity/testdata/exporter.prom @@ -8,5 +8,5 @@ liq_asset_rebalancing{symbol="TSLA"} 0.0 liq_asset_flags{counter_trading="enabled",extended_hours="true",rebalancing="true",symbol="AAPL"} 1.0 liq_equity_total{symbol="AAPL"} 5.0 liq_equity_ratio_deviation{symbol="AAPL"} 0.25 -liq_pnl_summary_usd{stream="total",window="1d"} 5.0 -liq_pending_orders_total 3.0 +liq_future_usd{stream="total",window="1d"} 5.0 +liq_future_total 3.0 diff --git a/src/api.rs b/src/api.rs index c15b68e436..bacce155fd 100644 --- a/src/api.rs +++ b/src/api.rs @@ -4789,6 +4789,7 @@ mod tests { use crate::inventory::{ self, BroadcastingInventory, PortfolioAsset, PortfolioBalanceRow, PortfolioLocation, }; + use crate::metrics::liquidity::pnl_refresh::{LivePnlReports, PnlReports}; use crate::offchain::order::{ OffchainOrder, OffchainOrderEvent, OffchainOrderId, OrderPlacementResult, }; @@ -6133,6 +6134,30 @@ mod tests { assert_eq!(second.summary.matched_lot_count, 2); } + #[tokio::test] + async fn pnl_metrics_reports_run_while_live_requests_hold_every_permit() { + let (state, _broker_mock) = pnl_test_state().await; + let _live_permits = (0..crate::dashboard::pnl::MAX_CONCURRENT_PNL_REPORTS) + .map(|_| acquire_pnl_report_permit(&state.pnl_report_admission).unwrap()) + .collect::>(); + let reports = LivePnlReports::new(&state.ctx, state.pool.clone(), state.pnl_ledger.clone()); + + let report = reports + .report(PnlQuery { + limit: Some(1), + ..PnlQuery::default() + }) + .await + .unwrap(); + assert_eq!(report.summary.matched_lot_count, 0); + + let response = build_app(state) + .oneshot(Request::builder().uri("/pnl").body(Body::empty()).unwrap()) + .await + .unwrap(); + assert_eq!(response.status(), StatusCode::SERVICE_UNAVAILABLE); + } + /// End-to-end `/pnl` coverage for capital/return-on-capital figures: three /// portfolio_snapshot days are captured through the real /// aggregate (`Store::send`, never raw SQL), each `captured_at` built diff --git a/src/dashboard/pnl/mod.rs b/src/dashboard/pnl/mod.rs index f26c293544..5760a2943d 100644 --- a/src/dashboard/pnl/mod.rs +++ b/src/dashboard/pnl/mod.rs @@ -22,7 +22,11 @@ mod tests; pub(crate) use ledger::{LedgerHead, PnlLedger, PnlLedgerReactor}; pub(crate) use query::{PnlError, PnlQuery}; -pub(crate) use response::PnlResponse; +#[cfg(test)] +pub(crate) use response::{ + PnlAvailableRange, PnlCapitalSummary, PnlCostCoverage, PnlCostSummary, PnlSampleStats, +}; +pub(crate) use response::{PnlResponse, PnlSummary, PnlSymbolSummary, PnlWindow, PnlWindowSymbol}; #[cfg(test)] pub(crate) use source::{ MAX_CONCURRENT_PNL_REPORTS, acquire_pnl_report_permit, build_pnl_report, diff --git a/src/lib.rs b/src/lib.rs index 7eb4d9e429..95e6e13248 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -411,11 +411,9 @@ async fn run_bot_session_inner( pool: pools.cqrs.clone(), families: &metrics::liquidity::LIQ_FAMILIES, }, - metrics::liquidity::refresh::LiqPerformanceRefresh::new( - &ctx, - pools.cqrs.clone(), - &metrics::liquidity::LIQ_FAMILIES, - ), + &ctx, + &pools.cqrs, + &pnl_ledger, ); let mut bot_task = tokio::spawn(Box::pin(run_conductor_session( ctx.clone(), @@ -762,8 +760,18 @@ fn spawn_auxiliary_supervisor( equity_price_task: Option>, metrics_handle: PrometheusHandle, liq_state_refresh: metrics::liquidity::refresh::LiqStateRefresh, - liq_performance_refresh: metrics::liquidity::refresh::LiqPerformanceRefresh, + ctx: &Ctx, + pool: &SqlitePool, + pnl_ledger: &Arc, ) -> SupervisorHandle { + let liq_performance_refresh = metrics::liquidity::refresh::LiqPerformanceRefresh::new( + ctx, + pool.clone(), + &metrics::liquidity::LIQ_FAMILIES, + ); + let liq_pnl_refresh = + metrics::liquidity::pnl_refresh::LiqPnlRefresh::live(ctx, pool.clone(), pnl_ledger.clone()); + let builder = non_escalating_supervisor_builder() .with_task( "metrics-recorder-upkeep", @@ -772,7 +780,8 @@ fn spawn_auxiliary_supervisor( }, ) .with_task("liq-state-refresh", liq_state_refresh) - .with_task("liq-performance-refresh", liq_performance_refresh); + .with_task("liq-performance-refresh", liq_performance_refresh) + .with_task("liq-pnl-refresh", liq_pnl_refresh); match equity_price_task { Some(task) => builder.with_task("dashboard-equity-prices", task), diff --git a/src/metrics/liquidity.rs b/src/metrics/liquidity.rs index dc667002cd..c4e8ac08be 100644 --- a/src/metrics/liquidity.rs +++ b/src/metrics/liquidity.rs @@ -27,9 +27,13 @@ use tracing::{debug, error, warn}; use st0x_float_serde::format_float; +use self::pnl::PnlWindowKey; + pub(crate) mod inventory; pub(crate) mod log_counts; pub(crate) mod performance; +pub(crate) mod pnl; +pub(crate) mod pnl_refresh; pub(crate) mod prices; pub(crate) mod refresh; pub(crate) mod settings; @@ -104,6 +108,31 @@ pub(crate) enum LiqMetric { DependencyLatencyMs, RebalanceStageMs, AttestationLastMs, + PnlSummaryUsd, + PnlSummaryShares, + PnlSummaryCount, + PnlCostUsd, + PnlRevenueUsd, + PnlCostEntries, + PnlCostMissingObservations, + PnlCostCoverage, + PnlCapitalAvgDeployedUsd, + PnlCapitalAnnualizedReturnPct, + PnlCapitalCoverageDays, + PnlCapitalSampleDays, + PnlSymbolUsd, + PnlSymbolShares, + PnlSymbolLots, + PnlSymbolVolumeShares, + PnlSampleTotalFills, + PnlSampleSymbols, + PnlSampleFirstTsSeconds, + PnlSampleLastTsSeconds, + PnlWarnings, + PnlDayUsd, + PnlDayCumUsd, + PnlDayStreamUsd, + PnlDayCumStreamUsd, CollectorLastSuccessTsSeconds, } @@ -111,7 +140,7 @@ impl LiqMetric { /// Every variant, for the catalog tests. A new variant needs an entry /// here and its name in the catalog test. #[cfg(test)] - pub(crate) const ALL: [Self; 63] = [ + pub(crate) const ALL: [Self; 88] = [ Self::BotInfo, Self::BotStartTimestampSeconds, Self::SettingsInfo, @@ -174,6 +203,31 @@ impl LiqMetric { Self::DependencyLatencyMs, Self::RebalanceStageMs, Self::AttestationLastMs, + Self::PnlSummaryUsd, + Self::PnlSummaryShares, + Self::PnlSummaryCount, + Self::PnlCostUsd, + Self::PnlRevenueUsd, + Self::PnlCostEntries, + Self::PnlCostMissingObservations, + Self::PnlCostCoverage, + Self::PnlCapitalAvgDeployedUsd, + Self::PnlCapitalAnnualizedReturnPct, + Self::PnlCapitalCoverageDays, + Self::PnlCapitalSampleDays, + Self::PnlSymbolUsd, + Self::PnlSymbolShares, + Self::PnlSymbolLots, + Self::PnlSymbolVolumeShares, + Self::PnlSampleTotalFills, + Self::PnlSampleSymbols, + Self::PnlSampleFirstTsSeconds, + Self::PnlSampleLastTsSeconds, + Self::PnlWarnings, + Self::PnlDayUsd, + Self::PnlDayCumUsd, + Self::PnlDayStreamUsd, + Self::PnlDayCumStreamUsd, Self::CollectorLastSuccessTsSeconds, ]; @@ -241,6 +295,31 @@ impl LiqMetric { Self::DependencyLatencyMs => "liq_dependency_latency_ms", Self::RebalanceStageMs => "liq_rebalance_stage_ms", Self::AttestationLastMs => "liq_attestation_last_ms", + Self::PnlSummaryUsd => "liq_pnl_summary_usd", + Self::PnlSummaryShares => "liq_pnl_summary_shares", + Self::PnlSummaryCount => "liq_pnl_summary_count", + Self::PnlCostUsd => "liq_pnl_cost_usd", + Self::PnlRevenueUsd => "liq_pnl_revenue_usd", + Self::PnlCostEntries => "liq_pnl_cost_entries", + Self::PnlCostMissingObservations => "liq_pnl_cost_missing_observations", + Self::PnlCostCoverage => "liq_pnl_cost_coverage", + Self::PnlCapitalAvgDeployedUsd => "liq_pnl_capital_avg_deployed_usd", + Self::PnlCapitalAnnualizedReturnPct => "liq_pnl_capital_annualized_return_pct", + Self::PnlCapitalCoverageDays => "liq_pnl_capital_coverage_days", + Self::PnlCapitalSampleDays => "liq_pnl_capital_sample_days", + Self::PnlSymbolUsd => "liq_pnl_symbol_usd", + Self::PnlSymbolShares => "liq_pnl_symbol_shares", + Self::PnlSymbolLots => "liq_pnl_symbol_lots", + Self::PnlSymbolVolumeShares => "liq_pnl_symbol_volume_shares", + Self::PnlSampleTotalFills => "liq_pnl_sample_total_fills", + Self::PnlSampleSymbols => "liq_pnl_sample_symbols", + Self::PnlSampleFirstTsSeconds => "liq_pnl_sample_first_ts_seconds", + Self::PnlSampleLastTsSeconds => "liq_pnl_sample_last_ts_seconds", + Self::PnlWarnings => "liq_pnl_warnings", + Self::PnlDayUsd => "liq_pnl_day_usd", + Self::PnlDayCumUsd => "liq_pnl_day_cum_usd", + Self::PnlDayStreamUsd => "liq_pnl_day_stream_usd", + Self::PnlDayCumStreamUsd => "liq_pnl_day_cum_stream_usd", Self::CollectorLastSuccessTsSeconds => "liq_collector_last_success_ts_seconds", } } @@ -384,6 +463,47 @@ impl LiqMetric { Self::AttestationLastMs => { "Duration of the latest CCTP attestation in the last 30 days" } + Self::PnlSummaryUsd => { + "Window PnL in USD by stream; absent when the report's decimal does not parse" + } + Self::PnlSummaryShares => "Window share totals by kind", + Self::PnlSummaryCount => "Window fill and lot counts by kind", + Self::PnlCostUsd => "Window tracked costs in USD by category", + Self::PnlRevenueUsd => "Window tracked revenue in USD by category", + Self::PnlCostEntries => "Cost entries in the window", + Self::PnlCostMissingObservations => "Cost observations missing from the window", + Self::PnlCostCoverage => { + "Always 1; one series per cost source with its coverage status" + } + Self::PnlCapitalAvgDeployedUsd => { + "Average deployed capital in USD; absent when not computed" + } + Self::PnlCapitalAnnualizedReturnPct => { + "Annualized return on capital in percent; absent when not computed" + } + Self::PnlCapitalCoverageDays => { + "Days of the window the capital snapshots cover; absent when not computed" + } + Self::PnlCapitalSampleDays => "Snapshot days sampled for the capital figures", + Self::PnlSymbolUsd => "Per-symbol window PnL in USD by column", + Self::PnlSymbolShares => "Per-symbol window shares by kind", + Self::PnlSymbolLots => "Per-symbol matched lots in the window", + Self::PnlSymbolVolumeShares => "Per-symbol matched shares counted once per leg", + Self::PnlSampleTotalFills => "Fills in the window", + Self::PnlSampleSymbols => "Symbols with fills in the window", + Self::PnlSampleFirstTsSeconds => { + "Unix time of the window's first fill; absent without fills" + } + Self::PnlSampleLastTsSeconds => { + "Unix time of the window's last fill; absent without fills" + } + Self::PnlWarnings => "Warnings the window's report carried", + Self::PnlDayUsd => "Per-symbol PnL in USD of each of the window's last 90 day buckets", + Self::PnlDayCumUsd => "Per-symbol running PnL in USD through each day bucket", + Self::PnlDayStreamUsd => "PnL in USD of each day bucket by chart stream", + Self::PnlDayCumStreamUsd => { + "Running PnL in USD through each day bucket by chart stream" + } Self::CollectorLastSuccessTsSeconds => { "Unix time each liq_ collector last published its family" } @@ -440,6 +560,26 @@ impl LiqMetric { Self::DependencyLatencyMs => &["dependency", "operation", "quantile"], Self::RebalanceStageMs => &["kind", "quantile", "stage"], Self::AttestationLastMs => &["kind"], + Self::PnlSummaryUsd => &["stream", "window"], + Self::PnlSummaryShares | Self::PnlSummaryCount => &["kind", "window"], + Self::PnlCostUsd | Self::PnlRevenueUsd => &["category", "window"], + Self::PnlCostEntries + | Self::PnlCostMissingObservations + | Self::PnlCapitalAvgDeployedUsd + | Self::PnlCapitalAnnualizedReturnPct + | Self::PnlCapitalCoverageDays + | Self::PnlCapitalSampleDays + | Self::PnlSampleTotalFills + | Self::PnlSampleSymbols + | Self::PnlSampleFirstTsSeconds + | Self::PnlSampleLastTsSeconds + | Self::PnlWarnings => &["window"], + Self::PnlCostCoverage => &["source", "status", "window"], + Self::PnlSymbolUsd => &["col", "symbol", "window"], + Self::PnlSymbolShares => &["kind", "symbol", "window"], + Self::PnlSymbolLots | Self::PnlSymbolVolumeShares => &["symbol", "window"], + Self::PnlDayUsd | Self::PnlDayCumUsd => &["day", "symbol", "window"], + Self::PnlDayStreamUsd | Self::PnlDayCumStreamUsd => &["day", "stream", "window"], Self::CollectorLastSuccessTsSeconds => &["collector"], Self::BotStartTimestampSeconds | Self::SettingsEquityTarget @@ -468,7 +608,9 @@ impl LiqMetric { } /// The one family allowed to publish this name. `None` means the store - /// itself writes it during render. + /// itself writes it during render, or the name carries a `window` label + /// and each [`LiqFamily::Pnl`] family publishes its own window (see + /// [`Self::per_pnl_window`]). const fn family(self) -> Option { match self { Self::BotInfo | Self::BotStartTimestampSeconds => Some(LiqFamily::Health), @@ -530,9 +672,40 @@ impl LiqMetric { | Self::DependencyErrors24h | Self::DependencyLatencyMs => Some(LiqFamily::Infra), Self::RebalanceStageMs | Self::AttestationLastMs => Some(LiqFamily::Rebalances), - Self::CollectorLastSuccessTsSeconds => None, + Self::PnlSummaryUsd + | Self::PnlSummaryShares + | Self::PnlSummaryCount + | Self::PnlCostUsd + | Self::PnlRevenueUsd + | Self::PnlCostEntries + | Self::PnlCostMissingObservations + | Self::PnlCostCoverage + | Self::PnlCapitalAvgDeployedUsd + | Self::PnlCapitalAnnualizedReturnPct + | Self::PnlCapitalCoverageDays + | Self::PnlCapitalSampleDays + | Self::PnlSymbolUsd + | Self::PnlSymbolShares + | Self::PnlSymbolLots + | Self::PnlSymbolVolumeShares + | Self::PnlSampleTotalFills + | Self::PnlSampleSymbols + | Self::PnlSampleFirstTsSeconds + | Self::PnlSampleLastTsSeconds + | Self::PnlWarnings + | Self::PnlDayUsd + | Self::PnlDayCumUsd + | Self::PnlDayStreamUsd + | Self::PnlDayCumStreamUsd + | Self::CollectorLastSuccessTsSeconds => None, } } + + /// True for the names every [`LiqFamily::Pnl`] family publishes, each + /// for its own `window` label value. + fn per_pnl_window(self) -> bool { + self.label_keys().contains(&"window") + } } /// The unit of replacement. A refresh replaces all samples of one family. @@ -546,6 +719,9 @@ pub(crate) enum LiqFamily { Reliability, Infra, Rebalances, + /// One PnL window. Each window is replaced on its own, so a window whose + /// report failed keeps its last samples while the others refresh. + Pnl(PnlWindowKey), } impl LiqFamily { @@ -560,6 +736,26 @@ impl LiqFamily { Self::Reliability => "reliability", Self::Infra => "infra", Self::Rebalances => "rebalances", + Self::Pnl(window) => window.collector(), + } + } + + /// Whether this family may publish `sample`: a name it owns, and for a + /// PnL window only samples labelled with that window. + fn owns(self, sample: &LiqSample) -> bool { + match self { + Self::Pnl(window) => { + sample.metric.per_pnl_window() + && sample.labels.value("window") == Some(window.label()) + } + Self::Health + | Self::Settings + | Self::Inventory + | Self::Prices + | Self::Latencies + | Self::Reliability + | Self::Infra + | Self::Rebalances => sample.metric.family() == Some(self), } } } @@ -613,6 +809,16 @@ pub(crate) enum LiqSampleError { #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] struct LabelSet(Vec<(&'static str, String)>); +impl LabelSet { + fn value(&self, key: &str) -> Option<&str> { + let Self(labels) = self; + labels + .iter() + .find(|(label, _)| *label == key) + .map(|(_, value)| value.as_str()) + } +} + /// The family store `/metrics` renders after the recorder output. #[derive(Default)] pub(crate) struct LiqFamilies { @@ -726,7 +932,7 @@ fn owned_unique_samples(family: LiqFamily, samples: Vec) -> Arc<[LiqS samples .into_iter() .filter(|sample| { - if sample.metric.family() != Some(family) { + if !family.owns(sample) { error!( metric = sample.metric.name(), ?family, @@ -860,6 +1066,18 @@ pub(crate) enum LiqValueError { NonFinite(f64), #[error("integer {0} has no exact f64 representation")] Inexact(u64), + #[error("{value:?} is not a decimal")] + Decimal { + value: String, + #[source] + source: FloatError, + }, + #[error("{value:?} is not an RFC 3339 timestamp")] + Timestamp { + value: String, + #[source] + source: chrono::ParseError, + }, } /// Every `liq_*` name is a gauge: snapshots, rolling windows that go down, @@ -1163,6 +1381,31 @@ pub(crate) mod tests { "liq_dependency_latency_ms", "liq_rebalance_stage_ms", "liq_attestation_last_ms", + "liq_pnl_summary_usd", + "liq_pnl_summary_shares", + "liq_pnl_summary_count", + "liq_pnl_cost_usd", + "liq_pnl_revenue_usd", + "liq_pnl_cost_entries", + "liq_pnl_cost_missing_observations", + "liq_pnl_cost_coverage", + "liq_pnl_capital_avg_deployed_usd", + "liq_pnl_capital_annualized_return_pct", + "liq_pnl_capital_coverage_days", + "liq_pnl_capital_sample_days", + "liq_pnl_symbol_usd", + "liq_pnl_symbol_shares", + "liq_pnl_symbol_lots", + "liq_pnl_symbol_volume_shares", + "liq_pnl_sample_total_fills", + "liq_pnl_sample_symbols", + "liq_pnl_sample_first_ts_seconds", + "liq_pnl_sample_last_ts_seconds", + "liq_pnl_warnings", + "liq_pnl_day_usd", + "liq_pnl_day_cum_usd", + "liq_pnl_day_stream_usd", + "liq_pnl_day_cum_stream_usd", "liq_collector_last_success_ts_seconds", ] ); @@ -1189,6 +1432,42 @@ pub(crate) mod tests { "rebalances", ] ); + assert_eq!( + [ + PnlWindowKey::OneDay, + PnlWindowKey::OneWeek, + PnlWindowKey::OneMonth, + PnlWindowKey::YearToDate, + PnlWindowKey::OneYear, + PnlWindowKey::All, + ] + .map(|window| LiqFamily::Pnl(window).collector()), + ["pnl_1d", "pnl_1w", "pnl_1m", "pnl_ytd", "pnl_1y", "pnl_all"] + ); + } + + /// Every `liq_pnl_*` name is published per window and no other name is, + /// so the PnL names are exactly the ones a window family owns. + #[test] + fn only_the_pnl_names_are_published_per_window() { + let per_window: Vec<&str> = LiqMetric::ALL + .into_iter() + .filter(|metric| metric.per_pnl_window()) + .map(LiqMetric::name) + .collect(); + let pnl: Vec<&str> = LiqMetric::ALL + .into_iter() + .map(LiqMetric::name) + .filter(|name| name.starts_with("liq_pnl_")) + .collect(); + + assert_eq!(per_window.len(), 25); + assert_eq!(per_window, pnl); + for metric in LiqMetric::ALL { + if metric.per_pnl_window() { + assert_eq!(metric.family(), None, "{}", metric.name()); + } + } } #[test] diff --git a/src/metrics/liquidity/pnl.rs b/src/metrics/liquidity/pnl.rs new file mode 100644 index 0000000000..8e6dd410dd --- /dev/null +++ b/src/metrics/liquidity/pnl.rs @@ -0,0 +1,1351 @@ +//! The `Pnl(window)` families: every `liq_pnl_*` series of one PnL window, +//! built from the same `PnlResponse` `GET /pnl` returns for that window. +//! +//! Each window is its own family, replaced as one unit when its report +//! succeeds. A window whose report fails keeps its last samples (see +//! `pnl_refresh`), and its `liq_collector_last_success_ts_seconds` stops +//! advancing. +//! +//! The values follow the exporter sidecar, with one exception: a day +//! component that does not parse. The exporter counted it as 0; here the day +//! series it adds up are left out, and so is every running total after it, +//! with an error log. A summary decimal that does not parse leaves its series +//! absent, as in the exporter. + +use std::collections::BTreeMap; + +use chrono::{DateTime, Utc}; +use rain_math_float::{Float, FloatError}; +use tracing::{error, warn}; + +use st0x_float_macro::float; + +use super::{ + LiqMetric, LiqSample, LiqValueError, count_value, float_value, push_sample, + signed_integer_value, strip_prefix, timestamp_value, +}; +use crate::dashboard::pnl::{ + PnlResponse, PnlSummary, PnlSymbolSummary, PnlWindow, PnlWindowSymbol, +}; + +/// Day buckets published per window: the last ones, after the running +/// totals are computed over every bucket. +pub(crate) const PNL_CHART_DAYS: usize = 90; + +/// One PnL window, as the `window` label and the collector name carry it. +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub(crate) enum PnlWindowKey { + OneDay, + OneWeek, + OneMonth, + YearToDate, + OneYear, + All, +} + +impl PnlWindowKey { + /// The order a refresh cycle runs the windows in: the board's default + /// window first. + pub(crate) const REFRESH_ORDER: [Self; 6] = [ + Self::OneWeek, + Self::OneDay, + Self::All, + Self::OneMonth, + Self::YearToDate, + Self::OneYear, + ]; + + pub(crate) const fn label(self) -> &'static str { + match self { + Self::OneDay => "1d", + Self::OneWeek => "1w", + Self::OneMonth => "1m", + Self::YearToDate => "ytd", + Self::OneYear => "1y", + Self::All => "all", + } + } + + pub(crate) const fn collector(self) -> &'static str { + match self { + Self::OneDay => "pnl_1d", + Self::OneWeek => "pnl_1w", + Self::OneMonth => "pnl_1m", + Self::YearToDate => "pnl_ytd", + Self::OneYear => "pnl_1y", + Self::All => "pnl_all", + } + } +} + +#[derive(Debug, thiserror::Error)] +pub(crate) enum PnlSamplesError { + #[error("day bucket arithmetic failed")] + DayArithmetic(#[from] FloatError), +} + +/// Every `liq_pnl_*` sample of one window. Fails only when the day-bucket +/// sums cannot be computed; the caller then keeps the window's last samples. +pub(crate) fn pnl_samples( + report: &PnlResponse, + window: PnlWindowKey, +) -> Result, PnlSamplesError> { + let mut samples = Vec::new(); + + summary_samples(&mut samples, &report.summary, window); + cost_samples(&mut samples, report, window); + capital_samples(&mut samples, report, window); + for row in rows_with_distinct_symbols(&report.symbols, window) { + symbol_samples(&mut samples, row, window); + } + sample_stats_samples(&mut samples, report, window); + day_samples(&mut samples, &report.windows, window)?; + + Ok(samples) +} + +/// The per-symbol rows whose `symbol` label no other row shares. Two rows +/// that strip to the same label (`tAAPL` and `wtAAPL`) would publish the same +/// series twice, and the store keeps only one of them, so both are left out +/// with an error log. The exporter wrote both lines. +fn rows_with_distinct_symbols( + rows: &[PnlSymbolSummary], + window: PnlWindowKey, +) -> impl Iterator { + let mut counts: BTreeMap<&str, usize> = BTreeMap::new(); + for row in rows { + *counts.entry(strip_prefix(row.symbol.as_str())).or_insert(0) += 1; + } + for (symbol, count) in &counts { + if *count > 1 { + error!( + ?window, + symbol, + rows = count, + "Left out the liq_pnl_symbol series of a symbol label that several PnL rows share" + ); + } + } + + rows.iter() + .filter(move |row| counts.get(strip_prefix(row.symbol.as_str())) == Some(&1)) +} + +/// The eleven summary streams, in the exporter's `PNL_STREAMS` order. +#[derive(Clone, Copy)] +enum PnlStream { + CounterTrade, + OnchainNetting, + DirectionalInventoryBaseline, + DirectionalImbalanceExcess, + DirectionalExposure, + Total, + GrossRealized, + TrackedCosts, + TrackedRevenue, + NetRealized, + Realized, +} + +impl PnlStream { + const ALL: [Self; 11] = [ + Self::CounterTrade, + Self::OnchainNetting, + Self::DirectionalInventoryBaseline, + Self::DirectionalImbalanceExcess, + Self::DirectionalExposure, + Self::Total, + Self::GrossRealized, + Self::TrackedCosts, + Self::TrackedRevenue, + Self::NetRealized, + Self::Realized, + ]; + + const fn label(self) -> &'static str { + match self { + Self::CounterTrade => "counter_trade", + Self::OnchainNetting => "onchain_netting", + Self::DirectionalInventoryBaseline => "directional_inventory_baseline", + Self::DirectionalImbalanceExcess => "directional_imbalance_excess", + Self::DirectionalExposure => "directional_exposure", + Self::Total => "total", + Self::GrossRealized => "gross_realized", + Self::TrackedCosts => "tracked_costs", + Self::TrackedRevenue => "tracked_revenue", + Self::NetRealized => "net_realized", + Self::Realized => "realized", + } + } + + fn of_summary(self, summary: &PnlSummary) -> &str { + match self { + Self::CounterTrade => &summary.counter_trade_pnl_usd, + Self::OnchainNetting => &summary.onchain_netting_pnl_usd, + Self::DirectionalInventoryBaseline => &summary.directional_inventory_baseline_pnl_usd, + Self::DirectionalImbalanceExcess => &summary.directional_imbalance_excess_pnl_usd, + Self::DirectionalExposure => &summary.directional_exposure_pnl_usd, + Self::Total => &summary.total_pnl_usd, + Self::GrossRealized => &summary.gross_realized_pnl_usd, + Self::TrackedCosts => &summary.tracked_costs_usd, + Self::TrackedRevenue => &summary.tracked_revenue_usd, + Self::NetRealized => &summary.net_realized_pnl_usd, + Self::Realized => &summary.realized_pnl_usd, + } + } + + fn of_symbol(self, row: &PnlSymbolSummary) -> &str { + match self { + Self::CounterTrade => &row.counter_trade_pnl_usd, + Self::OnchainNetting => &row.onchain_netting_pnl_usd, + Self::DirectionalInventoryBaseline => &row.directional_inventory_baseline_pnl_usd, + Self::DirectionalImbalanceExcess => &row.directional_imbalance_excess_pnl_usd, + Self::DirectionalExposure => &row.directional_exposure_pnl_usd, + Self::Total => &row.total_pnl_usd, + Self::GrossRealized => &row.gross_realized_pnl_usd, + Self::TrackedCosts => &row.tracked_costs_usd, + Self::TrackedRevenue => &row.tracked_revenue_usd, + Self::NetRealized => &row.net_realized_pnl_usd, + Self::Realized => &row.realized_pnl_usd, + } + } +} + +/// The four component streams the day charts stack. The two aggregate +/// streams would count each component twice. +#[derive(Clone, Copy)] +enum ChartStream { + CounterTrade, + OnchainNetting, + DirectionalInventoryBaseline, + DirectionalImbalanceExcess, +} + +impl ChartStream { + const ALL: [Self; 4] = [ + Self::CounterTrade, + Self::OnchainNetting, + Self::DirectionalInventoryBaseline, + Self::DirectionalImbalanceExcess, + ]; + + const fn label(self) -> &'static str { + match self { + Self::CounterTrade => "counter_trade", + Self::OnchainNetting => "onchain_netting", + Self::DirectionalInventoryBaseline => "directional_inventory_baseline", + Self::DirectionalImbalanceExcess => "directional_imbalance_excess", + } + } + + fn of_day_row(self, row: &PnlWindowSymbol) -> &str { + match self { + Self::CounterTrade => &row.counter_trade_pnl_usd, + Self::OnchainNetting => &row.onchain_netting_pnl_usd, + Self::DirectionalInventoryBaseline => &row.directional_inventory_baseline_pnl_usd, + Self::DirectionalImbalanceExcess => &row.directional_imbalance_excess_pnl_usd, + } + } +} + +fn window_labels(window: PnlWindowKey) -> Vec<(&'static str, String)> { + vec![("window", window.label().to_string())] +} + +fn labelled(window: PnlWindowKey, labels: &[(&'static str, &str)]) -> Vec<(&'static str, String)> { + let mut all = window_labels(window); + all.extend( + labels + .iter() + .map(|(key, value)| (*key, (*value).to_string())), + ); + all +} + +fn decimal(value: &str) -> Result { + Float::parse(value.to_string()).map_err(|source| LiqValueError::Decimal { + value: value.to_string(), + source, + }) +} + +fn decimal_value(value: &str) -> Result { + decimal(value).and_then(float_value) +} + +fn rfc3339_value(value: &str) -> Result { + let at = DateTime::parse_from_rfc3339(value).map_err(|source| LiqValueError::Timestamp { + value: value.to_string(), + source, + })?; + + timestamp_value(at.with_timezone(&Utc)) +} + +fn summary_samples(samples: &mut Vec, summary: &PnlSummary, window: PnlWindowKey) { + let usd_streams = PnlStream::ALL + .map(|stream| (stream.label(), stream.of_summary(summary))) + .into_iter() + .chain([ + ("inventory_drift", summary.inventory_drift_usd.as_str()), + ("onchain_notional", summary.onchain_notional_usd.as_str()), + ("offchain_notional", summary.offchain_notional_usd.as_str()), + ]); + for (stream, value) in usd_streams { + push_sample( + samples, + LiqMetric::PnlSummaryUsd, + labelled(window, &[("stream", stream)]), + decimal_value(value), + ); + } + + for (kind, value) in [ + ("matched", &summary.matched_shares), + ("inventory_drift", &summary.inventory_drift_shares), + ("open_long", &summary.open_long_shares), + ("open_short", &summary.open_short_shares), + ("unmatched_offchain", &summary.unmatched_offchain_shares), + ] { + push_sample( + samples, + LiqMetric::PnlSummaryShares, + labelled(window, &[("kind", kind)]), + decimal_value(value), + ); + } + + for (kind, count) in [ + ("onchain_fill", summary.onchain_fill_count), + ("offchain_fill", summary.offchain_fill_count), + ("matched_lot", summary.matched_lot_count), + ("open_lot", summary.open_lot_count), + ( + "unmatched_offchain_fill", + summary.unmatched_offchain_fill_count, + ), + ] { + push_sample( + samples, + LiqMetric::PnlSummaryCount, + labelled(window, &[("kind", kind)]), + count_value(count), + ); + } +} + +fn cost_samples(samples: &mut Vec, report: &PnlResponse, window: PnlWindowKey) { + let costs = &report.costs; + + for (category, value) in [ + ("broker_fees", &costs.broker_fees_usd), + ("tokenization_fees", &costs.tokenization_fees_usd), + ("cctp_fees", &costs.cctp_fees_usd), + ("bot_gas", &costs.bot_gas_usd), + ("margin_interest", &costs.margin_interest_usd), + ("wallet_transfer_fees", &costs.wallet_transfer_fees_usd), + ("regulatory_fees", &costs.regulatory_fees_usd), + ("unclassified", &costs.unclassified_costs_usd), + ] { + push_sample( + samples, + LiqMetric::PnlCostUsd, + labelled(window, &[("category", category)]), + decimal_value(value), + ); + } + + push_sample( + samples, + LiqMetric::PnlRevenueUsd, + labelled(window, &[("category", "dividend_income")]), + decimal_value(&costs.dividend_revenue_usd), + ); + push_sample( + samples, + LiqMetric::PnlCostEntries, + window_labels(window), + count_value(costs.cost_entry_count), + ); + push_sample( + samples, + LiqMetric::PnlCostMissingObservations, + window_labels(window), + count_value(costs.missing_cost_observation_count), + ); + + for entry in &costs.coverage { + push_sample( + samples, + LiqMetric::PnlCostCoverage, + labelled( + window, + &[("source", entry.source), ("status", entry.status)], + ), + Ok(1.0), + ); + } +} + +fn capital_samples(samples: &mut Vec, report: &PnlResponse, window: PnlWindowKey) { + let capital = &report.capital; + + if let Some(average) = &capital.average_deployed_capital_usd { + push_sample( + samples, + LiqMetric::PnlCapitalAvgDeployedUsd, + window_labels(window), + decimal_value(average), + ); + } + if let Some(annualized) = &capital.annualized_return_pct { + push_sample( + samples, + LiqMetric::PnlCapitalAnnualizedReturnPct, + window_labels(window), + decimal_value(annualized), + ); + } + if let Some(coverage_days) = capital.coverage_days { + push_sample( + samples, + LiqMetric::PnlCapitalCoverageDays, + window_labels(window), + signed_integer_value(coverage_days), + ); + } + push_sample( + samples, + LiqMetric::PnlCapitalSampleDays, + window_labels(window), + count_value(capital.sample_days), + ); +} + +fn symbol_samples(samples: &mut Vec, row: &PnlSymbolSummary, window: PnlWindowKey) { + let symbol = strip_prefix(row.symbol.as_str()); + + let usd_columns = PnlStream::ALL + .map(|stream| (stream.label(), stream.of_symbol(row))) + .into_iter() + .chain([("inventory_drift", row.inventory_drift_usd.as_str())]); + for (col, value) in usd_columns { + push_sample( + samples, + LiqMetric::PnlSymbolUsd, + labelled(window, &[("symbol", symbol), ("col", col)]), + decimal_value(value), + ); + } + + for (kind, value) in [ + ("matched", &row.matched_shares), + ("inventory_drift", &row.inventory_drift_shares), + ("open_long", &row.open_long_shares), + ("open_short", &row.open_short_shares), + ] { + push_sample( + samples, + LiqMetric::PnlSymbolShares, + labelled(window, &[("symbol", symbol), ("kind", kind)]), + decimal_value(value), + ); + } + + push_sample( + samples, + LiqMetric::PnlSymbolLots, + labelled(window, &[("symbol", symbol)]), + count_value(row.matched_lot_count), + ); + + // A matched lot has two legs, and the volume counts each leg. + push_sample( + samples, + LiqMetric::PnlSymbolVolumeShares, + labelled(window, &[("symbol", symbol)]), + decimal(&row.matched_shares) + .and_then(|matched| Ok((matched * float!(2))?)) + .and_then(float_value), + ); +} + +fn sample_stats_samples(samples: &mut Vec, report: &PnlResponse, window: PnlWindowKey) { + let stats = &report.sample_stats; + + push_sample( + samples, + LiqMetric::PnlSampleTotalFills, + window_labels(window), + count_value(stats.total_fill_count), + ); + push_sample( + samples, + LiqMetric::PnlSampleSymbols, + window_labels(window), + count_value(stats.symbol_count), + ); + if let Some(first_at) = &stats.first_at { + push_sample( + samples, + LiqMetric::PnlSampleFirstTsSeconds, + window_labels(window), + rfc3339_value(first_at), + ); + } + if let Some(last_at) = &stats.last_at { + push_sample( + samples, + LiqMetric::PnlSampleLastTsSeconds, + window_labels(window), + rfc3339_value(last_at), + ); + } + push_sample( + samples, + LiqMetric::PnlWarnings, + window_labels(window), + count_value(report.warnings.len()), + ); +} + +/// One day bucket's sums and the running totals through it. A value is +/// `None` once a component it adds up did not parse: that sum is unknown, and +/// so is every running total after it. +struct DayRow<'a> { + day: &'a str, + symbols: BTreeMap>, + streams: [Option; 4], + cumulative_symbols: BTreeMap>, + cumulative_streams: [Option; 4], +} + +/// Adds `value` to a sum that is still known. An unknown side stays unknown. +fn add_known(sum: Option, value: Option) -> Result, FloatError> { + match (sum, value) { + (Some(sum), Some(value)) => (sum + value).map(Some), + _ => Ok(None), + } +} + +/// A day component, or `None` with an error log when it does not parse. The +/// exporter counted such a component as 0 (`dec(...) or 0`); a 0 would +/// publish a wrong day and wrong running totals as if they were right, so the +/// series it feeds are left out instead. +fn day_component(value: &str, window: PnlWindowKey, day: &str, symbol: &str) -> Option { + decimal(value) + .inspect_err(|error| { + error!( + ?window, + day, + symbol, + %error, + "Left out the liq_pnl_day series of an unparseable PnL day component" + ); + }) + .ok() +} + +/// The day series. The running totals run over every bucket, sorted by day, +/// and only then keep the last [`PNL_CHART_DAYS`], so the last bucket's +/// running total still equals the window's total. +fn day_samples( + samples: &mut Vec, + buckets: &[PnlWindow], + window: PnlWindowKey, +) -> Result<(), PnlSamplesError> { + let mut sorted: Vec<&PnlWindow> = buckets.iter().collect(); + sorted.sort_by(|left, right| left.window_id.cmp(&right.window_id)); + + let mut cumulative_symbols: BTreeMap> = BTreeMap::new(); + let mut cumulative_streams = [Some(float!(0)); 4]; + let mut rows = Vec::with_capacity(sorted.len()); + + for bucket in sorted { + if bucket.window_id.is_empty() { + warn!(?window, "Skipped a PnL day bucket without a day"); + continue; + } + let day = bucket.window_id.as_str(); + + let mut symbols: BTreeMap> = BTreeMap::new(); + let mut streams = [Some(float!(0)); 4]; + for row in &bucket.symbols { + let symbol = strip_prefix(row.symbol.as_str()).to_string(); + let total = day_component(&row.total_pnl_usd, window, day, &symbol); + for (sum, stream) in streams.iter_mut().zip(ChartStream::ALL) { + let value = day_component(stream.of_day_row(row), window, day, &symbol); + *sum = add_known(*sum, value)?; + } + let day_total = symbols.entry(symbol).or_insert(Some(float!(0))); + *day_total = add_known(*day_total, total)?; + } + + for (symbol, value) in &symbols { + let running = cumulative_symbols + .entry(symbol.clone()) + .or_insert(Some(float!(0))); + *running = add_known(*running, *value)?; + } + for (running, value) in cumulative_streams.iter_mut().zip(streams) { + *running = add_known(*running, value)?; + } + + rows.push(DayRow { + day, + symbols, + streams, + cumulative_symbols: cumulative_symbols.clone(), + cumulative_streams, + }); + } + + let first_kept = rows.len().saturating_sub(PNL_CHART_DAYS); + for row in &rows[first_kept..] { + push_day_row(samples, row, window); + } + + Ok(()) +} + +fn push_day_row(samples: &mut Vec, row: &DayRow<'_>, window: PnlWindowKey) { + let known = |values: &BTreeMap>| { + values + .iter() + .filter_map(|(symbol, value)| value.map(|value| (symbol.clone(), value))) + .collect::>() + }; + for (symbol, value) in known(&row.symbols) { + push_sample( + samples, + LiqMetric::PnlDayUsd, + labelled(window, &[("day", row.day), ("symbol", &symbol)]), + float_value(value), + ); + } + for (symbol, value) in known(&row.cumulative_symbols) { + push_sample( + samples, + LiqMetric::PnlDayCumUsd, + labelled(window, &[("day", row.day), ("symbol", &symbol)]), + float_value(value), + ); + } + for (stream, value) in ChartStream::ALL.into_iter().zip(row.streams) { + let Some(value) = value else { continue }; + push_sample( + samples, + LiqMetric::PnlDayStreamUsd, + labelled(window, &[("day", row.day), ("stream", stream.label())]), + float_value(value), + ); + } + for (stream, value) in ChartStream::ALL.into_iter().zip(row.cumulative_streams) { + let Some(value) = value else { continue }; + push_sample( + samples, + LiqMetric::PnlDayCumStreamUsd, + labelled(window, &[("day", row.day), ("stream", stream.label())]), + float_value(value), + ); + } +} + +#[cfg(test)] +pub(crate) mod tests { + use std::collections::BTreeMap; + + use serde_json::Value; + + use st0x_finance::Symbol; + + use super::*; + use crate::dashboard::pnl::{ + PnlAvailableRange, PnlCapitalSummary, PnlCostCoverage, PnlCostSummary, PnlSampleStats, + }; + use crate::metrics::liquidity::inventory::tests::render_family; + use crate::metrics::liquidity::tests::{SeriesKey, parse_exposition, series}; + use crate::metrics::liquidity::{LiqFamilies, LiqFamily}; + + fn summary(values: &[&str; 20], counts: [usize; 5]) -> PnlSummary { + let [ + counter_trade, + onchain_netting, + baseline, + excess, + exposure, + total, + gross, + costs, + revenue, + net, + realized, + matched, + onchain_notional, + offchain_notional, + drift_shares, + drift_usd, + open_long, + open_short, + unmatched_shares, + unmatched_notional, + ] = values.map(str::to_string); + let [ + onchain_fills, + offchain_fills, + matched_lots, + open_lots, + unmatched_fills, + ] = counts; + + PnlSummary { + counter_trade_pnl_usd: counter_trade, + onchain_netting_pnl_usd: onchain_netting, + directional_inventory_baseline_pnl_usd: baseline, + directional_imbalance_excess_pnl_usd: excess, + directional_exposure_pnl_usd: exposure, + total_pnl_usd: total, + gross_realized_pnl_usd: gross, + tracked_costs_usd: costs, + tracked_revenue_usd: revenue, + net_realized_pnl_usd: net, + realized_pnl_usd: realized, + matched_shares: matched, + onchain_notional_usd: onchain_notional, + offchain_notional_usd: offchain_notional, + inventory_drift_shares: drift_shares, + inventory_drift_usd: drift_usd, + open_long_shares: open_long, + open_short_shares: open_short, + unmatched_offchain_shares: unmatched_shares, + unmatched_offchain_notional_usd: unmatched_notional, + onchain_fill_count: onchain_fills, + offchain_fill_count: offchain_fills, + matched_lot_count: matched_lots, + open_lot_count: open_lots, + unmatched_offchain_fill_count: unmatched_fills, + } + } + + fn symbol_row(symbol: &str, values: &[&str; 17], matched_lots: usize) -> PnlSymbolSummary { + let [ + counter_trade, + onchain_netting, + baseline, + excess, + exposure, + total, + gross, + costs, + revenue, + net, + realized, + matched, + drift_shares, + drift_usd, + open_long, + open_short, + unmatched_shares, + ] = values.map(str::to_string); + + PnlSymbolSummary { + symbol: Symbol::new(symbol).unwrap(), + counter_trade_pnl_usd: counter_trade, + onchain_netting_pnl_usd: onchain_netting, + directional_inventory_baseline_pnl_usd: baseline, + directional_imbalance_excess_pnl_usd: excess, + directional_exposure_pnl_usd: exposure, + total_pnl_usd: total, + gross_realized_pnl_usd: gross, + tracked_costs_usd: costs, + tracked_revenue_usd: revenue, + net_realized_pnl_usd: net, + realized_pnl_usd: realized, + matched_shares: matched, + inventory_drift_shares: drift_shares, + inventory_drift_usd: drift_usd, + open_long_shares: open_long, + open_short_shares: open_short, + unmatched_offchain_shares: unmatched_shares, + matched_lot_count: matched_lots, + onchain_fill_count: matched_lots, + offchain_fill_count: matched_lots, + unmatched_offchain_fill_count: 0, + } + } + + /// One symbol row of a day bucket: the four chart streams, then the + /// directional exposure and the total. + pub(crate) fn day_symbol(symbol: &str, values: [&str; 6]) -> PnlWindowSymbol { + let [ + counter_trade, + onchain_netting, + baseline, + excess, + exposure, + total, + ] = values.map(str::to_string); + + PnlWindowSymbol { + symbol: Symbol::new(symbol).unwrap(), + counter_trade_pnl_usd: counter_trade, + onchain_netting_pnl_usd: onchain_netting, + directional_inventory_baseline_pnl_usd: baseline, + directional_imbalance_excess_pnl_usd: excess, + directional_exposure_pnl_usd: exposure, + total_pnl_usd: total, + } + } + + pub(crate) fn day_bucket(day: &str, symbols: Vec) -> PnlWindow { + PnlWindow { + window_id: day.to_string(), + start_at: format!("{day}T05:00:00.000Z"), + end_at: format!("{day}T04:59:59.999Z"), + label: day.to_string(), + is_weekend: false, + market_session: "regular".to_string(), + counter_trading_session: "regular".to_string(), + granularity: "day", + symbols, + } + } + + fn costs(coverage: Vec) -> PnlCostSummary { + PnlCostSummary { + total_tracked_costs_usd: "14.25".to_string(), + total_tracked_revenue_usd: "1.5".to_string(), + counter_trade_costs_usd: "9".to_string(), + onchain_netting_costs_usd: "0".to_string(), + directional_exposure_costs_usd: "0".to_string(), + generic_costs_usd: "5.25".to_string(), + dividend_revenue_usd: "1.5".to_string(), + offchain_execution_fees_usd: "2".to_string(), + tokenization_fees_usd: "3.5".to_string(), + cctp_fees_usd: "0.75".to_string(), + conversion_slippage_usd: "0".to_string(), + oracle_write_cost_usd: "0".to_string(), + broker_fees_usd: "2".to_string(), + regulatory_fees_usd: "0.01".to_string(), + margin_interest_usd: "4".to_string(), + bot_gas_usd: "1.99".to_string(), + wallet_transfer_fees_usd: "0".to_string(), + unclassified_costs_usd: "2".to_string(), + cost_entry_count: 7, + missing_cost_observation_count: 2, + coverage, + } + } + + fn coverage(source: &'static str, status: &'static str) -> PnlCostCoverage { + PnlCostCoverage { + source, + accounting_bucket: "generic", + effect: "cost", + status, + amount_usd: "0".to_string(), + note: "fixture", + } + } + + pub(crate) fn report( + available_range: (Option<&str>, Option<&str>), + windows: Vec, + ) -> PnlResponse { + PnlResponse { + attribution_method: "backend_position_fill_replay_fifo", + as_of_rowid: 42, + warnings: vec!["first".to_string(), "second".to_string()], + available_range: PnlAvailableRange { + first_at: available_range.0.map(|day| format!("{day}T14:30:00Z")), + last_at: available_range.1.map(|day| format!("{day}T15:00:00Z")), + first_date: available_range.0.map(str::to_string), + last_date: available_range.1.map(str::to_string), + }, + sample_stats: PnlSampleStats { + first_at: Some("2026-02-20T14:30:00.25Z".to_string()), + last_at: Some("2026-03-03T15:00:00+00:00".to_string()), + symbol_count: 2, + onchain_fill_count: 5, + offchain_fill_count: 4, + total_fill_count: 9, + symbols: Vec::new(), + }, + summary: summary( + &[ + "12.5", "-3.25", "4", "-1.75", "2.25", "11.5", "20", "14.25", "n/a", "7.25", + "11.5", "300", "6000", "5950.5", "-2", "-30.5", "10", "0", "1.5", "22.5", + ], + [5, 4, 3, 2, 1], + ), + costs: costs(vec![ + coverage("tokenization_fees", "included"), + coverage("wallet_transfer_fees", "not_ingested"), + ]), + capital: PnlCapitalSummary { + average_deployed_capital_usd: Some("12500.5".to_string()), + annualized_return_pct: None, + coverage_days: Some(3), + sample_days: 3, + first_snapshot_day: Some("2026-03-01".to_string()), + last_snapshot_day: Some("2026-03-03".to_string()), + excluded_days: Vec::new(), + }, + symbols: vec![ + symbol_row( + "tAAPL", + &[ + "10", "-1", "3", "-1.5", "1.5", "10.5", "15", "6", "1", "10", "10.5", + "200", "-1", "-15.25", "8", "0", "1.5", + ], + 2, + ), + symbol_row( + "RKLB", + &[ + "2.5", "-2.25", "1", "-0.25", "0.75", "1", "5", "8.25", "0.5", "-2.75", + "1", "", "-1", "-15.25", "2", "0", "0", + ], + 1, + ), + ], + symbol_universe: vec![Symbol::new("RKLB").unwrap(), Symbol::new("tAAPL").unwrap()], + entries: Vec::new(), + cost_entries: Vec::new(), + total: 3, + has_more: true, + windows, + } + } + + /// Three days, out of order: two symbols that both strip to `AAPL` on + /// the first day, a day without symbol rows, and an unparseable + /// component on the last day. + pub(crate) fn pnl_fixture() -> PnlResponse { + report( + (Some("2026-02-20"), Some("2026-03-03")), + vec![ + day_bucket( + "2026-03-03", + vec![day_symbol( + "tAAPL", + ["1.5", "bad", "0.5", "-0.25", "0.25", "1.75"], + )], + ), + day_bucket( + "2026-03-01", + vec![ + day_symbol("tAAPL", ["2", "-1", "0.5", "0", "0.5", "1.5"]), + day_symbol("wtAAPL", ["1", "0", "0", "0", "0", "1"]), + day_symbol("RKLB", ["0.25", "0.5", "-1", "0.75", "-0.25", "0.5"]), + ], + ), + day_bucket("2026-03-02", Vec::new()), + ], + ) + } + + /// 95 consecutive day buckets, so the last 90 are published. `RKLB` + /// has fills only on the first day, which the cut drops, so it appears + /// in the running totals only. + pub(crate) fn pnl_days_fixture() -> PnlResponse { + let first = chrono::NaiveDate::from_ymd_opt(2025, 12, 1).unwrap(); + let buckets = (0..95_u64) + .map(|offset| { + let day = first + .checked_add_days(chrono::Days::new(offset)) + .unwrap() + .to_string(); + let total = format!("{offset}.5"); + let mut symbols = vec![day_symbol( + "tTSLA", + [&total, "0.25", "-0.5", "0.125", "-0.375", &total], + )]; + if offset == 0 { + symbols.push(day_symbol("RKLB", ["3", "0", "0", "0", "0", "3"])); + } + day_bucket(&day, symbols) + }) + .collect(); + + report((Some("2025-12-01"), Some("2026-03-05")), buckets) + } + + fn assert_matches_fixture(report: &PnlResponse, fixture_json: &str) { + let fixture: Value = serde_json::from_str(fixture_json).unwrap(); + assert_eq!(serde_json::to_value(report).unwrap(), fixture); + } + + fn pnl_names() -> Vec<&'static str> { + LiqMetric::ALL + .into_iter() + .filter(|metric| metric.per_pnl_window()) + .map(LiqMetric::name) + .collect() + } + + fn golden(golden: &str) -> BTreeMap { + let names = pnl_names(); + parse_exposition(golden) + .into_iter() + .filter(|((name, _), _)| names.contains(&name.as_str())) + .collect() + } + + fn render_windows(report: &PnlResponse, windows: &[PnlWindowKey]) -> BTreeMap { + let families = LiqFamilies::default(); + for window in windows { + families.replace( + LiqFamily::Pnl(*window), + pnl_samples(report, *window).unwrap(), + std::time::SystemTime::UNIX_EPOCH, + ); + } + let mut body = String::new(); + families.render_into(&mut body); + + parse_exposition(&body) + .into_iter() + .filter(|((name, _), _)| name != "liq_collector_last_success_ts_seconds") + .collect() + } + + /// The exporter queried every window and got the same report back, so + /// each window's series equal the builder's for that window, except the + /// two the fixture's unparseable component feeds: the exporter counted it + /// as 0, the bot leaves them out. + #[test] + fn every_window_matches_the_exporter_golden() { + let report = pnl_fixture(); + assert_matches_fixture(&report, include_str!("testdata/pnl.json")); + + let mut expected = golden(include_str!("testdata/pnl.prom")); + for window in PnlWindowKey::REFRESH_ORDER { + let unparsed = |name: &str| { + series( + name, + &[ + ("window", window.label()), + ("day", "2026-03-03"), + ("stream", "onchain_netting"), + ], + ) + }; + assert_eq!( + expected.remove(&unparsed("liq_pnl_day_stream_usd")), + Some(0.0) + ); + assert_eq!( + expected.remove(&unparsed("liq_pnl_day_cum_stream_usd")), + Some(-0.5) + ); + } + + assert_eq!( + render_windows(&report, &PnlWindowKey::REFRESH_ORDER), + expected + ); + } + + #[test] + fn the_last_ninety_day_buckets_match_the_exporter_golden() { + let report = pnl_days_fixture(); + assert_matches_fixture(&report, include_str!("testdata/pnl-days.json")); + + assert_eq!( + render_windows(&report, &[PnlWindowKey::All]), + golden(include_str!("testdata/pnl-days.prom")) + ); + } + + fn rendered(report: &PnlResponse) -> BTreeMap { + render_family( + LiqFamily::Pnl(PnlWindowKey::OneWeek), + pnl_samples(report, PnlWindowKey::OneWeek).unwrap(), + ) + } + + fn day_series(name: &str, day: &str, key: &str, value: &str) -> SeriesKey { + series(name, &[("window", "1w"), ("day", day), (key, value)]) + } + + #[test] + fn unparseable_summary_decimals_leave_their_series_absent() { + let rendered = rendered(&pnl_fixture()); + + assert_eq!( + rendered.get(&series( + "liq_pnl_summary_usd", + &[("window", "1w"), ("stream", "tracked_revenue")] + )), + None + ); + assert_eq!( + rendered.get(&series( + "liq_pnl_summary_usd", + &[("window", "1w"), ("stream", "total")] + )), + Some(&11.5) + ); + assert_eq!( + rendered.get(&series( + "liq_pnl_symbol_volume_shares", + &[("window", "1w"), ("symbol", "RKLB")] + )), + None + ); + assert_eq!( + rendered.get(&series( + "liq_pnl_symbol_volume_shares", + &[("window", "1w"), ("symbol", "AAPL")] + )), + Some(&400.0) + ); + } + + #[test] + fn missing_capital_figures_are_absent_and_the_sample_days_stay() { + let mut report = pnl_fixture(); + report.capital = PnlCapitalSummary::default(); + + let rendered = rendered(&report); + let capital: Vec<_> = rendered + .iter() + .filter(|((name, _), _)| name.starts_with("liq_pnl_capital_")) + .collect(); + + assert_eq!( + capital, + [( + &series("liq_pnl_capital_sample_days", &[("window", "1w")]), + &0.0 + )] + ); + } + + #[test] + fn sample_timestamps_keep_whole_microseconds() { + let rendered = rendered(&pnl_fixture()); + + assert_eq!( + rendered.get(&series( + "liq_pnl_sample_first_ts_seconds", + &[("window", "1w")] + )), + Some(&1_771_597_800.25) + ); + assert_eq!( + rendered.get(&series( + "liq_pnl_sample_last_ts_seconds", + &[("window", "1w")] + )), + Some(&1_772_550_000.0) + ); + } + + #[test] + fn day_buckets_sum_stripped_symbols_and_leave_out_what_a_bad_component_feeds() { + let rendered = rendered(&pnl_fixture()); + + let day = |name: &str, day: &str, key: &str, value: &str| { + rendered.get(&day_series(name, day, key, value)).copied() + }; + assert_eq!( + day("liq_pnl_day_usd", "2026-03-01", "symbol", "AAPL"), + Some(2.5) + ); + assert_eq!(day("liq_pnl_day_usd", "2026-03-02", "symbol", "AAPL"), None); + assert_eq!( + day("liq_pnl_day_cum_usd", "2026-03-02", "symbol", "RKLB"), + Some(0.5) + ); + assert_eq!( + day("liq_pnl_day_cum_usd", "2026-03-03", "symbol", "AAPL"), + Some(4.25) + ); + assert_eq!( + day( + "liq_pnl_day_stream_usd", + "2026-03-02", + "stream", + "counter_trade" + ), + Some(0.0) + ); + assert_eq!( + day( + "liq_pnl_day_stream_usd", + "2026-03-03", + "stream", + "onchain_netting" + ), + None + ); + assert_eq!( + day( + "liq_pnl_day_cum_stream_usd", + "2026-03-03", + "stream", + "onchain_netting" + ), + None + ); + // The bad component feeds only its own stream: the symbol's total and + // the other streams of that day stay. + assert_eq!( + day( + "liq_pnl_day_stream_usd", + "2026-03-03", + "stream", + "counter_trade" + ), + Some(1.5) + ); + assert_eq!( + day( + "liq_pnl_day_cum_stream_usd", + "2026-03-02", + "stream", + "onchain_netting" + ), + Some(-0.5) + ); + } + + /// `tAAPL` and `wtAAPL` both publish as `AAPL`, so neither row's series + /// is published rather than one silently replacing the other. + #[test] + fn symbol_rows_that_share_a_label_leave_their_series_out() { + let mut report = pnl_fixture(); + let template = report.symbols[0].clone(); + report.symbols = vec![ + PnlSymbolSummary { + symbol: Symbol::new("tAAPL").unwrap(), + ..template.clone() + }, + PnlSymbolSummary { + symbol: Symbol::new("wtAAPL").unwrap(), + ..template.clone() + }, + PnlSymbolSummary { + symbol: Symbol::new("RKLB").unwrap(), + ..template + }, + ]; + + let symbols: std::collections::BTreeSet = rendered(&report) + .into_keys() + .filter(|(name, _)| name.starts_with("liq_pnl_symbol_")) + .filter_map(|(_, labels)| { + labels + .into_iter() + .find(|(key, _)| key == "symbol") + .map(|(_, symbol)| symbol) + }) + .collect(); + + assert_eq!( + symbols, + std::collections::BTreeSet::from(["RKLB".to_string()]) + ); + } + + /// A running total with an unknown day in it is unknown: the symbol's + /// later running totals are left out, while its later day values stay. + #[test] + fn a_bad_day_total_leaves_out_the_later_running_totals_of_that_symbol() { + let report = report( + (Some("2026-03-01"), Some("2026-03-03")), + vec![ + day_bucket( + "2026-03-01", + vec![day_symbol("tAAPL", ["1", "0", "0", "0", "0", "oops"])], + ), + day_bucket( + "2026-03-02", + vec![ + day_symbol("tAAPL", ["2", "0", "0", "0", "0", "2"]), + day_symbol("RKLB", ["1", "0", "0", "0", "0", "1"]), + ], + ), + ], + ); + let rendered = rendered(&report); + let day = |name: &str, day: &str, symbol: &str| { + rendered + .get(&day_series(name, day, "symbol", symbol)) + .copied() + }; + + assert_eq!(day("liq_pnl_day_usd", "2026-03-01", "AAPL"), None); + assert_eq!(day("liq_pnl_day_cum_usd", "2026-03-01", "AAPL"), None); + assert_eq!(day("liq_pnl_day_usd", "2026-03-02", "AAPL"), Some(2.0)); + assert_eq!(day("liq_pnl_day_cum_usd", "2026-03-02", "AAPL"), None); + assert_eq!(day("liq_pnl_day_cum_usd", "2026-03-02", "RKLB"), Some(1.0)); + assert_eq!( + rendered + .get(&day_series( + "liq_pnl_day_cum_stream_usd", + "2026-03-02", + "stream", + "counter_trade" + )) + .copied(), + Some(4.0) + ); + } + + #[test] + fn the_running_totals_include_the_buckets_the_cut_drops() { + let rendered = render_family( + LiqFamily::Pnl(PnlWindowKey::All), + pnl_samples(&pnl_days_fixture(), PnlWindowKey::All).unwrap(), + ); + let days: std::collections::BTreeSet<&str> = rendered + .keys() + .filter(|(name, _)| name == "liq_pnl_day_stream_usd") + .filter_map(|(_, labels)| { + labels + .iter() + .find(|(key, _)| key == "day") + .map(|(_, day)| day.as_str()) + }) + .collect(); + + assert_eq!(days.len(), PNL_CHART_DAYS); + assert_eq!(days.first(), Some(&"2025-12-06")); + assert_eq!(days.last(), Some(&"2026-03-05")); + // 0.5 + 1.5 + ... + 94.5 over all 95 buckets. + assert_eq!( + rendered.get(&series( + "liq_pnl_day_cum_usd", + &[("window", "all"), ("day", "2026-03-05"), ("symbol", "TSLA")] + )), + Some(&4512.5) + ); + assert_eq!( + rendered.get(&series( + "liq_pnl_day_cum_usd", + &[("window", "all"), ("day", "2025-12-06"), ("symbol", "RKLB")] + )), + Some(&3.0) + ); + } + + #[test] + fn a_window_family_drops_samples_labelled_with_another_window() { + let families = LiqFamilies::default(); + let mut samples = pnl_samples(&pnl_fixture(), PnlWindowKey::OneDay).unwrap(); + samples.extend(pnl_samples(&pnl_fixture(), PnlWindowKey::OneWeek).unwrap()); + families.replace( + LiqFamily::Pnl(PnlWindowKey::OneDay), + samples, + std::time::SystemTime::UNIX_EPOCH, + ); + + let mut body = String::new(); + families.render_into(&mut body); + assert!(body.contains("window=\"1d\""), "{body}"); + assert!(!body.contains("window=\"1w\""), "{body}"); + } +} diff --git a/src/metrics/liquidity/pnl_refresh.rs b/src/metrics/liquidity/pnl_refresh.rs new file mode 100644 index 0000000000..2486b54171 --- /dev/null +++ b/src/metrics/liquidity/pnl_refresh.rs @@ -0,0 +1,583 @@ +//! `liq-pnl-refresh`: every 5 minutes, one PnL report per window through +//! the same path as `GET /pnl`, published as that window's family. +//! +//! The windows and their order copy the exporter sidecar. Every window ends +//! on the last day with fills (`availableRange.lastDate`), and every start is +//! clamped to the first day with fills. A cold range cache costs one probe +//! report whose figures are not published. +//! +//! The task has its own one-permit admission, so it never takes a live +//! `/pnl` permit. Each report runs its own ledger catch-up, as each of the +//! exporter's `/pnl` calls does. +//! +//! A window whose report fails (including a ledger catch-up past its +//! deadline) or does not fit in the cycle budget keeps its last samples. The +//! exporter drops such a window until its next cycle; keeping it means a +//! reader in that gap sees the last value, and the window's +//! `liq_collector_last_success_ts_seconds` shows its age. +//! +//! A report is never cancelled from here: its replay runs on a blocking +//! thread that keeps the task's permit until it ends, so a cancelled report +//! would make the next windows fail admission. Every report is bounded +//! anyway: the catch-up has its own deadline, the Alpaca calls have HTTP +//! timeouts, and the replay is finite. +//! +//! Each window replays the ledger on its own, as each of the exporter's +//! calls did: 6 replays and 6 Alpaca fetches per cycle. One replay shared by +//! the 6 windows would cost about a sixth, but needs the report split into a +//! replay step and a per-window summary step, a change to the PnL code path +//! that wants its own parity test. + +use std::future::Future; +use std::sync::Arc; +use std::time::{Duration, SystemTime}; + +use chrono::{Datelike, Days, NaiveDate}; +use metrics::histogram; +use sqlx::SqlitePool; +use task_supervisor::{SupervisedTask, TaskResult}; +use tokio::time::{Instant, MissedTickBehavior}; +use tracing::{info, warn}; + +use st0x_config::{BrokerCtx, Ctx}; +use st0x_execution::AlpacaBrokerApiCtx; + +use super::pnl::{PnlWindowKey, pnl_samples}; +use super::{LIQ_FAMILIES, LiqFamilies, LiqFamily}; +use crate::dashboard::pnl::{ + PnlLedger, PnlQuery, PnlReportAdmission, PnlReportDeps, PnlReportError, PnlResponse, + run_pnl_report, +}; + +/// The exporter's PnL cadence. +const PNL_REFRESH_PERIOD: Duration = Duration::from_secs(300); + +/// Wall-clock budget for one cycle's windows. A window that would start +/// after it keeps its last samples until the next cycle. +const PNL_WINDOW_BUDGET: Duration = Duration::from_secs(120); + +/// Reports the task runs at once: one, so the live `/pnl` permits stay free. +const PNL_METRICS_REPORTS: usize = 1; + +/// Where the task gets one PnL report. The live source is +/// [`LivePnlReports`]; tests count and fail calls. +pub(crate) trait PnlReports: Clone + Send + Sync + 'static { + fn report( + &self, + query: PnlQuery, + ) -> impl Future> + Send; +} + +/// Reports through [`run_pnl_report`] with the task's own admission. +#[derive(Clone)] +pub(crate) struct LivePnlReports { + pool: SqlitePool, + ledger: Arc, + broker: AlpacaBrokerApiCtx, + admission: PnlReportAdmission, +} + +impl LivePnlReports { + pub(crate) fn new(ctx: &Ctx, pool: SqlitePool, ledger: Arc) -> Self { + let BrokerCtx::AlpacaBrokerApi(broker) = &ctx.broker; + + Self { + pool, + ledger, + broker: broker.clone(), + admission: PnlReportAdmission::with_permits(PNL_METRICS_REPORTS), + } + } +} + +impl PnlReports for LivePnlReports { + async fn report(&self, query: PnlQuery) -> Result { + let deps = PnlReportDeps { + pool: &self.pool, + ledger: &self.ledger, + broker: &self.broker, + }; + + run_pnl_report(&deps, &query, &self.admission).await + } +} + +/// The first and last days with fills, from a report's `availableRange`. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub(crate) struct FillDates { + first: NaiveDate, + last: NaiveDate, +} + +impl FillDates { + /// `None` when the report has no fills. Unparseable dates are logged + /// and treated the same way. + fn of(report: &PnlResponse) -> Option { + let range = &report.available_range; + let (Some(first), Some(last)) = (&range.first_date, &range.last_date) else { + return None; + }; + + match (parse_day(first), parse_day(last)) { + (Ok(first), Ok(last)) => Some(Self { first, last }), + (Err(error), _) | (_, Err(error)) => { + warn!(%first, %last, %error, "Ignored a PnL available range that does not parse"); + None + } + } + } +} + +fn parse_day(day: &str) -> Result { + NaiveDate::parse_from_str(day, "%Y-%m-%d") +} + +/// The `(fromDate, toDate)` of one window: it ends on the last day with +/// fills and starts no earlier than the first. `None` only when the date +/// arithmetic leaves the calendar. +pub(crate) fn window_dates( + window: PnlWindowKey, + dates: FillDates, +) -> Option<(NaiveDate, NaiveDate)> { + let anchor = dates.last; + let start = match window { + PnlWindowKey::OneDay => Some(anchor), + PnlWindowKey::OneWeek => anchor.checked_sub_days(Days::new(6)), + PnlWindowKey::OneMonth => anchor.checked_sub_days(Days::new(30)), + PnlWindowKey::YearToDate => NaiveDate::from_ymd_opt(anchor.year(), 1, 1), + PnlWindowKey::OneYear => anchor.checked_sub_days(Days::new(364)), + PnlWindowKey::All => Some(dates.first), + }?; + + Some((start.max(dates.first), anchor)) +} + +/// Every 5 minutes: refreshes each PnL window family. +#[derive(Clone)] +pub(crate) struct LiqPnlRefresh { + reports: Reports, + families: &'static LiqFamilies, + dates: Option, +} + +impl LiqPnlRefresh { + /// The task as the bot runs it: live reports into the process-wide + /// store. + pub(crate) fn live(ctx: &Ctx, pool: SqlitePool, ledger: Arc) -> Self { + Self::new(LivePnlReports::new(ctx, pool, ledger), &LIQ_FAMILIES) + } +} + +impl LiqPnlRefresh { + pub(crate) fn new(reports: Reports, families: &'static LiqFamilies) -> Self { + Self { + reports, + families, + dates: None, + } + } + + async fn refresh_once(&mut self) { + let dates = match self.dates { + Some(dates) => dates, + None => match self.probe().await { + Some(dates) => dates, + None => return, + }, + }; + + let deadline = Instant::now() + PNL_WINDOW_BUDGET; + for window in PnlWindowKey::REFRESH_ORDER { + if Instant::now() > deadline { + warn!( + window = window.label(), + budget = ?PNL_WINDOW_BUDGET, + "Kept the last liq_ PnL window: the cycle's budget is spent" + ); + continue; + } + + self.refresh_window(window, dates).await; + } + } + + /// One report with no dates, only to learn the range of days with + /// fills; its figures are not any window's. + async fn probe(&mut self) -> Option { + let query = PnlQuery { + limit: Some(1), + ..PnlQuery::default() + }; + + match self.reports.report(query).await { + Ok(report) => { + self.remember_dates(&report); + if self.dates.is_none() { + info!("No PnL fills yet; no liq_ PnL window to publish"); + } + self.dates + } + Err(error) => { + warn!(%error, "PnL range probe failed; no liq_ PnL window this cycle"); + None + } + } + } + + async fn refresh_window(&mut self, window: PnlWindowKey, dates: FillDates) { + let Some((from, to)) = window_dates(window, dates) else { + warn!( + window = window.label(), + ?dates, + "Kept the last liq_ PnL window: no date range" + ); + return; + }; + let query = PnlQuery { + limit: Some(1), + from_date: Some(from.to_string()), + to_date: Some(to.to_string()), + ..PnlQuery::default() + }; + + // Every attempt is timed, a failed one too, so a slow window that + // keeps failing still shows in the duration's tail. + let started = Instant::now(); + let outcome = self.reports.report(query).await; + histogram!("metrics_refresh_duration_seconds", "collector" => window.collector()) + .record(started.elapsed().as_secs_f64()); + let report = match outcome { + Ok(report) => report, + Err(error) => { + warn!(window = window.label(), %error, "Kept the last liq_ PnL window: report failed"); + return; + } + }; + + self.remember_dates(&report); + match pnl_samples(&report, window) { + Ok(samples) => { + self.families + .replace(LiqFamily::Pnl(window), samples, SystemTime::now()); + } + Err(error) => { + warn!(window = window.label(), %error, "Kept the last liq_ PnL window: samples failed"); + } + } + } + + /// Every report refreshes the range for the next cycle. + fn remember_dates(&mut self, report: &PnlResponse) { + if let Some(dates) = FillDates::of(report) { + self.dates = Some(dates); + } + } +} + +impl SupervisedTask for LiqPnlRefresh { + async fn run(&mut self) -> TaskResult { + info!("liq_ PnL refresh started"); + + let mut interval = tokio::time::interval(PNL_REFRESH_PERIOD); + interval.set_missed_tick_behavior(MissedTickBehavior::Skip); + + loop { + interval.tick().await; + self.refresh_once().await; + } + } +} + +#[cfg(test)] +mod tests { + use std::collections::BTreeMap; + use std::sync::Mutex; + + use super::*; + use crate::metrics::liquidity::inventory::tests::{leaked_families, rendered_store}; + use crate::metrics::liquidity::pnl::tests::{day_bucket, day_symbol, pnl_fixture, report}; + use crate::metrics::liquidity::tests::series; + use crate::metrics::liquidity::{LiqMetric, LiqSample}; + + /// The `(fromDate, toDate)` of each report the task asked for. + type Calls = Arc, Option)>>>; + + /// Builds the report for a query's `fromDate`. + type Answer = dyn Fn(Option<&str>) -> Result + Send + Sync; + + /// Answers every report with `answer(fromDate)` after `delay`. + #[derive(Clone)] + struct FakeReports { + calls: Calls, + delay: Duration, + answer: Arc, + } + + impl FakeReports { + fn new( + delay: Duration, + answer: impl Fn(Option<&str>) -> Result + Send + Sync + 'static, + ) -> Self { + Self { + calls: Arc::default(), + delay, + answer: Arc::new(answer), + } + } + + fn calls(&self) -> Vec<(Option, Option)> { + self.calls.lock().unwrap().clone() + } + } + + impl PnlReports for FakeReports { + async fn report(&self, query: PnlQuery) -> Result { + assert_eq!(query.limit, Some(1)); + self.calls + .lock() + .unwrap() + .push((query.from_date.clone(), query.to_date.clone())); + tokio::time::sleep(self.delay).await; + (self.answer)(query.from_date.as_deref()) + } + } + + fn day(text: &str) -> NaiveDate { + parse_day(text).unwrap() + } + + fn dates(first: &str, last: &str) -> FillDates { + FillDates { + first: day(first), + last: day(last), + } + } + + fn query_dates(from: &str, to: &str) -> (Option, Option) { + (Some(from.to_string()), Some(to.to_string())) + } + + fn collector(families: &'static LiqFamilies, window: PnlWindowKey) -> Option { + rendered_store(families) + .get(&series( + "liq_collector_last_success_ts_seconds", + &[("collector", window.collector())], + )) + .copied() + } + + fn total(families: &'static LiqFamilies, window: PnlWindowKey) -> Option { + rendered_store(families) + .get(&series( + "liq_pnl_summary_usd", + &[("window", window.label()), ("stream", "total")], + )) + .copied() + } + + /// A stored window family worth 99 published at Unix time 100, so a + /// test can tell a kept window from a refreshed one. + fn seed_window(families: &'static LiqFamilies, window: PnlWindowKey) { + families.replace( + LiqFamily::Pnl(window), + vec![ + LiqSample::new( + LiqMetric::PnlSummaryUsd, + vec![ + ("stream", "total".to_string()), + ("window", window.label().to_string()), + ], + 99.0, + ) + .unwrap(), + ], + SystemTime::UNIX_EPOCH + Duration::from_secs(100), + ); + } + + #[test] + fn windows_end_on_the_last_fill_day_and_start_no_earlier_than_the_first() { + let windows = |fill_dates: FillDates| -> BTreeMap<&str, (NaiveDate, NaiveDate)> { + PnlWindowKey::REFRESH_ORDER + .into_iter() + .map(|window| (window.label(), window_dates(window, fill_dates).unwrap())) + .collect() + }; + + let anchor = day("2026-03-03"); + assert_eq!( + windows(dates("2026-02-20", "2026-03-03")), + BTreeMap::from([ + ("1d", (anchor, anchor)), + ("1w", (day("2026-02-25"), anchor)), + ("1m", (day("2026-02-20"), anchor)), + ("ytd", (day("2026-02-20"), anchor)), + ("1y", (day("2026-02-20"), anchor)), + ("all", (day("2026-02-20"), anchor)), + ]) + ); + assert_eq!( + windows(dates("2024-06-01", "2026-03-03")), + BTreeMap::from([ + ("1d", (anchor, anchor)), + ("1w", (day("2026-02-25"), anchor)), + ("1m", (day("2026-02-01"), anchor)), + ("ytd", (day("2026-01-01"), anchor)), + ("1y", (day("2025-03-04"), anchor)), + ("all", (day("2024-06-01"), anchor)), + ]) + ); + } + + #[tokio::test(start_paused = true)] + async fn a_cold_cycle_probes_once_then_reports_each_window_in_order() { + let families = leaked_families(); + let reports = FakeReports::new(Duration::from_secs(1), |_| Ok(pnl_fixture())); + let mut task = LiqPnlRefresh::new(reports.clone(), families); + + task.refresh_once().await; + + let to = "2026-03-03"; + assert_eq!( + reports.calls(), + [ + (None, None), + query_dates("2026-02-25", to), + query_dates(to, to), + query_dates("2026-02-20", to), + query_dates("2026-02-20", to), + query_dates("2026-02-20", to), + query_dates("2026-02-20", to), + ] + ); + for window in PnlWindowKey::REFRESH_ORDER { + assert_eq!(total(families, window), Some(11.5), "{window:?}"); + } + + task.refresh_once().await; + assert_eq!(reports.calls().len(), 13, "a warm cycle skips the probe"); + } + + #[tokio::test(start_paused = true)] + async fn a_failed_window_keeps_its_samples_and_timestamp_while_the_others_refresh() { + let families = leaked_families(); + seed_window(families, PnlWindowKey::OneDay); + let reports = FakeReports::new(Duration::ZERO, |from| { + if from == Some("2026-03-03") { + Err(PnlReportError::CatchUpTimeout) + } else { + Ok(pnl_fixture()) + } + }); + let mut task = LiqPnlRefresh::new(reports, families); + task.dates = Some(dates("2026-02-20", "2026-03-03")); + + task.refresh_once().await; + + assert_eq!(total(families, PnlWindowKey::OneDay), Some(99.0)); + assert_eq!(collector(families, PnlWindowKey::OneDay), Some(100.0)); + assert_eq!(total(families, PnlWindowKey::OneWeek), Some(11.5)); + assert!(collector(families, PnlWindowKey::OneWeek) > Some(100.0)); + } + + #[tokio::test(start_paused = true)] + async fn windows_past_the_budget_keep_their_samples() { + let families = leaked_families(); + for window in PnlWindowKey::REFRESH_ORDER { + seed_window(families, window); + } + let reports = FakeReports::new(Duration::from_secs(50), |_| Ok(pnl_fixture())); + let mut task = LiqPnlRefresh::new(reports.clone(), families); + task.dates = Some(dates("2026-02-20", "2026-03-03")); + + task.refresh_once().await; + + // 1w, 1d and all start at 0 s, 50 s and 100 s; 1m would start at + // 150 s, past the 120 s budget. + assert_eq!(reports.calls().len(), 3); + let refreshed = [ + PnlWindowKey::OneWeek, + PnlWindowKey::OneDay, + PnlWindowKey::All, + ]; + for window in PnlWindowKey::REFRESH_ORDER { + let expected = if refreshed.contains(&window) { + 11.5 + } else { + 99.0 + }; + assert_eq!(total(families, window), Some(expected), "{window:?}"); + } + assert_eq!(collector(families, PnlWindowKey::OneYear), Some(100.0)); + } + + #[tokio::test(start_paused = true)] + async fn without_fills_nothing_is_published_and_the_next_cycle_probes_again() { + let families = leaked_families(); + let reports = FakeReports::new(Duration::ZERO, |_| Ok(report((None, None), Vec::new()))); + let mut task = LiqPnlRefresh::new(reports.clone(), families); + + task.refresh_once().await; + task.refresh_once().await; + + assert_eq!(reports.calls(), [(None, None), (None, None)]); + assert_eq!(rendered_store(families), BTreeMap::new()); + } + + #[tokio::test(start_paused = true)] + async fn a_failed_probe_publishes_nothing() { + let families = leaked_families(); + let reports = FakeReports::new(Duration::ZERO, |_| Err(PnlReportError::CatchUpTimeout)); + let mut task = LiqPnlRefresh::new(reports.clone(), families); + + task.refresh_once().await; + + assert_eq!(reports.calls(), [(None, None)]); + assert_eq!(task.dates, None); + assert_eq!(rendered_store(families), BTreeMap::new()); + } + + /// Each report refreshes the range, so a new fill day moves every window + /// of the next cycle. + #[tokio::test(start_paused = true)] + async fn a_report_with_a_later_fill_day_moves_the_next_cycle() { + let families = leaked_families(); + let later = report( + (Some("2026-02-20"), Some("2026-03-04")), + vec![day_bucket( + "2026-03-04", + vec![day_symbol("RKLB", ["1", "0", "0", "0", "0", "1"])], + )], + ); + let reports = FakeReports::new(Duration::ZERO, move |_| Ok(later.clone())); + let mut task = LiqPnlRefresh::new(reports.clone(), families); + task.dates = Some(dates("2026-02-20", "2026-03-03")); + + task.refresh_once().await; + assert_eq!(task.dates, Some(dates("2026-02-20", "2026-03-04"))); + + task.refresh_once().await; + assert_eq!( + reports.calls()[6..8], + [ + query_dates("2026-02-26", "2026-03-04"), + query_dates("2026-03-04", "2026-03-04"), + ] + ); + } + + #[test] + fn an_unparseable_range_is_not_remembered() { + assert_eq!( + FillDates::of(&report( + (Some("2026-02-30"), Some("2026-03-03")), + Vec::new() + )), + None + ); + assert_eq!( + FillDates::of(&report((Some("2026-02-20"), None), Vec::new())), + None + ); + } +} diff --git a/src/metrics/liquidity/testdata/pnl-days.json b/src/metrics/liquidity/testdata/pnl-days.json new file mode 100644 index 0000000000..0bd025416a --- /dev/null +++ b/src/metrics/liquidity/testdata/pnl-days.json @@ -0,0 +1,2163 @@ +{ + "attributionMethod": "backend_position_fill_replay_fifo", + "asOfRowid": 42, + "warnings": [ + "first", + "second" + ], + "availableRange": { + "firstAt": "2025-12-01T14:30:00Z", + "lastAt": "2026-03-05T15:00:00Z", + "firstDate": "2025-12-01", + "lastDate": "2026-03-05" + }, + "sampleStats": { + "firstAt": "2026-02-20T14:30:00.25Z", + "lastAt": "2026-03-03T15:00:00+00:00", + "symbolCount": 2, + "onchainFillCount": 5, + "offchainFillCount": 4, + "totalFillCount": 9, + "symbols": [] + }, + "summary": { + "counterTradePnlUsd": "12.5", + "onchainNettingPnlUsd": "-3.25", + "directionalInventoryBaselinePnlUsd": "4", + "directionalImbalanceExcessPnlUsd": "-1.75", + "directionalExposurePnlUsd": "2.25", + "totalPnlUsd": "11.5", + "grossRealizedPnlUsd": "20", + "trackedCostsUsd": "14.25", + "trackedRevenueUsd": "n/a", + "netRealizedPnlUsd": "7.25", + "realizedPnlUsd": "11.5", + "matchedShares": "300", + "onchainNotionalUsd": "6000", + "offchainNotionalUsd": "5950.5", + "inventoryDriftShares": "-2", + "inventoryDriftUsd": "-30.5", + "openLongShares": "10", + "openShortShares": "0", + "unmatchedOffchainShares": "1.5", + "unmatchedOffchainNotionalUsd": "22.5", + "onchainFillCount": 5, + "offchainFillCount": 4, + "matchedLotCount": 3, + "openLotCount": 2, + "unmatchedOffchainFillCount": 1 + }, + "costs": { + "totalTrackedCostsUsd": "14.25", + "totalTrackedRevenueUsd": "1.5", + "counterTradeCostsUsd": "9", + "onchainNettingCostsUsd": "0", + "directionalExposureCostsUsd": "0", + "genericCostsUsd": "5.25", + "dividendRevenueUsd": "1.5", + "offchainExecutionFeesUsd": "2", + "tokenizationFeesUsd": "3.5", + "cctpFeesUsd": "0.75", + "conversionSlippageUsd": "0", + "oracleWriteCostUsd": "0", + "brokerFeesUsd": "2", + "regulatoryFeesUsd": "0.01", + "marginInterestUsd": "4", + "botGasUsd": "1.99", + "walletTransferFeesUsd": "0", + "unclassifiedCostsUsd": "2", + "costEntryCount": 7, + "missingCostObservationCount": 2, + "coverage": [ + { + "source": "tokenization_fees", + "accountingBucket": "generic", + "effect": "cost", + "status": "included", + "amountUsd": "0", + "note": "fixture" + }, + { + "source": "wallet_transfer_fees", + "accountingBucket": "generic", + "effect": "cost", + "status": "not_ingested", + "amountUsd": "0", + "note": "fixture" + } + ] + }, + "capital": { + "averageDeployedCapitalUsd": "12500.5", + "annualizedReturnPct": null, + "coverageDays": 3, + "sampleDays": 3, + "firstSnapshotDay": "2026-03-01", + "lastSnapshotDay": "2026-03-03", + "excludedDays": [] + }, + "symbols": [ + { + "symbol": "tAAPL", + "counterTradePnlUsd": "10", + "onchainNettingPnlUsd": "-1", + "directionalInventoryBaselinePnlUsd": "3", + "directionalImbalanceExcessPnlUsd": "-1.5", + "directionalExposurePnlUsd": "1.5", + "totalPnlUsd": "10.5", + "grossRealizedPnlUsd": "15", + "trackedCostsUsd": "6", + "trackedRevenueUsd": "1", + "netRealizedPnlUsd": "10", + "realizedPnlUsd": "10.5", + "matchedShares": "200", + "inventoryDriftShares": "-1", + "inventoryDriftUsd": "-15.25", + "openLongShares": "8", + "openShortShares": "0", + "unmatchedOffchainShares": "1.5", + "matchedLotCount": 2, + "onchainFillCount": 2, + "offchainFillCount": 2, + "unmatchedOffchainFillCount": 0 + }, + { + "symbol": "RKLB", + "counterTradePnlUsd": "2.5", + "onchainNettingPnlUsd": "-2.25", + "directionalInventoryBaselinePnlUsd": "1", + "directionalImbalanceExcessPnlUsd": "-0.25", + "directionalExposurePnlUsd": "0.75", + "totalPnlUsd": "1", + "grossRealizedPnlUsd": "5", + "trackedCostsUsd": "8.25", + "trackedRevenueUsd": "0.5", + "netRealizedPnlUsd": "-2.75", + "realizedPnlUsd": "1", + "matchedShares": "", + "inventoryDriftShares": "-1", + "inventoryDriftUsd": "-15.25", + "openLongShares": "2", + "openShortShares": "0", + "unmatchedOffchainShares": "0", + "matchedLotCount": 1, + "onchainFillCount": 1, + "offchainFillCount": 1, + "unmatchedOffchainFillCount": 0 + } + ], + "symbolUniverse": [ + "RKLB", + "tAAPL" + ], + "entries": [], + "costEntries": [], + "total": 3, + "hasMore": true, + "windows": [ + { + "windowId": "2025-12-01", + "startAt": "2025-12-01T05:00:00.000Z", + "endAt": "2025-12-01T04:59:59.999Z", + "label": "2025-12-01", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "0.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "0.5" + }, + { + "symbol": "RKLB", + "counterTradePnlUsd": "3", + "onchainNettingPnlUsd": "0", + "directionalInventoryBaselinePnlUsd": "0", + "directionalImbalanceExcessPnlUsd": "0", + "directionalExposurePnlUsd": "0", + "totalPnlUsd": "3" + } + ] + }, + { + "windowId": "2025-12-02", + "startAt": "2025-12-02T05:00:00.000Z", + "endAt": "2025-12-02T04:59:59.999Z", + "label": "2025-12-02", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "1.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "1.5" + } + ] + }, + { + "windowId": "2025-12-03", + "startAt": "2025-12-03T05:00:00.000Z", + "endAt": "2025-12-03T04:59:59.999Z", + "label": "2025-12-03", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "2.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "2.5" + } + ] + }, + { + "windowId": "2025-12-04", + "startAt": "2025-12-04T05:00:00.000Z", + "endAt": "2025-12-04T04:59:59.999Z", + "label": "2025-12-04", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "3.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "3.5" + } + ] + }, + { + "windowId": "2025-12-05", + "startAt": "2025-12-05T05:00:00.000Z", + "endAt": "2025-12-05T04:59:59.999Z", + "label": "2025-12-05", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "4.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "4.5" + } + ] + }, + { + "windowId": "2025-12-06", + "startAt": "2025-12-06T05:00:00.000Z", + "endAt": "2025-12-06T04:59:59.999Z", + "label": "2025-12-06", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "5.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "5.5" + } + ] + }, + { + "windowId": "2025-12-07", + "startAt": "2025-12-07T05:00:00.000Z", + "endAt": "2025-12-07T04:59:59.999Z", + "label": "2025-12-07", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "6.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "6.5" + } + ] + }, + { + "windowId": "2025-12-08", + "startAt": "2025-12-08T05:00:00.000Z", + "endAt": "2025-12-08T04:59:59.999Z", + "label": "2025-12-08", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "7.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "7.5" + } + ] + }, + { + "windowId": "2025-12-09", + "startAt": "2025-12-09T05:00:00.000Z", + "endAt": "2025-12-09T04:59:59.999Z", + "label": "2025-12-09", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "8.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "8.5" + } + ] + }, + { + "windowId": "2025-12-10", + "startAt": "2025-12-10T05:00:00.000Z", + "endAt": "2025-12-10T04:59:59.999Z", + "label": "2025-12-10", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "9.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "9.5" + } + ] + }, + { + "windowId": "2025-12-11", + "startAt": "2025-12-11T05:00:00.000Z", + "endAt": "2025-12-11T04:59:59.999Z", + "label": "2025-12-11", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "10.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "10.5" + } + ] + }, + { + "windowId": "2025-12-12", + "startAt": "2025-12-12T05:00:00.000Z", + "endAt": "2025-12-12T04:59:59.999Z", + "label": "2025-12-12", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "11.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "11.5" + } + ] + }, + { + "windowId": "2025-12-13", + "startAt": "2025-12-13T05:00:00.000Z", + "endAt": "2025-12-13T04:59:59.999Z", + "label": "2025-12-13", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "12.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "12.5" + } + ] + }, + { + "windowId": "2025-12-14", + "startAt": "2025-12-14T05:00:00.000Z", + "endAt": "2025-12-14T04:59:59.999Z", + "label": "2025-12-14", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "13.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "13.5" + } + ] + }, + { + "windowId": "2025-12-15", + "startAt": "2025-12-15T05:00:00.000Z", + "endAt": "2025-12-15T04:59:59.999Z", + "label": "2025-12-15", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "14.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "14.5" + } + ] + }, + { + "windowId": "2025-12-16", + "startAt": "2025-12-16T05:00:00.000Z", + "endAt": "2025-12-16T04:59:59.999Z", + "label": "2025-12-16", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "15.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "15.5" + } + ] + }, + { + "windowId": "2025-12-17", + "startAt": "2025-12-17T05:00:00.000Z", + "endAt": "2025-12-17T04:59:59.999Z", + "label": "2025-12-17", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "16.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "16.5" + } + ] + }, + { + "windowId": "2025-12-18", + "startAt": "2025-12-18T05:00:00.000Z", + "endAt": "2025-12-18T04:59:59.999Z", + "label": "2025-12-18", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "17.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "17.5" + } + ] + }, + { + "windowId": "2025-12-19", + "startAt": "2025-12-19T05:00:00.000Z", + "endAt": "2025-12-19T04:59:59.999Z", + "label": "2025-12-19", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "18.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "18.5" + } + ] + }, + { + "windowId": "2025-12-20", + "startAt": "2025-12-20T05:00:00.000Z", + "endAt": "2025-12-20T04:59:59.999Z", + "label": "2025-12-20", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "19.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "19.5" + } + ] + }, + { + "windowId": "2025-12-21", + "startAt": "2025-12-21T05:00:00.000Z", + "endAt": "2025-12-21T04:59:59.999Z", + "label": "2025-12-21", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "20.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "20.5" + } + ] + }, + { + "windowId": "2025-12-22", + "startAt": "2025-12-22T05:00:00.000Z", + "endAt": "2025-12-22T04:59:59.999Z", + "label": "2025-12-22", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "21.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "21.5" + } + ] + }, + { + "windowId": "2025-12-23", + "startAt": "2025-12-23T05:00:00.000Z", + "endAt": "2025-12-23T04:59:59.999Z", + "label": "2025-12-23", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "22.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "22.5" + } + ] + }, + { + "windowId": "2025-12-24", + "startAt": "2025-12-24T05:00:00.000Z", + "endAt": "2025-12-24T04:59:59.999Z", + "label": "2025-12-24", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "23.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "23.5" + } + ] + }, + { + "windowId": "2025-12-25", + "startAt": "2025-12-25T05:00:00.000Z", + "endAt": "2025-12-25T04:59:59.999Z", + "label": "2025-12-25", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "24.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "24.5" + } + ] + }, + { + "windowId": "2025-12-26", + "startAt": "2025-12-26T05:00:00.000Z", + "endAt": "2025-12-26T04:59:59.999Z", + "label": "2025-12-26", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "25.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "25.5" + } + ] + }, + { + "windowId": "2025-12-27", + "startAt": "2025-12-27T05:00:00.000Z", + "endAt": "2025-12-27T04:59:59.999Z", + "label": "2025-12-27", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "26.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "26.5" + } + ] + }, + { + "windowId": "2025-12-28", + "startAt": "2025-12-28T05:00:00.000Z", + "endAt": "2025-12-28T04:59:59.999Z", + "label": "2025-12-28", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "27.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "27.5" + } + ] + }, + { + "windowId": "2025-12-29", + "startAt": "2025-12-29T05:00:00.000Z", + "endAt": "2025-12-29T04:59:59.999Z", + "label": "2025-12-29", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "28.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "28.5" + } + ] + }, + { + "windowId": "2025-12-30", + "startAt": "2025-12-30T05:00:00.000Z", + "endAt": "2025-12-30T04:59:59.999Z", + "label": "2025-12-30", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "29.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "29.5" + } + ] + }, + { + "windowId": "2025-12-31", + "startAt": "2025-12-31T05:00:00.000Z", + "endAt": "2025-12-31T04:59:59.999Z", + "label": "2025-12-31", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "30.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "30.5" + } + ] + }, + { + "windowId": "2026-01-01", + "startAt": "2026-01-01T05:00:00.000Z", + "endAt": "2026-01-01T04:59:59.999Z", + "label": "2026-01-01", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "31.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "31.5" + } + ] + }, + { + "windowId": "2026-01-02", + "startAt": "2026-01-02T05:00:00.000Z", + "endAt": "2026-01-02T04:59:59.999Z", + "label": "2026-01-02", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "32.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "32.5" + } + ] + }, + { + "windowId": "2026-01-03", + "startAt": "2026-01-03T05:00:00.000Z", + "endAt": "2026-01-03T04:59:59.999Z", + "label": "2026-01-03", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "33.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "33.5" + } + ] + }, + { + "windowId": "2026-01-04", + "startAt": "2026-01-04T05:00:00.000Z", + "endAt": "2026-01-04T04:59:59.999Z", + "label": "2026-01-04", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "34.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "34.5" + } + ] + }, + { + "windowId": "2026-01-05", + "startAt": "2026-01-05T05:00:00.000Z", + "endAt": "2026-01-05T04:59:59.999Z", + "label": "2026-01-05", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "35.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "35.5" + } + ] + }, + { + "windowId": "2026-01-06", + "startAt": "2026-01-06T05:00:00.000Z", + "endAt": "2026-01-06T04:59:59.999Z", + "label": "2026-01-06", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "36.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "36.5" + } + ] + }, + { + "windowId": "2026-01-07", + "startAt": "2026-01-07T05:00:00.000Z", + "endAt": "2026-01-07T04:59:59.999Z", + "label": "2026-01-07", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "37.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "37.5" + } + ] + }, + { + "windowId": "2026-01-08", + "startAt": "2026-01-08T05:00:00.000Z", + "endAt": "2026-01-08T04:59:59.999Z", + "label": "2026-01-08", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "38.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "38.5" + } + ] + }, + { + "windowId": "2026-01-09", + "startAt": "2026-01-09T05:00:00.000Z", + "endAt": "2026-01-09T04:59:59.999Z", + "label": "2026-01-09", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "39.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "39.5" + } + ] + }, + { + "windowId": "2026-01-10", + "startAt": "2026-01-10T05:00:00.000Z", + "endAt": "2026-01-10T04:59:59.999Z", + "label": "2026-01-10", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "40.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "40.5" + } + ] + }, + { + "windowId": "2026-01-11", + "startAt": "2026-01-11T05:00:00.000Z", + "endAt": "2026-01-11T04:59:59.999Z", + "label": "2026-01-11", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "41.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "41.5" + } + ] + }, + { + "windowId": "2026-01-12", + "startAt": "2026-01-12T05:00:00.000Z", + "endAt": "2026-01-12T04:59:59.999Z", + "label": "2026-01-12", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "42.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "42.5" + } + ] + }, + { + "windowId": "2026-01-13", + "startAt": "2026-01-13T05:00:00.000Z", + "endAt": "2026-01-13T04:59:59.999Z", + "label": "2026-01-13", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "43.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "43.5" + } + ] + }, + { + "windowId": "2026-01-14", + "startAt": "2026-01-14T05:00:00.000Z", + "endAt": "2026-01-14T04:59:59.999Z", + "label": "2026-01-14", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "44.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "44.5" + } + ] + }, + { + "windowId": "2026-01-15", + "startAt": "2026-01-15T05:00:00.000Z", + "endAt": "2026-01-15T04:59:59.999Z", + "label": "2026-01-15", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "45.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "45.5" + } + ] + }, + { + "windowId": "2026-01-16", + "startAt": "2026-01-16T05:00:00.000Z", + "endAt": "2026-01-16T04:59:59.999Z", + "label": "2026-01-16", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "46.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "46.5" + } + ] + }, + { + "windowId": "2026-01-17", + "startAt": "2026-01-17T05:00:00.000Z", + "endAt": "2026-01-17T04:59:59.999Z", + "label": "2026-01-17", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "47.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "47.5" + } + ] + }, + { + "windowId": "2026-01-18", + "startAt": "2026-01-18T05:00:00.000Z", + "endAt": "2026-01-18T04:59:59.999Z", + "label": "2026-01-18", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "48.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "48.5" + } + ] + }, + { + "windowId": "2026-01-19", + "startAt": "2026-01-19T05:00:00.000Z", + "endAt": "2026-01-19T04:59:59.999Z", + "label": "2026-01-19", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "49.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "49.5" + } + ] + }, + { + "windowId": "2026-01-20", + "startAt": "2026-01-20T05:00:00.000Z", + "endAt": "2026-01-20T04:59:59.999Z", + "label": "2026-01-20", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "50.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "50.5" + } + ] + }, + { + "windowId": "2026-01-21", + "startAt": "2026-01-21T05:00:00.000Z", + "endAt": "2026-01-21T04:59:59.999Z", + "label": "2026-01-21", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "51.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "51.5" + } + ] + }, + { + "windowId": "2026-01-22", + "startAt": "2026-01-22T05:00:00.000Z", + "endAt": "2026-01-22T04:59:59.999Z", + "label": "2026-01-22", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "52.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "52.5" + } + ] + }, + { + "windowId": "2026-01-23", + "startAt": "2026-01-23T05:00:00.000Z", + "endAt": "2026-01-23T04:59:59.999Z", + "label": "2026-01-23", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "53.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "53.5" + } + ] + }, + { + "windowId": "2026-01-24", + "startAt": "2026-01-24T05:00:00.000Z", + "endAt": "2026-01-24T04:59:59.999Z", + "label": "2026-01-24", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "54.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "54.5" + } + ] + }, + { + "windowId": "2026-01-25", + "startAt": "2026-01-25T05:00:00.000Z", + "endAt": "2026-01-25T04:59:59.999Z", + "label": "2026-01-25", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "55.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "55.5" + } + ] + }, + { + "windowId": "2026-01-26", + "startAt": "2026-01-26T05:00:00.000Z", + "endAt": "2026-01-26T04:59:59.999Z", + "label": "2026-01-26", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "56.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "56.5" + } + ] + }, + { + "windowId": "2026-01-27", + "startAt": "2026-01-27T05:00:00.000Z", + "endAt": "2026-01-27T04:59:59.999Z", + "label": "2026-01-27", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "57.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "57.5" + } + ] + }, + { + "windowId": "2026-01-28", + "startAt": "2026-01-28T05:00:00.000Z", + "endAt": "2026-01-28T04:59:59.999Z", + "label": "2026-01-28", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "58.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "58.5" + } + ] + }, + { + "windowId": "2026-01-29", + "startAt": "2026-01-29T05:00:00.000Z", + "endAt": "2026-01-29T04:59:59.999Z", + "label": "2026-01-29", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "59.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "59.5" + } + ] + }, + { + "windowId": "2026-01-30", + "startAt": "2026-01-30T05:00:00.000Z", + "endAt": "2026-01-30T04:59:59.999Z", + "label": "2026-01-30", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "60.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "60.5" + } + ] + }, + { + "windowId": "2026-01-31", + "startAt": "2026-01-31T05:00:00.000Z", + "endAt": "2026-01-31T04:59:59.999Z", + "label": "2026-01-31", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "61.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "61.5" + } + ] + }, + { + "windowId": "2026-02-01", + "startAt": "2026-02-01T05:00:00.000Z", + "endAt": "2026-02-01T04:59:59.999Z", + "label": "2026-02-01", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "62.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "62.5" + } + ] + }, + { + "windowId": "2026-02-02", + "startAt": "2026-02-02T05:00:00.000Z", + "endAt": "2026-02-02T04:59:59.999Z", + "label": "2026-02-02", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "63.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "63.5" + } + ] + }, + { + "windowId": "2026-02-03", + "startAt": "2026-02-03T05:00:00.000Z", + "endAt": "2026-02-03T04:59:59.999Z", + "label": "2026-02-03", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "64.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "64.5" + } + ] + }, + { + "windowId": "2026-02-04", + "startAt": "2026-02-04T05:00:00.000Z", + "endAt": "2026-02-04T04:59:59.999Z", + "label": "2026-02-04", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "65.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "65.5" + } + ] + }, + { + "windowId": "2026-02-05", + "startAt": "2026-02-05T05:00:00.000Z", + "endAt": "2026-02-05T04:59:59.999Z", + "label": "2026-02-05", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "66.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "66.5" + } + ] + }, + { + "windowId": "2026-02-06", + "startAt": "2026-02-06T05:00:00.000Z", + "endAt": "2026-02-06T04:59:59.999Z", + "label": "2026-02-06", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "67.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "67.5" + } + ] + }, + { + "windowId": "2026-02-07", + "startAt": "2026-02-07T05:00:00.000Z", + "endAt": "2026-02-07T04:59:59.999Z", + "label": "2026-02-07", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "68.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "68.5" + } + ] + }, + { + "windowId": "2026-02-08", + "startAt": "2026-02-08T05:00:00.000Z", + "endAt": "2026-02-08T04:59:59.999Z", + "label": "2026-02-08", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "69.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "69.5" + } + ] + }, + { + "windowId": "2026-02-09", + "startAt": "2026-02-09T05:00:00.000Z", + "endAt": "2026-02-09T04:59:59.999Z", + "label": "2026-02-09", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "70.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "70.5" + } + ] + }, + { + "windowId": "2026-02-10", + "startAt": "2026-02-10T05:00:00.000Z", + "endAt": "2026-02-10T04:59:59.999Z", + "label": "2026-02-10", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "71.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "71.5" + } + ] + }, + { + "windowId": "2026-02-11", + "startAt": "2026-02-11T05:00:00.000Z", + "endAt": "2026-02-11T04:59:59.999Z", + "label": "2026-02-11", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "72.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "72.5" + } + ] + }, + { + "windowId": "2026-02-12", + "startAt": "2026-02-12T05:00:00.000Z", + "endAt": "2026-02-12T04:59:59.999Z", + "label": "2026-02-12", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "73.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "73.5" + } + ] + }, + { + "windowId": "2026-02-13", + "startAt": "2026-02-13T05:00:00.000Z", + "endAt": "2026-02-13T04:59:59.999Z", + "label": "2026-02-13", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "74.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "74.5" + } + ] + }, + { + "windowId": "2026-02-14", + "startAt": "2026-02-14T05:00:00.000Z", + "endAt": "2026-02-14T04:59:59.999Z", + "label": "2026-02-14", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "75.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "75.5" + } + ] + }, + { + "windowId": "2026-02-15", + "startAt": "2026-02-15T05:00:00.000Z", + "endAt": "2026-02-15T04:59:59.999Z", + "label": "2026-02-15", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "76.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "76.5" + } + ] + }, + { + "windowId": "2026-02-16", + "startAt": "2026-02-16T05:00:00.000Z", + "endAt": "2026-02-16T04:59:59.999Z", + "label": "2026-02-16", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "77.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "77.5" + } + ] + }, + { + "windowId": "2026-02-17", + "startAt": "2026-02-17T05:00:00.000Z", + "endAt": "2026-02-17T04:59:59.999Z", + "label": "2026-02-17", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "78.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "78.5" + } + ] + }, + { + "windowId": "2026-02-18", + "startAt": "2026-02-18T05:00:00.000Z", + "endAt": "2026-02-18T04:59:59.999Z", + "label": "2026-02-18", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "79.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "79.5" + } + ] + }, + { + "windowId": "2026-02-19", + "startAt": "2026-02-19T05:00:00.000Z", + "endAt": "2026-02-19T04:59:59.999Z", + "label": "2026-02-19", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "80.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "80.5" + } + ] + }, + { + "windowId": "2026-02-20", + "startAt": "2026-02-20T05:00:00.000Z", + "endAt": "2026-02-20T04:59:59.999Z", + "label": "2026-02-20", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "81.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "81.5" + } + ] + }, + { + "windowId": "2026-02-21", + "startAt": "2026-02-21T05:00:00.000Z", + "endAt": "2026-02-21T04:59:59.999Z", + "label": "2026-02-21", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "82.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "82.5" + } + ] + }, + { + "windowId": "2026-02-22", + "startAt": "2026-02-22T05:00:00.000Z", + "endAt": "2026-02-22T04:59:59.999Z", + "label": "2026-02-22", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "83.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "83.5" + } + ] + }, + { + "windowId": "2026-02-23", + "startAt": "2026-02-23T05:00:00.000Z", + "endAt": "2026-02-23T04:59:59.999Z", + "label": "2026-02-23", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "84.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "84.5" + } + ] + }, + { + "windowId": "2026-02-24", + "startAt": "2026-02-24T05:00:00.000Z", + "endAt": "2026-02-24T04:59:59.999Z", + "label": "2026-02-24", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "85.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "85.5" + } + ] + }, + { + "windowId": "2026-02-25", + "startAt": "2026-02-25T05:00:00.000Z", + "endAt": "2026-02-25T04:59:59.999Z", + "label": "2026-02-25", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "86.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "86.5" + } + ] + }, + { + "windowId": "2026-02-26", + "startAt": "2026-02-26T05:00:00.000Z", + "endAt": "2026-02-26T04:59:59.999Z", + "label": "2026-02-26", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "87.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "87.5" + } + ] + }, + { + "windowId": "2026-02-27", + "startAt": "2026-02-27T05:00:00.000Z", + "endAt": "2026-02-27T04:59:59.999Z", + "label": "2026-02-27", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "88.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "88.5" + } + ] + }, + { + "windowId": "2026-02-28", + "startAt": "2026-02-28T05:00:00.000Z", + "endAt": "2026-02-28T04:59:59.999Z", + "label": "2026-02-28", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "89.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "89.5" + } + ] + }, + { + "windowId": "2026-03-01", + "startAt": "2026-03-01T05:00:00.000Z", + "endAt": "2026-03-01T04:59:59.999Z", + "label": "2026-03-01", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "90.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "90.5" + } + ] + }, + { + "windowId": "2026-03-02", + "startAt": "2026-03-02T05:00:00.000Z", + "endAt": "2026-03-02T04:59:59.999Z", + "label": "2026-03-02", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "91.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "91.5" + } + ] + }, + { + "windowId": "2026-03-03", + "startAt": "2026-03-03T05:00:00.000Z", + "endAt": "2026-03-03T04:59:59.999Z", + "label": "2026-03-03", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "92.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "92.5" + } + ] + }, + { + "windowId": "2026-03-04", + "startAt": "2026-03-04T05:00:00.000Z", + "endAt": "2026-03-04T04:59:59.999Z", + "label": "2026-03-04", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "93.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "93.5" + } + ] + }, + { + "windowId": "2026-03-05", + "startAt": "2026-03-05T05:00:00.000Z", + "endAt": "2026-03-05T04:59:59.999Z", + "label": "2026-03-05", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tTSLA", + "counterTradePnlUsd": "94.5", + "onchainNettingPnlUsd": "0.25", + "directionalInventoryBaselinePnlUsd": "-0.5", + "directionalImbalanceExcessPnlUsd": "0.125", + "directionalExposurePnlUsd": "-0.375", + "totalPnlUsd": "94.5" + } + ] + } + ] +} diff --git a/src/metrics/liquidity/testdata/pnl-days.prom b/src/metrics/liquidity/testdata/pnl-days.prom new file mode 100644 index 0000000000..76134ea0bb --- /dev/null +++ b/src/metrics/liquidity/testdata/pnl-days.prom @@ -0,0 +1,1070 @@ +# Expected exporter output for pnl-days.json, written by +# scripts/liq-parity/golden.py from t0.devops revision 226c029. +liq_pnl_summary_usd{stream="counter_trade",window="all"} 12.5 +liq_pnl_summary_usd{stream="onchain_netting",window="all"} -3.25 +liq_pnl_summary_usd{stream="directional_inventory_baseline",window="all"} 4.0 +liq_pnl_summary_usd{stream="directional_imbalance_excess",window="all"} -1.75 +liq_pnl_summary_usd{stream="directional_exposure",window="all"} 2.25 +liq_pnl_summary_usd{stream="total",window="all"} 11.5 +liq_pnl_summary_usd{stream="gross_realized",window="all"} 20.0 +liq_pnl_summary_usd{stream="tracked_costs",window="all"} 14.25 +liq_pnl_summary_usd{stream="net_realized",window="all"} 7.25 +liq_pnl_summary_usd{stream="realized",window="all"} 11.5 +liq_pnl_cost_usd{category="broker_fees",window="all"} 2.0 +liq_pnl_cost_usd{category="tokenization_fees",window="all"} 3.5 +liq_pnl_cost_usd{category="cctp_fees",window="all"} 0.75 +liq_pnl_cost_usd{category="bot_gas",window="all"} 1.99 +liq_pnl_cost_usd{category="margin_interest",window="all"} 4.0 +liq_pnl_cost_usd{category="wallet_transfer_fees",window="all"} 0.0 +liq_pnl_cost_usd{category="regulatory_fees",window="all"} 0.01 +liq_pnl_cost_usd{category="unclassified",window="all"} 2.0 +liq_pnl_revenue_usd{category="dividend_income",window="all"} 1.5 +liq_pnl_cost_entries{window="all"} 7.0 +liq_pnl_cost_missing_observations{window="all"} 2.0 +liq_pnl_cost_coverage{source="tokenization_fees",status="included",window="all"} 1.0 +liq_pnl_cost_coverage{source="wallet_transfer_fees",status="not_ingested",window="all"} 1.0 +liq_pnl_summary_shares{kind="matched",window="all"} 300.0 +liq_pnl_summary_shares{kind="inventory_drift",window="all"} -2.0 +liq_pnl_summary_shares{kind="open_long",window="all"} 10.0 +liq_pnl_summary_shares{kind="open_short",window="all"} 0.0 +liq_pnl_summary_shares{kind="unmatched_offchain",window="all"} 1.5 +liq_pnl_summary_count{kind="onchain_fill",window="all"} 5.0 +liq_pnl_summary_count{kind="offchain_fill",window="all"} 4.0 +liq_pnl_summary_count{kind="matched_lot",window="all"} 3.0 +liq_pnl_summary_count{kind="open_lot",window="all"} 2.0 +liq_pnl_summary_count{kind="unmatched_offchain_fill",window="all"} 1.0 +liq_pnl_summary_usd{stream="inventory_drift",window="all"} -30.5 +liq_pnl_summary_usd{stream="onchain_notional",window="all"} 6000.0 +liq_pnl_summary_usd{stream="offchain_notional",window="all"} 5950.5 +liq_pnl_capital_avg_deployed_usd{window="all"} 12500.5 +liq_pnl_capital_coverage_days{window="all"} 3.0 +liq_pnl_capital_sample_days{window="all"} 3.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="AAPL",window="all"} 10.0 +liq_pnl_symbol_usd{col="onchain_netting",symbol="AAPL",window="all"} -1.0 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="AAPL",window="all"} 3.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="AAPL",window="all"} -1.5 +liq_pnl_symbol_usd{col="directional_exposure",symbol="AAPL",window="all"} 1.5 +liq_pnl_symbol_usd{col="total",symbol="AAPL",window="all"} 10.5 +liq_pnl_symbol_usd{col="gross_realized",symbol="AAPL",window="all"} 15.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="AAPL",window="all"} 6.0 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="AAPL",window="all"} 1.0 +liq_pnl_symbol_usd{col="net_realized",symbol="AAPL",window="all"} 10.0 +liq_pnl_symbol_usd{col="realized",symbol="AAPL",window="all"} 10.5 +liq_pnl_symbol_usd{col="inventory_drift",symbol="AAPL",window="all"} -15.25 +liq_pnl_symbol_shares{kind="matched",symbol="AAPL",window="all"} 200.0 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="AAPL",window="all"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="AAPL",window="all"} 8.0 +liq_pnl_symbol_shares{kind="open_short",symbol="AAPL",window="all"} 0.0 +liq_pnl_symbol_lots{symbol="AAPL",window="all"} 2.0 +liq_pnl_symbol_volume_shares{symbol="AAPL",window="all"} 400.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="RKLB",window="all"} 2.5 +liq_pnl_symbol_usd{col="onchain_netting",symbol="RKLB",window="all"} -2.25 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="RKLB",window="all"} 1.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="RKLB",window="all"} -0.25 +liq_pnl_symbol_usd{col="directional_exposure",symbol="RKLB",window="all"} 0.75 +liq_pnl_symbol_usd{col="total",symbol="RKLB",window="all"} 1.0 +liq_pnl_symbol_usd{col="gross_realized",symbol="RKLB",window="all"} 5.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="RKLB",window="all"} 8.25 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="RKLB",window="all"} 0.5 +liq_pnl_symbol_usd{col="net_realized",symbol="RKLB",window="all"} -2.75 +liq_pnl_symbol_usd{col="realized",symbol="RKLB",window="all"} 1.0 +liq_pnl_symbol_usd{col="inventory_drift",symbol="RKLB",window="all"} -15.25 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="RKLB",window="all"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="RKLB",window="all"} 2.0 +liq_pnl_symbol_shares{kind="open_short",symbol="RKLB",window="all"} 0.0 +liq_pnl_symbol_lots{symbol="RKLB",window="all"} 1.0 +liq_pnl_sample_total_fills{window="all"} 9.0 +liq_pnl_sample_symbols{window="all"} 2.0 +liq_pnl_sample_first_ts_seconds{window="all"} 1771597800.25 +liq_pnl_sample_last_ts_seconds{window="all"} 1772550000.0 +liq_pnl_warnings{window="all"} 2.0 +liq_pnl_day_usd{day="2025-12-06",symbol="TSLA",window="all"} 5.5 +liq_pnl_day_cum_usd{day="2025-12-06",symbol="TSLA",window="all"} 18.0 +liq_pnl_day_cum_usd{day="2025-12-06",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-06",stream="counter_trade",window="all"} 5.5 +liq_pnl_day_stream_usd{day="2025-12-06",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-06",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-06",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-06",stream="counter_trade",window="all"} 21.0 +liq_pnl_day_cum_stream_usd{day="2025-12-06",stream="onchain_netting",window="all"} 1.5 +liq_pnl_day_cum_stream_usd{day="2025-12-06",stream="directional_inventory_baseline",window="all"} -3.0 +liq_pnl_day_cum_stream_usd{day="2025-12-06",stream="directional_imbalance_excess",window="all"} 0.75 +liq_pnl_day_usd{day="2025-12-07",symbol="TSLA",window="all"} 6.5 +liq_pnl_day_cum_usd{day="2025-12-07",symbol="TSLA",window="all"} 24.5 +liq_pnl_day_cum_usd{day="2025-12-07",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-07",stream="counter_trade",window="all"} 6.5 +liq_pnl_day_stream_usd{day="2025-12-07",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-07",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-07",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-07",stream="counter_trade",window="all"} 27.5 +liq_pnl_day_cum_stream_usd{day="2025-12-07",stream="onchain_netting",window="all"} 1.75 +liq_pnl_day_cum_stream_usd{day="2025-12-07",stream="directional_inventory_baseline",window="all"} -3.5 +liq_pnl_day_cum_stream_usd{day="2025-12-07",stream="directional_imbalance_excess",window="all"} 0.875 +liq_pnl_day_usd{day="2025-12-08",symbol="TSLA",window="all"} 7.5 +liq_pnl_day_cum_usd{day="2025-12-08",symbol="TSLA",window="all"} 32.0 +liq_pnl_day_cum_usd{day="2025-12-08",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-08",stream="counter_trade",window="all"} 7.5 +liq_pnl_day_stream_usd{day="2025-12-08",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-08",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-08",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-08",stream="counter_trade",window="all"} 35.0 +liq_pnl_day_cum_stream_usd{day="2025-12-08",stream="onchain_netting",window="all"} 2.0 +liq_pnl_day_cum_stream_usd{day="2025-12-08",stream="directional_inventory_baseline",window="all"} -4.0 +liq_pnl_day_cum_stream_usd{day="2025-12-08",stream="directional_imbalance_excess",window="all"} 1.0 +liq_pnl_day_usd{day="2025-12-09",symbol="TSLA",window="all"} 8.5 +liq_pnl_day_cum_usd{day="2025-12-09",symbol="TSLA",window="all"} 40.5 +liq_pnl_day_cum_usd{day="2025-12-09",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-09",stream="counter_trade",window="all"} 8.5 +liq_pnl_day_stream_usd{day="2025-12-09",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-09",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-09",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-09",stream="counter_trade",window="all"} 43.5 +liq_pnl_day_cum_stream_usd{day="2025-12-09",stream="onchain_netting",window="all"} 2.25 +liq_pnl_day_cum_stream_usd{day="2025-12-09",stream="directional_inventory_baseline",window="all"} -4.5 +liq_pnl_day_cum_stream_usd{day="2025-12-09",stream="directional_imbalance_excess",window="all"} 1.125 +liq_pnl_day_usd{day="2025-12-10",symbol="TSLA",window="all"} 9.5 +liq_pnl_day_cum_usd{day="2025-12-10",symbol="TSLA",window="all"} 50.0 +liq_pnl_day_cum_usd{day="2025-12-10",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-10",stream="counter_trade",window="all"} 9.5 +liq_pnl_day_stream_usd{day="2025-12-10",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-10",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-10",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-10",stream="counter_trade",window="all"} 53.0 +liq_pnl_day_cum_stream_usd{day="2025-12-10",stream="onchain_netting",window="all"} 2.5 +liq_pnl_day_cum_stream_usd{day="2025-12-10",stream="directional_inventory_baseline",window="all"} -5.0 +liq_pnl_day_cum_stream_usd{day="2025-12-10",stream="directional_imbalance_excess",window="all"} 1.25 +liq_pnl_day_usd{day="2025-12-11",symbol="TSLA",window="all"} 10.5 +liq_pnl_day_cum_usd{day="2025-12-11",symbol="TSLA",window="all"} 60.5 +liq_pnl_day_cum_usd{day="2025-12-11",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-11",stream="counter_trade",window="all"} 10.5 +liq_pnl_day_stream_usd{day="2025-12-11",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-11",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-11",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-11",stream="counter_trade",window="all"} 63.5 +liq_pnl_day_cum_stream_usd{day="2025-12-11",stream="onchain_netting",window="all"} 2.75 +liq_pnl_day_cum_stream_usd{day="2025-12-11",stream="directional_inventory_baseline",window="all"} -5.5 +liq_pnl_day_cum_stream_usd{day="2025-12-11",stream="directional_imbalance_excess",window="all"} 1.375 +liq_pnl_day_usd{day="2025-12-12",symbol="TSLA",window="all"} 11.5 +liq_pnl_day_cum_usd{day="2025-12-12",symbol="TSLA",window="all"} 72.0 +liq_pnl_day_cum_usd{day="2025-12-12",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-12",stream="counter_trade",window="all"} 11.5 +liq_pnl_day_stream_usd{day="2025-12-12",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-12",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-12",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-12",stream="counter_trade",window="all"} 75.0 +liq_pnl_day_cum_stream_usd{day="2025-12-12",stream="onchain_netting",window="all"} 3.0 +liq_pnl_day_cum_stream_usd{day="2025-12-12",stream="directional_inventory_baseline",window="all"} -6.0 +liq_pnl_day_cum_stream_usd{day="2025-12-12",stream="directional_imbalance_excess",window="all"} 1.5 +liq_pnl_day_usd{day="2025-12-13",symbol="TSLA",window="all"} 12.5 +liq_pnl_day_cum_usd{day="2025-12-13",symbol="TSLA",window="all"} 84.5 +liq_pnl_day_cum_usd{day="2025-12-13",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-13",stream="counter_trade",window="all"} 12.5 +liq_pnl_day_stream_usd{day="2025-12-13",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-13",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-13",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-13",stream="counter_trade",window="all"} 87.5 +liq_pnl_day_cum_stream_usd{day="2025-12-13",stream="onchain_netting",window="all"} 3.25 +liq_pnl_day_cum_stream_usd{day="2025-12-13",stream="directional_inventory_baseline",window="all"} -6.5 +liq_pnl_day_cum_stream_usd{day="2025-12-13",stream="directional_imbalance_excess",window="all"} 1.625 +liq_pnl_day_usd{day="2025-12-14",symbol="TSLA",window="all"} 13.5 +liq_pnl_day_cum_usd{day="2025-12-14",symbol="TSLA",window="all"} 98.0 +liq_pnl_day_cum_usd{day="2025-12-14",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-14",stream="counter_trade",window="all"} 13.5 +liq_pnl_day_stream_usd{day="2025-12-14",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-14",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-14",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-14",stream="counter_trade",window="all"} 101.0 +liq_pnl_day_cum_stream_usd{day="2025-12-14",stream="onchain_netting",window="all"} 3.5 +liq_pnl_day_cum_stream_usd{day="2025-12-14",stream="directional_inventory_baseline",window="all"} -7.0 +liq_pnl_day_cum_stream_usd{day="2025-12-14",stream="directional_imbalance_excess",window="all"} 1.75 +liq_pnl_day_usd{day="2025-12-15",symbol="TSLA",window="all"} 14.5 +liq_pnl_day_cum_usd{day="2025-12-15",symbol="TSLA",window="all"} 112.5 +liq_pnl_day_cum_usd{day="2025-12-15",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-15",stream="counter_trade",window="all"} 14.5 +liq_pnl_day_stream_usd{day="2025-12-15",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-15",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-15",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-15",stream="counter_trade",window="all"} 115.5 +liq_pnl_day_cum_stream_usd{day="2025-12-15",stream="onchain_netting",window="all"} 3.75 +liq_pnl_day_cum_stream_usd{day="2025-12-15",stream="directional_inventory_baseline",window="all"} -7.5 +liq_pnl_day_cum_stream_usd{day="2025-12-15",stream="directional_imbalance_excess",window="all"} 1.875 +liq_pnl_day_usd{day="2025-12-16",symbol="TSLA",window="all"} 15.5 +liq_pnl_day_cum_usd{day="2025-12-16",symbol="TSLA",window="all"} 128.0 +liq_pnl_day_cum_usd{day="2025-12-16",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-16",stream="counter_trade",window="all"} 15.5 +liq_pnl_day_stream_usd{day="2025-12-16",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-16",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-16",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-16",stream="counter_trade",window="all"} 131.0 +liq_pnl_day_cum_stream_usd{day="2025-12-16",stream="onchain_netting",window="all"} 4.0 +liq_pnl_day_cum_stream_usd{day="2025-12-16",stream="directional_inventory_baseline",window="all"} -8.0 +liq_pnl_day_cum_stream_usd{day="2025-12-16",stream="directional_imbalance_excess",window="all"} 2.0 +liq_pnl_day_usd{day="2025-12-17",symbol="TSLA",window="all"} 16.5 +liq_pnl_day_cum_usd{day="2025-12-17",symbol="TSLA",window="all"} 144.5 +liq_pnl_day_cum_usd{day="2025-12-17",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-17",stream="counter_trade",window="all"} 16.5 +liq_pnl_day_stream_usd{day="2025-12-17",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-17",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-17",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-17",stream="counter_trade",window="all"} 147.5 +liq_pnl_day_cum_stream_usd{day="2025-12-17",stream="onchain_netting",window="all"} 4.25 +liq_pnl_day_cum_stream_usd{day="2025-12-17",stream="directional_inventory_baseline",window="all"} -8.5 +liq_pnl_day_cum_stream_usd{day="2025-12-17",stream="directional_imbalance_excess",window="all"} 2.125 +liq_pnl_day_usd{day="2025-12-18",symbol="TSLA",window="all"} 17.5 +liq_pnl_day_cum_usd{day="2025-12-18",symbol="TSLA",window="all"} 162.0 +liq_pnl_day_cum_usd{day="2025-12-18",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-18",stream="counter_trade",window="all"} 17.5 +liq_pnl_day_stream_usd{day="2025-12-18",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-18",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-18",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-18",stream="counter_trade",window="all"} 165.0 +liq_pnl_day_cum_stream_usd{day="2025-12-18",stream="onchain_netting",window="all"} 4.5 +liq_pnl_day_cum_stream_usd{day="2025-12-18",stream="directional_inventory_baseline",window="all"} -9.0 +liq_pnl_day_cum_stream_usd{day="2025-12-18",stream="directional_imbalance_excess",window="all"} 2.25 +liq_pnl_day_usd{day="2025-12-19",symbol="TSLA",window="all"} 18.5 +liq_pnl_day_cum_usd{day="2025-12-19",symbol="TSLA",window="all"} 180.5 +liq_pnl_day_cum_usd{day="2025-12-19",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-19",stream="counter_trade",window="all"} 18.5 +liq_pnl_day_stream_usd{day="2025-12-19",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-19",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-19",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-19",stream="counter_trade",window="all"} 183.5 +liq_pnl_day_cum_stream_usd{day="2025-12-19",stream="onchain_netting",window="all"} 4.75 +liq_pnl_day_cum_stream_usd{day="2025-12-19",stream="directional_inventory_baseline",window="all"} -9.5 +liq_pnl_day_cum_stream_usd{day="2025-12-19",stream="directional_imbalance_excess",window="all"} 2.375 +liq_pnl_day_usd{day="2025-12-20",symbol="TSLA",window="all"} 19.5 +liq_pnl_day_cum_usd{day="2025-12-20",symbol="TSLA",window="all"} 200.0 +liq_pnl_day_cum_usd{day="2025-12-20",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-20",stream="counter_trade",window="all"} 19.5 +liq_pnl_day_stream_usd{day="2025-12-20",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-20",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-20",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-20",stream="counter_trade",window="all"} 203.0 +liq_pnl_day_cum_stream_usd{day="2025-12-20",stream="onchain_netting",window="all"} 5.0 +liq_pnl_day_cum_stream_usd{day="2025-12-20",stream="directional_inventory_baseline",window="all"} -10.0 +liq_pnl_day_cum_stream_usd{day="2025-12-20",stream="directional_imbalance_excess",window="all"} 2.5 +liq_pnl_day_usd{day="2025-12-21",symbol="TSLA",window="all"} 20.5 +liq_pnl_day_cum_usd{day="2025-12-21",symbol="TSLA",window="all"} 220.5 +liq_pnl_day_cum_usd{day="2025-12-21",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-21",stream="counter_trade",window="all"} 20.5 +liq_pnl_day_stream_usd{day="2025-12-21",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-21",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-21",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-21",stream="counter_trade",window="all"} 223.5 +liq_pnl_day_cum_stream_usd{day="2025-12-21",stream="onchain_netting",window="all"} 5.25 +liq_pnl_day_cum_stream_usd{day="2025-12-21",stream="directional_inventory_baseline",window="all"} -10.5 +liq_pnl_day_cum_stream_usd{day="2025-12-21",stream="directional_imbalance_excess",window="all"} 2.625 +liq_pnl_day_usd{day="2025-12-22",symbol="TSLA",window="all"} 21.5 +liq_pnl_day_cum_usd{day="2025-12-22",symbol="TSLA",window="all"} 242.0 +liq_pnl_day_cum_usd{day="2025-12-22",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-22",stream="counter_trade",window="all"} 21.5 +liq_pnl_day_stream_usd{day="2025-12-22",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-22",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-22",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-22",stream="counter_trade",window="all"} 245.0 +liq_pnl_day_cum_stream_usd{day="2025-12-22",stream="onchain_netting",window="all"} 5.5 +liq_pnl_day_cum_stream_usd{day="2025-12-22",stream="directional_inventory_baseline",window="all"} -11.0 +liq_pnl_day_cum_stream_usd{day="2025-12-22",stream="directional_imbalance_excess",window="all"} 2.75 +liq_pnl_day_usd{day="2025-12-23",symbol="TSLA",window="all"} 22.5 +liq_pnl_day_cum_usd{day="2025-12-23",symbol="TSLA",window="all"} 264.5 +liq_pnl_day_cum_usd{day="2025-12-23",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-23",stream="counter_trade",window="all"} 22.5 +liq_pnl_day_stream_usd{day="2025-12-23",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-23",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-23",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-23",stream="counter_trade",window="all"} 267.5 +liq_pnl_day_cum_stream_usd{day="2025-12-23",stream="onchain_netting",window="all"} 5.75 +liq_pnl_day_cum_stream_usd{day="2025-12-23",stream="directional_inventory_baseline",window="all"} -11.5 +liq_pnl_day_cum_stream_usd{day="2025-12-23",stream="directional_imbalance_excess",window="all"} 2.875 +liq_pnl_day_usd{day="2025-12-24",symbol="TSLA",window="all"} 23.5 +liq_pnl_day_cum_usd{day="2025-12-24",symbol="TSLA",window="all"} 288.0 +liq_pnl_day_cum_usd{day="2025-12-24",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-24",stream="counter_trade",window="all"} 23.5 +liq_pnl_day_stream_usd{day="2025-12-24",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-24",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-24",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-24",stream="counter_trade",window="all"} 291.0 +liq_pnl_day_cum_stream_usd{day="2025-12-24",stream="onchain_netting",window="all"} 6.0 +liq_pnl_day_cum_stream_usd{day="2025-12-24",stream="directional_inventory_baseline",window="all"} -12.0 +liq_pnl_day_cum_stream_usd{day="2025-12-24",stream="directional_imbalance_excess",window="all"} 3.0 +liq_pnl_day_usd{day="2025-12-25",symbol="TSLA",window="all"} 24.5 +liq_pnl_day_cum_usd{day="2025-12-25",symbol="TSLA",window="all"} 312.5 +liq_pnl_day_cum_usd{day="2025-12-25",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-25",stream="counter_trade",window="all"} 24.5 +liq_pnl_day_stream_usd{day="2025-12-25",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-25",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-25",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-25",stream="counter_trade",window="all"} 315.5 +liq_pnl_day_cum_stream_usd{day="2025-12-25",stream="onchain_netting",window="all"} 6.25 +liq_pnl_day_cum_stream_usd{day="2025-12-25",stream="directional_inventory_baseline",window="all"} -12.5 +liq_pnl_day_cum_stream_usd{day="2025-12-25",stream="directional_imbalance_excess",window="all"} 3.125 +liq_pnl_day_usd{day="2025-12-26",symbol="TSLA",window="all"} 25.5 +liq_pnl_day_cum_usd{day="2025-12-26",symbol="TSLA",window="all"} 338.0 +liq_pnl_day_cum_usd{day="2025-12-26",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-26",stream="counter_trade",window="all"} 25.5 +liq_pnl_day_stream_usd{day="2025-12-26",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-26",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-26",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-26",stream="counter_trade",window="all"} 341.0 +liq_pnl_day_cum_stream_usd{day="2025-12-26",stream="onchain_netting",window="all"} 6.5 +liq_pnl_day_cum_stream_usd{day="2025-12-26",stream="directional_inventory_baseline",window="all"} -13.0 +liq_pnl_day_cum_stream_usd{day="2025-12-26",stream="directional_imbalance_excess",window="all"} 3.25 +liq_pnl_day_usd{day="2025-12-27",symbol="TSLA",window="all"} 26.5 +liq_pnl_day_cum_usd{day="2025-12-27",symbol="TSLA",window="all"} 364.5 +liq_pnl_day_cum_usd{day="2025-12-27",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-27",stream="counter_trade",window="all"} 26.5 +liq_pnl_day_stream_usd{day="2025-12-27",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-27",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-27",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-27",stream="counter_trade",window="all"} 367.5 +liq_pnl_day_cum_stream_usd{day="2025-12-27",stream="onchain_netting",window="all"} 6.75 +liq_pnl_day_cum_stream_usd{day="2025-12-27",stream="directional_inventory_baseline",window="all"} -13.5 +liq_pnl_day_cum_stream_usd{day="2025-12-27",stream="directional_imbalance_excess",window="all"} 3.375 +liq_pnl_day_usd{day="2025-12-28",symbol="TSLA",window="all"} 27.5 +liq_pnl_day_cum_usd{day="2025-12-28",symbol="TSLA",window="all"} 392.0 +liq_pnl_day_cum_usd{day="2025-12-28",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-28",stream="counter_trade",window="all"} 27.5 +liq_pnl_day_stream_usd{day="2025-12-28",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-28",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-28",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-28",stream="counter_trade",window="all"} 395.0 +liq_pnl_day_cum_stream_usd{day="2025-12-28",stream="onchain_netting",window="all"} 7.0 +liq_pnl_day_cum_stream_usd{day="2025-12-28",stream="directional_inventory_baseline",window="all"} -14.0 +liq_pnl_day_cum_stream_usd{day="2025-12-28",stream="directional_imbalance_excess",window="all"} 3.5 +liq_pnl_day_usd{day="2025-12-29",symbol="TSLA",window="all"} 28.5 +liq_pnl_day_cum_usd{day="2025-12-29",symbol="TSLA",window="all"} 420.5 +liq_pnl_day_cum_usd{day="2025-12-29",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-29",stream="counter_trade",window="all"} 28.5 +liq_pnl_day_stream_usd{day="2025-12-29",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-29",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-29",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-29",stream="counter_trade",window="all"} 423.5 +liq_pnl_day_cum_stream_usd{day="2025-12-29",stream="onchain_netting",window="all"} 7.25 +liq_pnl_day_cum_stream_usd{day="2025-12-29",stream="directional_inventory_baseline",window="all"} -14.5 +liq_pnl_day_cum_stream_usd{day="2025-12-29",stream="directional_imbalance_excess",window="all"} 3.625 +liq_pnl_day_usd{day="2025-12-30",symbol="TSLA",window="all"} 29.5 +liq_pnl_day_cum_usd{day="2025-12-30",symbol="TSLA",window="all"} 450.0 +liq_pnl_day_cum_usd{day="2025-12-30",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-30",stream="counter_trade",window="all"} 29.5 +liq_pnl_day_stream_usd{day="2025-12-30",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-30",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-30",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-30",stream="counter_trade",window="all"} 453.0 +liq_pnl_day_cum_stream_usd{day="2025-12-30",stream="onchain_netting",window="all"} 7.5 +liq_pnl_day_cum_stream_usd{day="2025-12-30",stream="directional_inventory_baseline",window="all"} -15.0 +liq_pnl_day_cum_stream_usd{day="2025-12-30",stream="directional_imbalance_excess",window="all"} 3.75 +liq_pnl_day_usd{day="2025-12-31",symbol="TSLA",window="all"} 30.5 +liq_pnl_day_cum_usd{day="2025-12-31",symbol="TSLA",window="all"} 480.5 +liq_pnl_day_cum_usd{day="2025-12-31",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2025-12-31",stream="counter_trade",window="all"} 30.5 +liq_pnl_day_stream_usd{day="2025-12-31",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2025-12-31",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2025-12-31",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2025-12-31",stream="counter_trade",window="all"} 483.5 +liq_pnl_day_cum_stream_usd{day="2025-12-31",stream="onchain_netting",window="all"} 7.75 +liq_pnl_day_cum_stream_usd{day="2025-12-31",stream="directional_inventory_baseline",window="all"} -15.5 +liq_pnl_day_cum_stream_usd{day="2025-12-31",stream="directional_imbalance_excess",window="all"} 3.875 +liq_pnl_day_usd{day="2026-01-01",symbol="TSLA",window="all"} 31.5 +liq_pnl_day_cum_usd{day="2026-01-01",symbol="TSLA",window="all"} 512.0 +liq_pnl_day_cum_usd{day="2026-01-01",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-01",stream="counter_trade",window="all"} 31.5 +liq_pnl_day_stream_usd{day="2026-01-01",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-01",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-01",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-01",stream="counter_trade",window="all"} 515.0 +liq_pnl_day_cum_stream_usd{day="2026-01-01",stream="onchain_netting",window="all"} 8.0 +liq_pnl_day_cum_stream_usd{day="2026-01-01",stream="directional_inventory_baseline",window="all"} -16.0 +liq_pnl_day_cum_stream_usd{day="2026-01-01",stream="directional_imbalance_excess",window="all"} 4.0 +liq_pnl_day_usd{day="2026-01-02",symbol="TSLA",window="all"} 32.5 +liq_pnl_day_cum_usd{day="2026-01-02",symbol="TSLA",window="all"} 544.5 +liq_pnl_day_cum_usd{day="2026-01-02",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-02",stream="counter_trade",window="all"} 32.5 +liq_pnl_day_stream_usd{day="2026-01-02",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-02",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-02",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-02",stream="counter_trade",window="all"} 547.5 +liq_pnl_day_cum_stream_usd{day="2026-01-02",stream="onchain_netting",window="all"} 8.25 +liq_pnl_day_cum_stream_usd{day="2026-01-02",stream="directional_inventory_baseline",window="all"} -16.5 +liq_pnl_day_cum_stream_usd{day="2026-01-02",stream="directional_imbalance_excess",window="all"} 4.125 +liq_pnl_day_usd{day="2026-01-03",symbol="TSLA",window="all"} 33.5 +liq_pnl_day_cum_usd{day="2026-01-03",symbol="TSLA",window="all"} 578.0 +liq_pnl_day_cum_usd{day="2026-01-03",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-03",stream="counter_trade",window="all"} 33.5 +liq_pnl_day_stream_usd{day="2026-01-03",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-03",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-03",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-03",stream="counter_trade",window="all"} 581.0 +liq_pnl_day_cum_stream_usd{day="2026-01-03",stream="onchain_netting",window="all"} 8.5 +liq_pnl_day_cum_stream_usd{day="2026-01-03",stream="directional_inventory_baseline",window="all"} -17.0 +liq_pnl_day_cum_stream_usd{day="2026-01-03",stream="directional_imbalance_excess",window="all"} 4.25 +liq_pnl_day_usd{day="2026-01-04",symbol="TSLA",window="all"} 34.5 +liq_pnl_day_cum_usd{day="2026-01-04",symbol="TSLA",window="all"} 612.5 +liq_pnl_day_cum_usd{day="2026-01-04",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-04",stream="counter_trade",window="all"} 34.5 +liq_pnl_day_stream_usd{day="2026-01-04",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-04",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-04",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-04",stream="counter_trade",window="all"} 615.5 +liq_pnl_day_cum_stream_usd{day="2026-01-04",stream="onchain_netting",window="all"} 8.75 +liq_pnl_day_cum_stream_usd{day="2026-01-04",stream="directional_inventory_baseline",window="all"} -17.5 +liq_pnl_day_cum_stream_usd{day="2026-01-04",stream="directional_imbalance_excess",window="all"} 4.375 +liq_pnl_day_usd{day="2026-01-05",symbol="TSLA",window="all"} 35.5 +liq_pnl_day_cum_usd{day="2026-01-05",symbol="TSLA",window="all"} 648.0 +liq_pnl_day_cum_usd{day="2026-01-05",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-05",stream="counter_trade",window="all"} 35.5 +liq_pnl_day_stream_usd{day="2026-01-05",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-05",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-05",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-05",stream="counter_trade",window="all"} 651.0 +liq_pnl_day_cum_stream_usd{day="2026-01-05",stream="onchain_netting",window="all"} 9.0 +liq_pnl_day_cum_stream_usd{day="2026-01-05",stream="directional_inventory_baseline",window="all"} -18.0 +liq_pnl_day_cum_stream_usd{day="2026-01-05",stream="directional_imbalance_excess",window="all"} 4.5 +liq_pnl_day_usd{day="2026-01-06",symbol="TSLA",window="all"} 36.5 +liq_pnl_day_cum_usd{day="2026-01-06",symbol="TSLA",window="all"} 684.5 +liq_pnl_day_cum_usd{day="2026-01-06",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-06",stream="counter_trade",window="all"} 36.5 +liq_pnl_day_stream_usd{day="2026-01-06",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-06",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-06",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-06",stream="counter_trade",window="all"} 687.5 +liq_pnl_day_cum_stream_usd{day="2026-01-06",stream="onchain_netting",window="all"} 9.25 +liq_pnl_day_cum_stream_usd{day="2026-01-06",stream="directional_inventory_baseline",window="all"} -18.5 +liq_pnl_day_cum_stream_usd{day="2026-01-06",stream="directional_imbalance_excess",window="all"} 4.625 +liq_pnl_day_usd{day="2026-01-07",symbol="TSLA",window="all"} 37.5 +liq_pnl_day_cum_usd{day="2026-01-07",symbol="TSLA",window="all"} 722.0 +liq_pnl_day_cum_usd{day="2026-01-07",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-07",stream="counter_trade",window="all"} 37.5 +liq_pnl_day_stream_usd{day="2026-01-07",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-07",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-07",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-07",stream="counter_trade",window="all"} 725.0 +liq_pnl_day_cum_stream_usd{day="2026-01-07",stream="onchain_netting",window="all"} 9.5 +liq_pnl_day_cum_stream_usd{day="2026-01-07",stream="directional_inventory_baseline",window="all"} -19.0 +liq_pnl_day_cum_stream_usd{day="2026-01-07",stream="directional_imbalance_excess",window="all"} 4.75 +liq_pnl_day_usd{day="2026-01-08",symbol="TSLA",window="all"} 38.5 +liq_pnl_day_cum_usd{day="2026-01-08",symbol="TSLA",window="all"} 760.5 +liq_pnl_day_cum_usd{day="2026-01-08",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-08",stream="counter_trade",window="all"} 38.5 +liq_pnl_day_stream_usd{day="2026-01-08",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-08",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-08",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-08",stream="counter_trade",window="all"} 763.5 +liq_pnl_day_cum_stream_usd{day="2026-01-08",stream="onchain_netting",window="all"} 9.75 +liq_pnl_day_cum_stream_usd{day="2026-01-08",stream="directional_inventory_baseline",window="all"} -19.5 +liq_pnl_day_cum_stream_usd{day="2026-01-08",stream="directional_imbalance_excess",window="all"} 4.875 +liq_pnl_day_usd{day="2026-01-09",symbol="TSLA",window="all"} 39.5 +liq_pnl_day_cum_usd{day="2026-01-09",symbol="TSLA",window="all"} 800.0 +liq_pnl_day_cum_usd{day="2026-01-09",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-09",stream="counter_trade",window="all"} 39.5 +liq_pnl_day_stream_usd{day="2026-01-09",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-09",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-09",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-09",stream="counter_trade",window="all"} 803.0 +liq_pnl_day_cum_stream_usd{day="2026-01-09",stream="onchain_netting",window="all"} 10.0 +liq_pnl_day_cum_stream_usd{day="2026-01-09",stream="directional_inventory_baseline",window="all"} -20.0 +liq_pnl_day_cum_stream_usd{day="2026-01-09",stream="directional_imbalance_excess",window="all"} 5.0 +liq_pnl_day_usd{day="2026-01-10",symbol="TSLA",window="all"} 40.5 +liq_pnl_day_cum_usd{day="2026-01-10",symbol="TSLA",window="all"} 840.5 +liq_pnl_day_cum_usd{day="2026-01-10",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-10",stream="counter_trade",window="all"} 40.5 +liq_pnl_day_stream_usd{day="2026-01-10",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-10",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-10",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-10",stream="counter_trade",window="all"} 843.5 +liq_pnl_day_cum_stream_usd{day="2026-01-10",stream="onchain_netting",window="all"} 10.25 +liq_pnl_day_cum_stream_usd{day="2026-01-10",stream="directional_inventory_baseline",window="all"} -20.5 +liq_pnl_day_cum_stream_usd{day="2026-01-10",stream="directional_imbalance_excess",window="all"} 5.125 +liq_pnl_day_usd{day="2026-01-11",symbol="TSLA",window="all"} 41.5 +liq_pnl_day_cum_usd{day="2026-01-11",symbol="TSLA",window="all"} 882.0 +liq_pnl_day_cum_usd{day="2026-01-11",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-11",stream="counter_trade",window="all"} 41.5 +liq_pnl_day_stream_usd{day="2026-01-11",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-11",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-11",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-11",stream="counter_trade",window="all"} 885.0 +liq_pnl_day_cum_stream_usd{day="2026-01-11",stream="onchain_netting",window="all"} 10.5 +liq_pnl_day_cum_stream_usd{day="2026-01-11",stream="directional_inventory_baseline",window="all"} -21.0 +liq_pnl_day_cum_stream_usd{day="2026-01-11",stream="directional_imbalance_excess",window="all"} 5.25 +liq_pnl_day_usd{day="2026-01-12",symbol="TSLA",window="all"} 42.5 +liq_pnl_day_cum_usd{day="2026-01-12",symbol="TSLA",window="all"} 924.5 +liq_pnl_day_cum_usd{day="2026-01-12",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-12",stream="counter_trade",window="all"} 42.5 +liq_pnl_day_stream_usd{day="2026-01-12",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-12",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-12",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-12",stream="counter_trade",window="all"} 927.5 +liq_pnl_day_cum_stream_usd{day="2026-01-12",stream="onchain_netting",window="all"} 10.75 +liq_pnl_day_cum_stream_usd{day="2026-01-12",stream="directional_inventory_baseline",window="all"} -21.5 +liq_pnl_day_cum_stream_usd{day="2026-01-12",stream="directional_imbalance_excess",window="all"} 5.375 +liq_pnl_day_usd{day="2026-01-13",symbol="TSLA",window="all"} 43.5 +liq_pnl_day_cum_usd{day="2026-01-13",symbol="TSLA",window="all"} 968.0 +liq_pnl_day_cum_usd{day="2026-01-13",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-13",stream="counter_trade",window="all"} 43.5 +liq_pnl_day_stream_usd{day="2026-01-13",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-13",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-13",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-13",stream="counter_trade",window="all"} 971.0 +liq_pnl_day_cum_stream_usd{day="2026-01-13",stream="onchain_netting",window="all"} 11.0 +liq_pnl_day_cum_stream_usd{day="2026-01-13",stream="directional_inventory_baseline",window="all"} -22.0 +liq_pnl_day_cum_stream_usd{day="2026-01-13",stream="directional_imbalance_excess",window="all"} 5.5 +liq_pnl_day_usd{day="2026-01-14",symbol="TSLA",window="all"} 44.5 +liq_pnl_day_cum_usd{day="2026-01-14",symbol="TSLA",window="all"} 1012.5 +liq_pnl_day_cum_usd{day="2026-01-14",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-14",stream="counter_trade",window="all"} 44.5 +liq_pnl_day_stream_usd{day="2026-01-14",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-14",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-14",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-14",stream="counter_trade",window="all"} 1015.5 +liq_pnl_day_cum_stream_usd{day="2026-01-14",stream="onchain_netting",window="all"} 11.25 +liq_pnl_day_cum_stream_usd{day="2026-01-14",stream="directional_inventory_baseline",window="all"} -22.5 +liq_pnl_day_cum_stream_usd{day="2026-01-14",stream="directional_imbalance_excess",window="all"} 5.625 +liq_pnl_day_usd{day="2026-01-15",symbol="TSLA",window="all"} 45.5 +liq_pnl_day_cum_usd{day="2026-01-15",symbol="TSLA",window="all"} 1058.0 +liq_pnl_day_cum_usd{day="2026-01-15",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-15",stream="counter_trade",window="all"} 45.5 +liq_pnl_day_stream_usd{day="2026-01-15",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-15",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-15",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-15",stream="counter_trade",window="all"} 1061.0 +liq_pnl_day_cum_stream_usd{day="2026-01-15",stream="onchain_netting",window="all"} 11.5 +liq_pnl_day_cum_stream_usd{day="2026-01-15",stream="directional_inventory_baseline",window="all"} -23.0 +liq_pnl_day_cum_stream_usd{day="2026-01-15",stream="directional_imbalance_excess",window="all"} 5.75 +liq_pnl_day_usd{day="2026-01-16",symbol="TSLA",window="all"} 46.5 +liq_pnl_day_cum_usd{day="2026-01-16",symbol="TSLA",window="all"} 1104.5 +liq_pnl_day_cum_usd{day="2026-01-16",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-16",stream="counter_trade",window="all"} 46.5 +liq_pnl_day_stream_usd{day="2026-01-16",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-16",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-16",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-16",stream="counter_trade",window="all"} 1107.5 +liq_pnl_day_cum_stream_usd{day="2026-01-16",stream="onchain_netting",window="all"} 11.75 +liq_pnl_day_cum_stream_usd{day="2026-01-16",stream="directional_inventory_baseline",window="all"} -23.5 +liq_pnl_day_cum_stream_usd{day="2026-01-16",stream="directional_imbalance_excess",window="all"} 5.875 +liq_pnl_day_usd{day="2026-01-17",symbol="TSLA",window="all"} 47.5 +liq_pnl_day_cum_usd{day="2026-01-17",symbol="TSLA",window="all"} 1152.0 +liq_pnl_day_cum_usd{day="2026-01-17",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-17",stream="counter_trade",window="all"} 47.5 +liq_pnl_day_stream_usd{day="2026-01-17",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-17",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-17",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-17",stream="counter_trade",window="all"} 1155.0 +liq_pnl_day_cum_stream_usd{day="2026-01-17",stream="onchain_netting",window="all"} 12.0 +liq_pnl_day_cum_stream_usd{day="2026-01-17",stream="directional_inventory_baseline",window="all"} -24.0 +liq_pnl_day_cum_stream_usd{day="2026-01-17",stream="directional_imbalance_excess",window="all"} 6.0 +liq_pnl_day_usd{day="2026-01-18",symbol="TSLA",window="all"} 48.5 +liq_pnl_day_cum_usd{day="2026-01-18",symbol="TSLA",window="all"} 1200.5 +liq_pnl_day_cum_usd{day="2026-01-18",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-18",stream="counter_trade",window="all"} 48.5 +liq_pnl_day_stream_usd{day="2026-01-18",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-18",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-18",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-18",stream="counter_trade",window="all"} 1203.5 +liq_pnl_day_cum_stream_usd{day="2026-01-18",stream="onchain_netting",window="all"} 12.25 +liq_pnl_day_cum_stream_usd{day="2026-01-18",stream="directional_inventory_baseline",window="all"} -24.5 +liq_pnl_day_cum_stream_usd{day="2026-01-18",stream="directional_imbalance_excess",window="all"} 6.125 +liq_pnl_day_usd{day="2026-01-19",symbol="TSLA",window="all"} 49.5 +liq_pnl_day_cum_usd{day="2026-01-19",symbol="TSLA",window="all"} 1250.0 +liq_pnl_day_cum_usd{day="2026-01-19",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-19",stream="counter_trade",window="all"} 49.5 +liq_pnl_day_stream_usd{day="2026-01-19",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-19",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-19",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-19",stream="counter_trade",window="all"} 1253.0 +liq_pnl_day_cum_stream_usd{day="2026-01-19",stream="onchain_netting",window="all"} 12.5 +liq_pnl_day_cum_stream_usd{day="2026-01-19",stream="directional_inventory_baseline",window="all"} -25.0 +liq_pnl_day_cum_stream_usd{day="2026-01-19",stream="directional_imbalance_excess",window="all"} 6.25 +liq_pnl_day_usd{day="2026-01-20",symbol="TSLA",window="all"} 50.5 +liq_pnl_day_cum_usd{day="2026-01-20",symbol="TSLA",window="all"} 1300.5 +liq_pnl_day_cum_usd{day="2026-01-20",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-20",stream="counter_trade",window="all"} 50.5 +liq_pnl_day_stream_usd{day="2026-01-20",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-20",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-20",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-20",stream="counter_trade",window="all"} 1303.5 +liq_pnl_day_cum_stream_usd{day="2026-01-20",stream="onchain_netting",window="all"} 12.75 +liq_pnl_day_cum_stream_usd{day="2026-01-20",stream="directional_inventory_baseline",window="all"} -25.5 +liq_pnl_day_cum_stream_usd{day="2026-01-20",stream="directional_imbalance_excess",window="all"} 6.375 +liq_pnl_day_usd{day="2026-01-21",symbol="TSLA",window="all"} 51.5 +liq_pnl_day_cum_usd{day="2026-01-21",symbol="TSLA",window="all"} 1352.0 +liq_pnl_day_cum_usd{day="2026-01-21",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-21",stream="counter_trade",window="all"} 51.5 +liq_pnl_day_stream_usd{day="2026-01-21",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-21",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-21",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-21",stream="counter_trade",window="all"} 1355.0 +liq_pnl_day_cum_stream_usd{day="2026-01-21",stream="onchain_netting",window="all"} 13.0 +liq_pnl_day_cum_stream_usd{day="2026-01-21",stream="directional_inventory_baseline",window="all"} -26.0 +liq_pnl_day_cum_stream_usd{day="2026-01-21",stream="directional_imbalance_excess",window="all"} 6.5 +liq_pnl_day_usd{day="2026-01-22",symbol="TSLA",window="all"} 52.5 +liq_pnl_day_cum_usd{day="2026-01-22",symbol="TSLA",window="all"} 1404.5 +liq_pnl_day_cum_usd{day="2026-01-22",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-22",stream="counter_trade",window="all"} 52.5 +liq_pnl_day_stream_usd{day="2026-01-22",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-22",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-22",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-22",stream="counter_trade",window="all"} 1407.5 +liq_pnl_day_cum_stream_usd{day="2026-01-22",stream="onchain_netting",window="all"} 13.25 +liq_pnl_day_cum_stream_usd{day="2026-01-22",stream="directional_inventory_baseline",window="all"} -26.5 +liq_pnl_day_cum_stream_usd{day="2026-01-22",stream="directional_imbalance_excess",window="all"} 6.625 +liq_pnl_day_usd{day="2026-01-23",symbol="TSLA",window="all"} 53.5 +liq_pnl_day_cum_usd{day="2026-01-23",symbol="TSLA",window="all"} 1458.0 +liq_pnl_day_cum_usd{day="2026-01-23",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-23",stream="counter_trade",window="all"} 53.5 +liq_pnl_day_stream_usd{day="2026-01-23",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-23",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-23",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-23",stream="counter_trade",window="all"} 1461.0 +liq_pnl_day_cum_stream_usd{day="2026-01-23",stream="onchain_netting",window="all"} 13.5 +liq_pnl_day_cum_stream_usd{day="2026-01-23",stream="directional_inventory_baseline",window="all"} -27.0 +liq_pnl_day_cum_stream_usd{day="2026-01-23",stream="directional_imbalance_excess",window="all"} 6.75 +liq_pnl_day_usd{day="2026-01-24",symbol="TSLA",window="all"} 54.5 +liq_pnl_day_cum_usd{day="2026-01-24",symbol="TSLA",window="all"} 1512.5 +liq_pnl_day_cum_usd{day="2026-01-24",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-24",stream="counter_trade",window="all"} 54.5 +liq_pnl_day_stream_usd{day="2026-01-24",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-24",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-24",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-24",stream="counter_trade",window="all"} 1515.5 +liq_pnl_day_cum_stream_usd{day="2026-01-24",stream="onchain_netting",window="all"} 13.75 +liq_pnl_day_cum_stream_usd{day="2026-01-24",stream="directional_inventory_baseline",window="all"} -27.5 +liq_pnl_day_cum_stream_usd{day="2026-01-24",stream="directional_imbalance_excess",window="all"} 6.875 +liq_pnl_day_usd{day="2026-01-25",symbol="TSLA",window="all"} 55.5 +liq_pnl_day_cum_usd{day="2026-01-25",symbol="TSLA",window="all"} 1568.0 +liq_pnl_day_cum_usd{day="2026-01-25",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-25",stream="counter_trade",window="all"} 55.5 +liq_pnl_day_stream_usd{day="2026-01-25",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-25",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-25",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-25",stream="counter_trade",window="all"} 1571.0 +liq_pnl_day_cum_stream_usd{day="2026-01-25",stream="onchain_netting",window="all"} 14.0 +liq_pnl_day_cum_stream_usd{day="2026-01-25",stream="directional_inventory_baseline",window="all"} -28.0 +liq_pnl_day_cum_stream_usd{day="2026-01-25",stream="directional_imbalance_excess",window="all"} 7.0 +liq_pnl_day_usd{day="2026-01-26",symbol="TSLA",window="all"} 56.5 +liq_pnl_day_cum_usd{day="2026-01-26",symbol="TSLA",window="all"} 1624.5 +liq_pnl_day_cum_usd{day="2026-01-26",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-26",stream="counter_trade",window="all"} 56.5 +liq_pnl_day_stream_usd{day="2026-01-26",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-26",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-26",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-26",stream="counter_trade",window="all"} 1627.5 +liq_pnl_day_cum_stream_usd{day="2026-01-26",stream="onchain_netting",window="all"} 14.25 +liq_pnl_day_cum_stream_usd{day="2026-01-26",stream="directional_inventory_baseline",window="all"} -28.5 +liq_pnl_day_cum_stream_usd{day="2026-01-26",stream="directional_imbalance_excess",window="all"} 7.125 +liq_pnl_day_usd{day="2026-01-27",symbol="TSLA",window="all"} 57.5 +liq_pnl_day_cum_usd{day="2026-01-27",symbol="TSLA",window="all"} 1682.0 +liq_pnl_day_cum_usd{day="2026-01-27",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-27",stream="counter_trade",window="all"} 57.5 +liq_pnl_day_stream_usd{day="2026-01-27",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-27",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-27",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-27",stream="counter_trade",window="all"} 1685.0 +liq_pnl_day_cum_stream_usd{day="2026-01-27",stream="onchain_netting",window="all"} 14.5 +liq_pnl_day_cum_stream_usd{day="2026-01-27",stream="directional_inventory_baseline",window="all"} -29.0 +liq_pnl_day_cum_stream_usd{day="2026-01-27",stream="directional_imbalance_excess",window="all"} 7.25 +liq_pnl_day_usd{day="2026-01-28",symbol="TSLA",window="all"} 58.5 +liq_pnl_day_cum_usd{day="2026-01-28",symbol="TSLA",window="all"} 1740.5 +liq_pnl_day_cum_usd{day="2026-01-28",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-28",stream="counter_trade",window="all"} 58.5 +liq_pnl_day_stream_usd{day="2026-01-28",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-28",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-28",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-28",stream="counter_trade",window="all"} 1743.5 +liq_pnl_day_cum_stream_usd{day="2026-01-28",stream="onchain_netting",window="all"} 14.75 +liq_pnl_day_cum_stream_usd{day="2026-01-28",stream="directional_inventory_baseline",window="all"} -29.5 +liq_pnl_day_cum_stream_usd{day="2026-01-28",stream="directional_imbalance_excess",window="all"} 7.375 +liq_pnl_day_usd{day="2026-01-29",symbol="TSLA",window="all"} 59.5 +liq_pnl_day_cum_usd{day="2026-01-29",symbol="TSLA",window="all"} 1800.0 +liq_pnl_day_cum_usd{day="2026-01-29",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-29",stream="counter_trade",window="all"} 59.5 +liq_pnl_day_stream_usd{day="2026-01-29",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-29",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-29",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-29",stream="counter_trade",window="all"} 1803.0 +liq_pnl_day_cum_stream_usd{day="2026-01-29",stream="onchain_netting",window="all"} 15.0 +liq_pnl_day_cum_stream_usd{day="2026-01-29",stream="directional_inventory_baseline",window="all"} -30.0 +liq_pnl_day_cum_stream_usd{day="2026-01-29",stream="directional_imbalance_excess",window="all"} 7.5 +liq_pnl_day_usd{day="2026-01-30",symbol="TSLA",window="all"} 60.5 +liq_pnl_day_cum_usd{day="2026-01-30",symbol="TSLA",window="all"} 1860.5 +liq_pnl_day_cum_usd{day="2026-01-30",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-30",stream="counter_trade",window="all"} 60.5 +liq_pnl_day_stream_usd{day="2026-01-30",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-30",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-30",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-30",stream="counter_trade",window="all"} 1863.5 +liq_pnl_day_cum_stream_usd{day="2026-01-30",stream="onchain_netting",window="all"} 15.25 +liq_pnl_day_cum_stream_usd{day="2026-01-30",stream="directional_inventory_baseline",window="all"} -30.5 +liq_pnl_day_cum_stream_usd{day="2026-01-30",stream="directional_imbalance_excess",window="all"} 7.625 +liq_pnl_day_usd{day="2026-01-31",symbol="TSLA",window="all"} 61.5 +liq_pnl_day_cum_usd{day="2026-01-31",symbol="TSLA",window="all"} 1922.0 +liq_pnl_day_cum_usd{day="2026-01-31",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-01-31",stream="counter_trade",window="all"} 61.5 +liq_pnl_day_stream_usd{day="2026-01-31",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-01-31",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-01-31",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-01-31",stream="counter_trade",window="all"} 1925.0 +liq_pnl_day_cum_stream_usd{day="2026-01-31",stream="onchain_netting",window="all"} 15.5 +liq_pnl_day_cum_stream_usd{day="2026-01-31",stream="directional_inventory_baseline",window="all"} -31.0 +liq_pnl_day_cum_stream_usd{day="2026-01-31",stream="directional_imbalance_excess",window="all"} 7.75 +liq_pnl_day_usd{day="2026-02-01",symbol="TSLA",window="all"} 62.5 +liq_pnl_day_cum_usd{day="2026-02-01",symbol="TSLA",window="all"} 1984.5 +liq_pnl_day_cum_usd{day="2026-02-01",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-01",stream="counter_trade",window="all"} 62.5 +liq_pnl_day_stream_usd{day="2026-02-01",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-01",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-01",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-01",stream="counter_trade",window="all"} 1987.5 +liq_pnl_day_cum_stream_usd{day="2026-02-01",stream="onchain_netting",window="all"} 15.75 +liq_pnl_day_cum_stream_usd{day="2026-02-01",stream="directional_inventory_baseline",window="all"} -31.5 +liq_pnl_day_cum_stream_usd{day="2026-02-01",stream="directional_imbalance_excess",window="all"} 7.875 +liq_pnl_day_usd{day="2026-02-02",symbol="TSLA",window="all"} 63.5 +liq_pnl_day_cum_usd{day="2026-02-02",symbol="TSLA",window="all"} 2048.0 +liq_pnl_day_cum_usd{day="2026-02-02",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-02",stream="counter_trade",window="all"} 63.5 +liq_pnl_day_stream_usd{day="2026-02-02",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-02",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-02",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-02",stream="counter_trade",window="all"} 2051.0 +liq_pnl_day_cum_stream_usd{day="2026-02-02",stream="onchain_netting",window="all"} 16.0 +liq_pnl_day_cum_stream_usd{day="2026-02-02",stream="directional_inventory_baseline",window="all"} -32.0 +liq_pnl_day_cum_stream_usd{day="2026-02-02",stream="directional_imbalance_excess",window="all"} 8.0 +liq_pnl_day_usd{day="2026-02-03",symbol="TSLA",window="all"} 64.5 +liq_pnl_day_cum_usd{day="2026-02-03",symbol="TSLA",window="all"} 2112.5 +liq_pnl_day_cum_usd{day="2026-02-03",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-03",stream="counter_trade",window="all"} 64.5 +liq_pnl_day_stream_usd{day="2026-02-03",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-03",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-03",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-03",stream="counter_trade",window="all"} 2115.5 +liq_pnl_day_cum_stream_usd{day="2026-02-03",stream="onchain_netting",window="all"} 16.25 +liq_pnl_day_cum_stream_usd{day="2026-02-03",stream="directional_inventory_baseline",window="all"} -32.5 +liq_pnl_day_cum_stream_usd{day="2026-02-03",stream="directional_imbalance_excess",window="all"} 8.125 +liq_pnl_day_usd{day="2026-02-04",symbol="TSLA",window="all"} 65.5 +liq_pnl_day_cum_usd{day="2026-02-04",symbol="TSLA",window="all"} 2178.0 +liq_pnl_day_cum_usd{day="2026-02-04",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-04",stream="counter_trade",window="all"} 65.5 +liq_pnl_day_stream_usd{day="2026-02-04",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-04",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-04",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-04",stream="counter_trade",window="all"} 2181.0 +liq_pnl_day_cum_stream_usd{day="2026-02-04",stream="onchain_netting",window="all"} 16.5 +liq_pnl_day_cum_stream_usd{day="2026-02-04",stream="directional_inventory_baseline",window="all"} -33.0 +liq_pnl_day_cum_stream_usd{day="2026-02-04",stream="directional_imbalance_excess",window="all"} 8.25 +liq_pnl_day_usd{day="2026-02-05",symbol="TSLA",window="all"} 66.5 +liq_pnl_day_cum_usd{day="2026-02-05",symbol="TSLA",window="all"} 2244.5 +liq_pnl_day_cum_usd{day="2026-02-05",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-05",stream="counter_trade",window="all"} 66.5 +liq_pnl_day_stream_usd{day="2026-02-05",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-05",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-05",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-05",stream="counter_trade",window="all"} 2247.5 +liq_pnl_day_cum_stream_usd{day="2026-02-05",stream="onchain_netting",window="all"} 16.75 +liq_pnl_day_cum_stream_usd{day="2026-02-05",stream="directional_inventory_baseline",window="all"} -33.5 +liq_pnl_day_cum_stream_usd{day="2026-02-05",stream="directional_imbalance_excess",window="all"} 8.375 +liq_pnl_day_usd{day="2026-02-06",symbol="TSLA",window="all"} 67.5 +liq_pnl_day_cum_usd{day="2026-02-06",symbol="TSLA",window="all"} 2312.0 +liq_pnl_day_cum_usd{day="2026-02-06",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-06",stream="counter_trade",window="all"} 67.5 +liq_pnl_day_stream_usd{day="2026-02-06",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-06",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-06",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-06",stream="counter_trade",window="all"} 2315.0 +liq_pnl_day_cum_stream_usd{day="2026-02-06",stream="onchain_netting",window="all"} 17.0 +liq_pnl_day_cum_stream_usd{day="2026-02-06",stream="directional_inventory_baseline",window="all"} -34.0 +liq_pnl_day_cum_stream_usd{day="2026-02-06",stream="directional_imbalance_excess",window="all"} 8.5 +liq_pnl_day_usd{day="2026-02-07",symbol="TSLA",window="all"} 68.5 +liq_pnl_day_cum_usd{day="2026-02-07",symbol="TSLA",window="all"} 2380.5 +liq_pnl_day_cum_usd{day="2026-02-07",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-07",stream="counter_trade",window="all"} 68.5 +liq_pnl_day_stream_usd{day="2026-02-07",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-07",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-07",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-07",stream="counter_trade",window="all"} 2383.5 +liq_pnl_day_cum_stream_usd{day="2026-02-07",stream="onchain_netting",window="all"} 17.25 +liq_pnl_day_cum_stream_usd{day="2026-02-07",stream="directional_inventory_baseline",window="all"} -34.5 +liq_pnl_day_cum_stream_usd{day="2026-02-07",stream="directional_imbalance_excess",window="all"} 8.625 +liq_pnl_day_usd{day="2026-02-08",symbol="TSLA",window="all"} 69.5 +liq_pnl_day_cum_usd{day="2026-02-08",symbol="TSLA",window="all"} 2450.0 +liq_pnl_day_cum_usd{day="2026-02-08",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-08",stream="counter_trade",window="all"} 69.5 +liq_pnl_day_stream_usd{day="2026-02-08",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-08",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-08",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-08",stream="counter_trade",window="all"} 2453.0 +liq_pnl_day_cum_stream_usd{day="2026-02-08",stream="onchain_netting",window="all"} 17.5 +liq_pnl_day_cum_stream_usd{day="2026-02-08",stream="directional_inventory_baseline",window="all"} -35.0 +liq_pnl_day_cum_stream_usd{day="2026-02-08",stream="directional_imbalance_excess",window="all"} 8.75 +liq_pnl_day_usd{day="2026-02-09",symbol="TSLA",window="all"} 70.5 +liq_pnl_day_cum_usd{day="2026-02-09",symbol="TSLA",window="all"} 2520.5 +liq_pnl_day_cum_usd{day="2026-02-09",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-09",stream="counter_trade",window="all"} 70.5 +liq_pnl_day_stream_usd{day="2026-02-09",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-09",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-09",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-09",stream="counter_trade",window="all"} 2523.5 +liq_pnl_day_cum_stream_usd{day="2026-02-09",stream="onchain_netting",window="all"} 17.75 +liq_pnl_day_cum_stream_usd{day="2026-02-09",stream="directional_inventory_baseline",window="all"} -35.5 +liq_pnl_day_cum_stream_usd{day="2026-02-09",stream="directional_imbalance_excess",window="all"} 8.875 +liq_pnl_day_usd{day="2026-02-10",symbol="TSLA",window="all"} 71.5 +liq_pnl_day_cum_usd{day="2026-02-10",symbol="TSLA",window="all"} 2592.0 +liq_pnl_day_cum_usd{day="2026-02-10",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-10",stream="counter_trade",window="all"} 71.5 +liq_pnl_day_stream_usd{day="2026-02-10",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-10",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-10",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-10",stream="counter_trade",window="all"} 2595.0 +liq_pnl_day_cum_stream_usd{day="2026-02-10",stream="onchain_netting",window="all"} 18.0 +liq_pnl_day_cum_stream_usd{day="2026-02-10",stream="directional_inventory_baseline",window="all"} -36.0 +liq_pnl_day_cum_stream_usd{day="2026-02-10",stream="directional_imbalance_excess",window="all"} 9.0 +liq_pnl_day_usd{day="2026-02-11",symbol="TSLA",window="all"} 72.5 +liq_pnl_day_cum_usd{day="2026-02-11",symbol="TSLA",window="all"} 2664.5 +liq_pnl_day_cum_usd{day="2026-02-11",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-11",stream="counter_trade",window="all"} 72.5 +liq_pnl_day_stream_usd{day="2026-02-11",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-11",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-11",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-11",stream="counter_trade",window="all"} 2667.5 +liq_pnl_day_cum_stream_usd{day="2026-02-11",stream="onchain_netting",window="all"} 18.25 +liq_pnl_day_cum_stream_usd{day="2026-02-11",stream="directional_inventory_baseline",window="all"} -36.5 +liq_pnl_day_cum_stream_usd{day="2026-02-11",stream="directional_imbalance_excess",window="all"} 9.125 +liq_pnl_day_usd{day="2026-02-12",symbol="TSLA",window="all"} 73.5 +liq_pnl_day_cum_usd{day="2026-02-12",symbol="TSLA",window="all"} 2738.0 +liq_pnl_day_cum_usd{day="2026-02-12",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-12",stream="counter_trade",window="all"} 73.5 +liq_pnl_day_stream_usd{day="2026-02-12",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-12",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-12",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-12",stream="counter_trade",window="all"} 2741.0 +liq_pnl_day_cum_stream_usd{day="2026-02-12",stream="onchain_netting",window="all"} 18.5 +liq_pnl_day_cum_stream_usd{day="2026-02-12",stream="directional_inventory_baseline",window="all"} -37.0 +liq_pnl_day_cum_stream_usd{day="2026-02-12",stream="directional_imbalance_excess",window="all"} 9.25 +liq_pnl_day_usd{day="2026-02-13",symbol="TSLA",window="all"} 74.5 +liq_pnl_day_cum_usd{day="2026-02-13",symbol="TSLA",window="all"} 2812.5 +liq_pnl_day_cum_usd{day="2026-02-13",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-13",stream="counter_trade",window="all"} 74.5 +liq_pnl_day_stream_usd{day="2026-02-13",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-13",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-13",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-13",stream="counter_trade",window="all"} 2815.5 +liq_pnl_day_cum_stream_usd{day="2026-02-13",stream="onchain_netting",window="all"} 18.75 +liq_pnl_day_cum_stream_usd{day="2026-02-13",stream="directional_inventory_baseline",window="all"} -37.5 +liq_pnl_day_cum_stream_usd{day="2026-02-13",stream="directional_imbalance_excess",window="all"} 9.375 +liq_pnl_day_usd{day="2026-02-14",symbol="TSLA",window="all"} 75.5 +liq_pnl_day_cum_usd{day="2026-02-14",symbol="TSLA",window="all"} 2888.0 +liq_pnl_day_cum_usd{day="2026-02-14",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-14",stream="counter_trade",window="all"} 75.5 +liq_pnl_day_stream_usd{day="2026-02-14",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-14",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-14",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-14",stream="counter_trade",window="all"} 2891.0 +liq_pnl_day_cum_stream_usd{day="2026-02-14",stream="onchain_netting",window="all"} 19.0 +liq_pnl_day_cum_stream_usd{day="2026-02-14",stream="directional_inventory_baseline",window="all"} -38.0 +liq_pnl_day_cum_stream_usd{day="2026-02-14",stream="directional_imbalance_excess",window="all"} 9.5 +liq_pnl_day_usd{day="2026-02-15",symbol="TSLA",window="all"} 76.5 +liq_pnl_day_cum_usd{day="2026-02-15",symbol="TSLA",window="all"} 2964.5 +liq_pnl_day_cum_usd{day="2026-02-15",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-15",stream="counter_trade",window="all"} 76.5 +liq_pnl_day_stream_usd{day="2026-02-15",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-15",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-15",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-15",stream="counter_trade",window="all"} 2967.5 +liq_pnl_day_cum_stream_usd{day="2026-02-15",stream="onchain_netting",window="all"} 19.25 +liq_pnl_day_cum_stream_usd{day="2026-02-15",stream="directional_inventory_baseline",window="all"} -38.5 +liq_pnl_day_cum_stream_usd{day="2026-02-15",stream="directional_imbalance_excess",window="all"} 9.625 +liq_pnl_day_usd{day="2026-02-16",symbol="TSLA",window="all"} 77.5 +liq_pnl_day_cum_usd{day="2026-02-16",symbol="TSLA",window="all"} 3042.0 +liq_pnl_day_cum_usd{day="2026-02-16",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-16",stream="counter_trade",window="all"} 77.5 +liq_pnl_day_stream_usd{day="2026-02-16",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-16",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-16",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-16",stream="counter_trade",window="all"} 3045.0 +liq_pnl_day_cum_stream_usd{day="2026-02-16",stream="onchain_netting",window="all"} 19.5 +liq_pnl_day_cum_stream_usd{day="2026-02-16",stream="directional_inventory_baseline",window="all"} -39.0 +liq_pnl_day_cum_stream_usd{day="2026-02-16",stream="directional_imbalance_excess",window="all"} 9.75 +liq_pnl_day_usd{day="2026-02-17",symbol="TSLA",window="all"} 78.5 +liq_pnl_day_cum_usd{day="2026-02-17",symbol="TSLA",window="all"} 3120.5 +liq_pnl_day_cum_usd{day="2026-02-17",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-17",stream="counter_trade",window="all"} 78.5 +liq_pnl_day_stream_usd{day="2026-02-17",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-17",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-17",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-17",stream="counter_trade",window="all"} 3123.5 +liq_pnl_day_cum_stream_usd{day="2026-02-17",stream="onchain_netting",window="all"} 19.75 +liq_pnl_day_cum_stream_usd{day="2026-02-17",stream="directional_inventory_baseline",window="all"} -39.5 +liq_pnl_day_cum_stream_usd{day="2026-02-17",stream="directional_imbalance_excess",window="all"} 9.875 +liq_pnl_day_usd{day="2026-02-18",symbol="TSLA",window="all"} 79.5 +liq_pnl_day_cum_usd{day="2026-02-18",symbol="TSLA",window="all"} 3200.0 +liq_pnl_day_cum_usd{day="2026-02-18",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-18",stream="counter_trade",window="all"} 79.5 +liq_pnl_day_stream_usd{day="2026-02-18",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-18",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-18",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-18",stream="counter_trade",window="all"} 3203.0 +liq_pnl_day_cum_stream_usd{day="2026-02-18",stream="onchain_netting",window="all"} 20.0 +liq_pnl_day_cum_stream_usd{day="2026-02-18",stream="directional_inventory_baseline",window="all"} -40.0 +liq_pnl_day_cum_stream_usd{day="2026-02-18",stream="directional_imbalance_excess",window="all"} 10.0 +liq_pnl_day_usd{day="2026-02-19",symbol="TSLA",window="all"} 80.5 +liq_pnl_day_cum_usd{day="2026-02-19",symbol="TSLA",window="all"} 3280.5 +liq_pnl_day_cum_usd{day="2026-02-19",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-19",stream="counter_trade",window="all"} 80.5 +liq_pnl_day_stream_usd{day="2026-02-19",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-19",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-19",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-19",stream="counter_trade",window="all"} 3283.5 +liq_pnl_day_cum_stream_usd{day="2026-02-19",stream="onchain_netting",window="all"} 20.25 +liq_pnl_day_cum_stream_usd{day="2026-02-19",stream="directional_inventory_baseline",window="all"} -40.5 +liq_pnl_day_cum_stream_usd{day="2026-02-19",stream="directional_imbalance_excess",window="all"} 10.125 +liq_pnl_day_usd{day="2026-02-20",symbol="TSLA",window="all"} 81.5 +liq_pnl_day_cum_usd{day="2026-02-20",symbol="TSLA",window="all"} 3362.0 +liq_pnl_day_cum_usd{day="2026-02-20",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-20",stream="counter_trade",window="all"} 81.5 +liq_pnl_day_stream_usd{day="2026-02-20",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-20",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-20",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-20",stream="counter_trade",window="all"} 3365.0 +liq_pnl_day_cum_stream_usd{day="2026-02-20",stream="onchain_netting",window="all"} 20.5 +liq_pnl_day_cum_stream_usd{day="2026-02-20",stream="directional_inventory_baseline",window="all"} -41.0 +liq_pnl_day_cum_stream_usd{day="2026-02-20",stream="directional_imbalance_excess",window="all"} 10.25 +liq_pnl_day_usd{day="2026-02-21",symbol="TSLA",window="all"} 82.5 +liq_pnl_day_cum_usd{day="2026-02-21",symbol="TSLA",window="all"} 3444.5 +liq_pnl_day_cum_usd{day="2026-02-21",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-21",stream="counter_trade",window="all"} 82.5 +liq_pnl_day_stream_usd{day="2026-02-21",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-21",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-21",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-21",stream="counter_trade",window="all"} 3447.5 +liq_pnl_day_cum_stream_usd{day="2026-02-21",stream="onchain_netting",window="all"} 20.75 +liq_pnl_day_cum_stream_usd{day="2026-02-21",stream="directional_inventory_baseline",window="all"} -41.5 +liq_pnl_day_cum_stream_usd{day="2026-02-21",stream="directional_imbalance_excess",window="all"} 10.375 +liq_pnl_day_usd{day="2026-02-22",symbol="TSLA",window="all"} 83.5 +liq_pnl_day_cum_usd{day="2026-02-22",symbol="TSLA",window="all"} 3528.0 +liq_pnl_day_cum_usd{day="2026-02-22",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-22",stream="counter_trade",window="all"} 83.5 +liq_pnl_day_stream_usd{day="2026-02-22",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-22",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-22",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-22",stream="counter_trade",window="all"} 3531.0 +liq_pnl_day_cum_stream_usd{day="2026-02-22",stream="onchain_netting",window="all"} 21.0 +liq_pnl_day_cum_stream_usd{day="2026-02-22",stream="directional_inventory_baseline",window="all"} -42.0 +liq_pnl_day_cum_stream_usd{day="2026-02-22",stream="directional_imbalance_excess",window="all"} 10.5 +liq_pnl_day_usd{day="2026-02-23",symbol="TSLA",window="all"} 84.5 +liq_pnl_day_cum_usd{day="2026-02-23",symbol="TSLA",window="all"} 3612.5 +liq_pnl_day_cum_usd{day="2026-02-23",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-23",stream="counter_trade",window="all"} 84.5 +liq_pnl_day_stream_usd{day="2026-02-23",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-23",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-23",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-23",stream="counter_trade",window="all"} 3615.5 +liq_pnl_day_cum_stream_usd{day="2026-02-23",stream="onchain_netting",window="all"} 21.25 +liq_pnl_day_cum_stream_usd{day="2026-02-23",stream="directional_inventory_baseline",window="all"} -42.5 +liq_pnl_day_cum_stream_usd{day="2026-02-23",stream="directional_imbalance_excess",window="all"} 10.625 +liq_pnl_day_usd{day="2026-02-24",symbol="TSLA",window="all"} 85.5 +liq_pnl_day_cum_usd{day="2026-02-24",symbol="TSLA",window="all"} 3698.0 +liq_pnl_day_cum_usd{day="2026-02-24",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-24",stream="counter_trade",window="all"} 85.5 +liq_pnl_day_stream_usd{day="2026-02-24",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-24",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-24",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-24",stream="counter_trade",window="all"} 3701.0 +liq_pnl_day_cum_stream_usd{day="2026-02-24",stream="onchain_netting",window="all"} 21.5 +liq_pnl_day_cum_stream_usd{day="2026-02-24",stream="directional_inventory_baseline",window="all"} -43.0 +liq_pnl_day_cum_stream_usd{day="2026-02-24",stream="directional_imbalance_excess",window="all"} 10.75 +liq_pnl_day_usd{day="2026-02-25",symbol="TSLA",window="all"} 86.5 +liq_pnl_day_cum_usd{day="2026-02-25",symbol="TSLA",window="all"} 3784.5 +liq_pnl_day_cum_usd{day="2026-02-25",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-25",stream="counter_trade",window="all"} 86.5 +liq_pnl_day_stream_usd{day="2026-02-25",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-25",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-25",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-25",stream="counter_trade",window="all"} 3787.5 +liq_pnl_day_cum_stream_usd{day="2026-02-25",stream="onchain_netting",window="all"} 21.75 +liq_pnl_day_cum_stream_usd{day="2026-02-25",stream="directional_inventory_baseline",window="all"} -43.5 +liq_pnl_day_cum_stream_usd{day="2026-02-25",stream="directional_imbalance_excess",window="all"} 10.875 +liq_pnl_day_usd{day="2026-02-26",symbol="TSLA",window="all"} 87.5 +liq_pnl_day_cum_usd{day="2026-02-26",symbol="TSLA",window="all"} 3872.0 +liq_pnl_day_cum_usd{day="2026-02-26",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-26",stream="counter_trade",window="all"} 87.5 +liq_pnl_day_stream_usd{day="2026-02-26",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-26",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-26",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-26",stream="counter_trade",window="all"} 3875.0 +liq_pnl_day_cum_stream_usd{day="2026-02-26",stream="onchain_netting",window="all"} 22.0 +liq_pnl_day_cum_stream_usd{day="2026-02-26",stream="directional_inventory_baseline",window="all"} -44.0 +liq_pnl_day_cum_stream_usd{day="2026-02-26",stream="directional_imbalance_excess",window="all"} 11.0 +liq_pnl_day_usd{day="2026-02-27",symbol="TSLA",window="all"} 88.5 +liq_pnl_day_cum_usd{day="2026-02-27",symbol="TSLA",window="all"} 3960.5 +liq_pnl_day_cum_usd{day="2026-02-27",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-27",stream="counter_trade",window="all"} 88.5 +liq_pnl_day_stream_usd{day="2026-02-27",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-27",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-27",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-27",stream="counter_trade",window="all"} 3963.5 +liq_pnl_day_cum_stream_usd{day="2026-02-27",stream="onchain_netting",window="all"} 22.25 +liq_pnl_day_cum_stream_usd{day="2026-02-27",stream="directional_inventory_baseline",window="all"} -44.5 +liq_pnl_day_cum_stream_usd{day="2026-02-27",stream="directional_imbalance_excess",window="all"} 11.125 +liq_pnl_day_usd{day="2026-02-28",symbol="TSLA",window="all"} 89.5 +liq_pnl_day_cum_usd{day="2026-02-28",symbol="TSLA",window="all"} 4050.0 +liq_pnl_day_cum_usd{day="2026-02-28",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-02-28",stream="counter_trade",window="all"} 89.5 +liq_pnl_day_stream_usd{day="2026-02-28",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-02-28",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-02-28",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-02-28",stream="counter_trade",window="all"} 4053.0 +liq_pnl_day_cum_stream_usd{day="2026-02-28",stream="onchain_netting",window="all"} 22.5 +liq_pnl_day_cum_stream_usd{day="2026-02-28",stream="directional_inventory_baseline",window="all"} -45.0 +liq_pnl_day_cum_stream_usd{day="2026-02-28",stream="directional_imbalance_excess",window="all"} 11.25 +liq_pnl_day_usd{day="2026-03-01",symbol="TSLA",window="all"} 90.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="TSLA",window="all"} 4140.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-03-01",stream="counter_trade",window="all"} 90.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="counter_trade",window="all"} 4143.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="onchain_netting",window="all"} 22.75 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="all"} -45.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="all"} 11.375 +liq_pnl_day_usd{day="2026-03-02",symbol="TSLA",window="all"} 91.5 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="TSLA",window="all"} 4232.0 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="counter_trade",window="all"} 91.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="counter_trade",window="all"} 4235.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="onchain_netting",window="all"} 23.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="all"} -46.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="all"} 11.5 +liq_pnl_day_usd{day="2026-03-03",symbol="TSLA",window="all"} 92.5 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="TSLA",window="all"} 4324.5 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-03-03",stream="counter_trade",window="all"} 92.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="counter_trade",window="all"} 4327.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="onchain_netting",window="all"} 23.25 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="all"} -46.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="all"} 11.625 +liq_pnl_day_usd{day="2026-03-04",symbol="TSLA",window="all"} 93.5 +liq_pnl_day_cum_usd{day="2026-03-04",symbol="TSLA",window="all"} 4418.0 +liq_pnl_day_cum_usd{day="2026-03-04",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-03-04",stream="counter_trade",window="all"} 93.5 +liq_pnl_day_stream_usd{day="2026-03-04",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-03-04",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-04",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-03-04",stream="counter_trade",window="all"} 4421.0 +liq_pnl_day_cum_stream_usd{day="2026-03-04",stream="onchain_netting",window="all"} 23.5 +liq_pnl_day_cum_stream_usd{day="2026-03-04",stream="directional_inventory_baseline",window="all"} -47.0 +liq_pnl_day_cum_stream_usd{day="2026-03-04",stream="directional_imbalance_excess",window="all"} 11.75 +liq_pnl_day_usd{day="2026-03-05",symbol="TSLA",window="all"} 94.5 +liq_pnl_day_cum_usd{day="2026-03-05",symbol="TSLA",window="all"} 4512.5 +liq_pnl_day_cum_usd{day="2026-03-05",symbol="RKLB",window="all"} 3.0 +liq_pnl_day_stream_usd{day="2026-03-05",stream="counter_trade",window="all"} 94.5 +liq_pnl_day_stream_usd{day="2026-03-05",stream="onchain_netting",window="all"} 0.25 +liq_pnl_day_stream_usd{day="2026-03-05",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-05",stream="directional_imbalance_excess",window="all"} 0.125 +liq_pnl_day_cum_stream_usd{day="2026-03-05",stream="counter_trade",window="all"} 4515.5 +liq_pnl_day_cum_stream_usd{day="2026-03-05",stream="onchain_netting",window="all"} 23.75 +liq_pnl_day_cum_stream_usd{day="2026-03-05",stream="directional_inventory_baseline",window="all"} -47.5 +liq_pnl_day_cum_stream_usd{day="2026-03-05",stream="directional_imbalance_excess",window="all"} 11.875 diff --git a/src/metrics/liquidity/testdata/pnl.json b/src/metrics/liquidity/testdata/pnl.json new file mode 100644 index 0000000000..a26e2468e4 --- /dev/null +++ b/src/metrics/liquidity/testdata/pnl.json @@ -0,0 +1,230 @@ +{ + "attributionMethod": "backend_position_fill_replay_fifo", + "asOfRowid": 42, + "warnings": [ + "first", + "second" + ], + "availableRange": { + "firstAt": "2026-02-20T14:30:00Z", + "lastAt": "2026-03-03T15:00:00Z", + "firstDate": "2026-02-20", + "lastDate": "2026-03-03" + }, + "sampleStats": { + "firstAt": "2026-02-20T14:30:00.25Z", + "lastAt": "2026-03-03T15:00:00+00:00", + "symbolCount": 2, + "onchainFillCount": 5, + "offchainFillCount": 4, + "totalFillCount": 9, + "symbols": [] + }, + "summary": { + "counterTradePnlUsd": "12.5", + "onchainNettingPnlUsd": "-3.25", + "directionalInventoryBaselinePnlUsd": "4", + "directionalImbalanceExcessPnlUsd": "-1.75", + "directionalExposurePnlUsd": "2.25", + "totalPnlUsd": "11.5", + "grossRealizedPnlUsd": "20", + "trackedCostsUsd": "14.25", + "trackedRevenueUsd": "n/a", + "netRealizedPnlUsd": "7.25", + "realizedPnlUsd": "11.5", + "matchedShares": "300", + "onchainNotionalUsd": "6000", + "offchainNotionalUsd": "5950.5", + "inventoryDriftShares": "-2", + "inventoryDriftUsd": "-30.5", + "openLongShares": "10", + "openShortShares": "0", + "unmatchedOffchainShares": "1.5", + "unmatchedOffchainNotionalUsd": "22.5", + "onchainFillCount": 5, + "offchainFillCount": 4, + "matchedLotCount": 3, + "openLotCount": 2, + "unmatchedOffchainFillCount": 1 + }, + "costs": { + "totalTrackedCostsUsd": "14.25", + "totalTrackedRevenueUsd": "1.5", + "counterTradeCostsUsd": "9", + "onchainNettingCostsUsd": "0", + "directionalExposureCostsUsd": "0", + "genericCostsUsd": "5.25", + "dividendRevenueUsd": "1.5", + "offchainExecutionFeesUsd": "2", + "tokenizationFeesUsd": "3.5", + "cctpFeesUsd": "0.75", + "conversionSlippageUsd": "0", + "oracleWriteCostUsd": "0", + "brokerFeesUsd": "2", + "regulatoryFeesUsd": "0.01", + "marginInterestUsd": "4", + "botGasUsd": "1.99", + "walletTransferFeesUsd": "0", + "unclassifiedCostsUsd": "2", + "costEntryCount": 7, + "missingCostObservationCount": 2, + "coverage": [ + { + "source": "tokenization_fees", + "accountingBucket": "generic", + "effect": "cost", + "status": "included", + "amountUsd": "0", + "note": "fixture" + }, + { + "source": "wallet_transfer_fees", + "accountingBucket": "generic", + "effect": "cost", + "status": "not_ingested", + "amountUsd": "0", + "note": "fixture" + } + ] + }, + "capital": { + "averageDeployedCapitalUsd": "12500.5", + "annualizedReturnPct": null, + "coverageDays": 3, + "sampleDays": 3, + "firstSnapshotDay": "2026-03-01", + "lastSnapshotDay": "2026-03-03", + "excludedDays": [] + }, + "symbols": [ + { + "symbol": "tAAPL", + "counterTradePnlUsd": "10", + "onchainNettingPnlUsd": "-1", + "directionalInventoryBaselinePnlUsd": "3", + "directionalImbalanceExcessPnlUsd": "-1.5", + "directionalExposurePnlUsd": "1.5", + "totalPnlUsd": "10.5", + "grossRealizedPnlUsd": "15", + "trackedCostsUsd": "6", + "trackedRevenueUsd": "1", + "netRealizedPnlUsd": "10", + "realizedPnlUsd": "10.5", + "matchedShares": "200", + "inventoryDriftShares": "-1", + "inventoryDriftUsd": "-15.25", + "openLongShares": "8", + "openShortShares": "0", + "unmatchedOffchainShares": "1.5", + "matchedLotCount": 2, + "onchainFillCount": 2, + "offchainFillCount": 2, + "unmatchedOffchainFillCount": 0 + }, + { + "symbol": "RKLB", + "counterTradePnlUsd": "2.5", + "onchainNettingPnlUsd": "-2.25", + "directionalInventoryBaselinePnlUsd": "1", + "directionalImbalanceExcessPnlUsd": "-0.25", + "directionalExposurePnlUsd": "0.75", + "totalPnlUsd": "1", + "grossRealizedPnlUsd": "5", + "trackedCostsUsd": "8.25", + "trackedRevenueUsd": "0.5", + "netRealizedPnlUsd": "-2.75", + "realizedPnlUsd": "1", + "matchedShares": "", + "inventoryDriftShares": "-1", + "inventoryDriftUsd": "-15.25", + "openLongShares": "2", + "openShortShares": "0", + "unmatchedOffchainShares": "0", + "matchedLotCount": 1, + "onchainFillCount": 1, + "offchainFillCount": 1, + "unmatchedOffchainFillCount": 0 + } + ], + "symbolUniverse": [ + "RKLB", + "tAAPL" + ], + "entries": [], + "costEntries": [], + "total": 3, + "hasMore": true, + "windows": [ + { + "windowId": "2026-03-03", + "startAt": "2026-03-03T05:00:00.000Z", + "endAt": "2026-03-03T04:59:59.999Z", + "label": "2026-03-03", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tAAPL", + "counterTradePnlUsd": "1.5", + "onchainNettingPnlUsd": "bad", + "directionalInventoryBaselinePnlUsd": "0.5", + "directionalImbalanceExcessPnlUsd": "-0.25", + "directionalExposurePnlUsd": "0.25", + "totalPnlUsd": "1.75" + } + ] + }, + { + "windowId": "2026-03-01", + "startAt": "2026-03-01T05:00:00.000Z", + "endAt": "2026-03-01T04:59:59.999Z", + "label": "2026-03-01", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [ + { + "symbol": "tAAPL", + "counterTradePnlUsd": "2", + "onchainNettingPnlUsd": "-1", + "directionalInventoryBaselinePnlUsd": "0.5", + "directionalImbalanceExcessPnlUsd": "0", + "directionalExposurePnlUsd": "0.5", + "totalPnlUsd": "1.5" + }, + { + "symbol": "wtAAPL", + "counterTradePnlUsd": "1", + "onchainNettingPnlUsd": "0", + "directionalInventoryBaselinePnlUsd": "0", + "directionalImbalanceExcessPnlUsd": "0", + "directionalExposurePnlUsd": "0", + "totalPnlUsd": "1" + }, + { + "symbol": "RKLB", + "counterTradePnlUsd": "0.25", + "onchainNettingPnlUsd": "0.5", + "directionalInventoryBaselinePnlUsd": "-1", + "directionalImbalanceExcessPnlUsd": "0.75", + "directionalExposurePnlUsd": "-0.25", + "totalPnlUsd": "0.5" + } + ] + }, + { + "windowId": "2026-03-02", + "startAt": "2026-03-02T05:00:00.000Z", + "endAt": "2026-03-02T04:59:59.999Z", + "label": "2026-03-02", + "isWeekend": false, + "marketSession": "regular", + "counterTradingSession": "regular", + "granularity": "day", + "symbols": [] + } + ] +} diff --git a/src/metrics/liquidity/testdata/pnl.prom b/src/metrics/liquidity/testdata/pnl.prom new file mode 100644 index 0000000000..3cb516429b --- /dev/null +++ b/src/metrics/liquidity/testdata/pnl.prom @@ -0,0 +1,668 @@ +# Expected exporter output for pnl.json, written by +# scripts/liq-parity/golden.py from t0.devops revision 226c029. +liq_pnl_summary_usd{stream="counter_trade",window="1w"} 12.5 +liq_pnl_summary_usd{stream="onchain_netting",window="1w"} -3.25 +liq_pnl_summary_usd{stream="directional_inventory_baseline",window="1w"} 4.0 +liq_pnl_summary_usd{stream="directional_imbalance_excess",window="1w"} -1.75 +liq_pnl_summary_usd{stream="directional_exposure",window="1w"} 2.25 +liq_pnl_summary_usd{stream="total",window="1w"} 11.5 +liq_pnl_summary_usd{stream="gross_realized",window="1w"} 20.0 +liq_pnl_summary_usd{stream="tracked_costs",window="1w"} 14.25 +liq_pnl_summary_usd{stream="net_realized",window="1w"} 7.25 +liq_pnl_summary_usd{stream="realized",window="1w"} 11.5 +liq_pnl_cost_usd{category="broker_fees",window="1w"} 2.0 +liq_pnl_cost_usd{category="tokenization_fees",window="1w"} 3.5 +liq_pnl_cost_usd{category="cctp_fees",window="1w"} 0.75 +liq_pnl_cost_usd{category="bot_gas",window="1w"} 1.99 +liq_pnl_cost_usd{category="margin_interest",window="1w"} 4.0 +liq_pnl_cost_usd{category="wallet_transfer_fees",window="1w"} 0.0 +liq_pnl_cost_usd{category="regulatory_fees",window="1w"} 0.01 +liq_pnl_cost_usd{category="unclassified",window="1w"} 2.0 +liq_pnl_revenue_usd{category="dividend_income",window="1w"} 1.5 +liq_pnl_cost_entries{window="1w"} 7.0 +liq_pnl_cost_missing_observations{window="1w"} 2.0 +liq_pnl_cost_coverage{source="tokenization_fees",status="included",window="1w"} 1.0 +liq_pnl_cost_coverage{source="wallet_transfer_fees",status="not_ingested",window="1w"} 1.0 +liq_pnl_summary_shares{kind="matched",window="1w"} 300.0 +liq_pnl_summary_shares{kind="inventory_drift",window="1w"} -2.0 +liq_pnl_summary_shares{kind="open_long",window="1w"} 10.0 +liq_pnl_summary_shares{kind="open_short",window="1w"} 0.0 +liq_pnl_summary_shares{kind="unmatched_offchain",window="1w"} 1.5 +liq_pnl_summary_count{kind="onchain_fill",window="1w"} 5.0 +liq_pnl_summary_count{kind="offchain_fill",window="1w"} 4.0 +liq_pnl_summary_count{kind="matched_lot",window="1w"} 3.0 +liq_pnl_summary_count{kind="open_lot",window="1w"} 2.0 +liq_pnl_summary_count{kind="unmatched_offchain_fill",window="1w"} 1.0 +liq_pnl_summary_usd{stream="inventory_drift",window="1w"} -30.5 +liq_pnl_summary_usd{stream="onchain_notional",window="1w"} 6000.0 +liq_pnl_summary_usd{stream="offchain_notional",window="1w"} 5950.5 +liq_pnl_capital_avg_deployed_usd{window="1w"} 12500.5 +liq_pnl_capital_coverage_days{window="1w"} 3.0 +liq_pnl_capital_sample_days{window="1w"} 3.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="AAPL",window="1w"} 10.0 +liq_pnl_symbol_usd{col="onchain_netting",symbol="AAPL",window="1w"} -1.0 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="AAPL",window="1w"} 3.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="AAPL",window="1w"} -1.5 +liq_pnl_symbol_usd{col="directional_exposure",symbol="AAPL",window="1w"} 1.5 +liq_pnl_symbol_usd{col="total",symbol="AAPL",window="1w"} 10.5 +liq_pnl_symbol_usd{col="gross_realized",symbol="AAPL",window="1w"} 15.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="AAPL",window="1w"} 6.0 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="AAPL",window="1w"} 1.0 +liq_pnl_symbol_usd{col="net_realized",symbol="AAPL",window="1w"} 10.0 +liq_pnl_symbol_usd{col="realized",symbol="AAPL",window="1w"} 10.5 +liq_pnl_symbol_usd{col="inventory_drift",symbol="AAPL",window="1w"} -15.25 +liq_pnl_symbol_shares{kind="matched",symbol="AAPL",window="1w"} 200.0 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="AAPL",window="1w"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="AAPL",window="1w"} 8.0 +liq_pnl_symbol_shares{kind="open_short",symbol="AAPL",window="1w"} 0.0 +liq_pnl_symbol_lots{symbol="AAPL",window="1w"} 2.0 +liq_pnl_symbol_volume_shares{symbol="AAPL",window="1w"} 400.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="RKLB",window="1w"} 2.5 +liq_pnl_symbol_usd{col="onchain_netting",symbol="RKLB",window="1w"} -2.25 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="RKLB",window="1w"} 1.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="RKLB",window="1w"} -0.25 +liq_pnl_symbol_usd{col="directional_exposure",symbol="RKLB",window="1w"} 0.75 +liq_pnl_symbol_usd{col="total",symbol="RKLB",window="1w"} 1.0 +liq_pnl_symbol_usd{col="gross_realized",symbol="RKLB",window="1w"} 5.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="RKLB",window="1w"} 8.25 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="RKLB",window="1w"} 0.5 +liq_pnl_symbol_usd{col="net_realized",symbol="RKLB",window="1w"} -2.75 +liq_pnl_symbol_usd{col="realized",symbol="RKLB",window="1w"} 1.0 +liq_pnl_symbol_usd{col="inventory_drift",symbol="RKLB",window="1w"} -15.25 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="RKLB",window="1w"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="RKLB",window="1w"} 2.0 +liq_pnl_symbol_shares{kind="open_short",symbol="RKLB",window="1w"} 0.0 +liq_pnl_symbol_lots{symbol="RKLB",window="1w"} 1.0 +liq_pnl_sample_total_fills{window="1w"} 9.0 +liq_pnl_sample_symbols{window="1w"} 2.0 +liq_pnl_sample_first_ts_seconds{window="1w"} 1771597800.25 +liq_pnl_sample_last_ts_seconds{window="1w"} 1772550000.0 +liq_pnl_warnings{window="1w"} 2.0 +liq_pnl_day_usd{day="2026-03-01",symbol="AAPL",window="1w"} 2.5 +liq_pnl_day_usd{day="2026-03-01",symbol="RKLB",window="1w"} 0.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="AAPL",window="1w"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="RKLB",window="1w"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="counter_trade",window="1w"} 3.25 +liq_pnl_day_stream_usd{day="2026-03-01",stream="onchain_netting",window="1w"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1w"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1w"} 0.75 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="counter_trade",window="1w"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="onchain_netting",window="1w"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1w"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1w"} 0.75 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="AAPL",window="1w"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="RKLB",window="1w"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="counter_trade",window="1w"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="onchain_netting",window="1w"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1w"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1w"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="counter_trade",window="1w"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="onchain_netting",window="1w"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1w"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1w"} 0.75 +liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="1w"} 1.75 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="AAPL",window="1w"} 4.25 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="RKLB",window="1w"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="counter_trade",window="1w"} 1.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="onchain_netting",window="1w"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1w"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1w"} -0.25 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="counter_trade",window="1w"} 4.75 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="onchain_netting",window="1w"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1w"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1w"} 0.5 +liq_pnl_summary_usd{stream="counter_trade",window="1d"} 12.5 +liq_pnl_summary_usd{stream="onchain_netting",window="1d"} -3.25 +liq_pnl_summary_usd{stream="directional_inventory_baseline",window="1d"} 4.0 +liq_pnl_summary_usd{stream="directional_imbalance_excess",window="1d"} -1.75 +liq_pnl_summary_usd{stream="directional_exposure",window="1d"} 2.25 +liq_pnl_summary_usd{stream="total",window="1d"} 11.5 +liq_pnl_summary_usd{stream="gross_realized",window="1d"} 20.0 +liq_pnl_summary_usd{stream="tracked_costs",window="1d"} 14.25 +liq_pnl_summary_usd{stream="net_realized",window="1d"} 7.25 +liq_pnl_summary_usd{stream="realized",window="1d"} 11.5 +liq_pnl_cost_usd{category="broker_fees",window="1d"} 2.0 +liq_pnl_cost_usd{category="tokenization_fees",window="1d"} 3.5 +liq_pnl_cost_usd{category="cctp_fees",window="1d"} 0.75 +liq_pnl_cost_usd{category="bot_gas",window="1d"} 1.99 +liq_pnl_cost_usd{category="margin_interest",window="1d"} 4.0 +liq_pnl_cost_usd{category="wallet_transfer_fees",window="1d"} 0.0 +liq_pnl_cost_usd{category="regulatory_fees",window="1d"} 0.01 +liq_pnl_cost_usd{category="unclassified",window="1d"} 2.0 +liq_pnl_revenue_usd{category="dividend_income",window="1d"} 1.5 +liq_pnl_cost_entries{window="1d"} 7.0 +liq_pnl_cost_missing_observations{window="1d"} 2.0 +liq_pnl_cost_coverage{source="tokenization_fees",status="included",window="1d"} 1.0 +liq_pnl_cost_coverage{source="wallet_transfer_fees",status="not_ingested",window="1d"} 1.0 +liq_pnl_summary_shares{kind="matched",window="1d"} 300.0 +liq_pnl_summary_shares{kind="inventory_drift",window="1d"} -2.0 +liq_pnl_summary_shares{kind="open_long",window="1d"} 10.0 +liq_pnl_summary_shares{kind="open_short",window="1d"} 0.0 +liq_pnl_summary_shares{kind="unmatched_offchain",window="1d"} 1.5 +liq_pnl_summary_count{kind="onchain_fill",window="1d"} 5.0 +liq_pnl_summary_count{kind="offchain_fill",window="1d"} 4.0 +liq_pnl_summary_count{kind="matched_lot",window="1d"} 3.0 +liq_pnl_summary_count{kind="open_lot",window="1d"} 2.0 +liq_pnl_summary_count{kind="unmatched_offchain_fill",window="1d"} 1.0 +liq_pnl_summary_usd{stream="inventory_drift",window="1d"} -30.5 +liq_pnl_summary_usd{stream="onchain_notional",window="1d"} 6000.0 +liq_pnl_summary_usd{stream="offchain_notional",window="1d"} 5950.5 +liq_pnl_capital_avg_deployed_usd{window="1d"} 12500.5 +liq_pnl_capital_coverage_days{window="1d"} 3.0 +liq_pnl_capital_sample_days{window="1d"} 3.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="AAPL",window="1d"} 10.0 +liq_pnl_symbol_usd{col="onchain_netting",symbol="AAPL",window="1d"} -1.0 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="AAPL",window="1d"} 3.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="AAPL",window="1d"} -1.5 +liq_pnl_symbol_usd{col="directional_exposure",symbol="AAPL",window="1d"} 1.5 +liq_pnl_symbol_usd{col="total",symbol="AAPL",window="1d"} 10.5 +liq_pnl_symbol_usd{col="gross_realized",symbol="AAPL",window="1d"} 15.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="AAPL",window="1d"} 6.0 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="AAPL",window="1d"} 1.0 +liq_pnl_symbol_usd{col="net_realized",symbol="AAPL",window="1d"} 10.0 +liq_pnl_symbol_usd{col="realized",symbol="AAPL",window="1d"} 10.5 +liq_pnl_symbol_usd{col="inventory_drift",symbol="AAPL",window="1d"} -15.25 +liq_pnl_symbol_shares{kind="matched",symbol="AAPL",window="1d"} 200.0 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="AAPL",window="1d"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="AAPL",window="1d"} 8.0 +liq_pnl_symbol_shares{kind="open_short",symbol="AAPL",window="1d"} 0.0 +liq_pnl_symbol_lots{symbol="AAPL",window="1d"} 2.0 +liq_pnl_symbol_volume_shares{symbol="AAPL",window="1d"} 400.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="RKLB",window="1d"} 2.5 +liq_pnl_symbol_usd{col="onchain_netting",symbol="RKLB",window="1d"} -2.25 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="RKLB",window="1d"} 1.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="RKLB",window="1d"} -0.25 +liq_pnl_symbol_usd{col="directional_exposure",symbol="RKLB",window="1d"} 0.75 +liq_pnl_symbol_usd{col="total",symbol="RKLB",window="1d"} 1.0 +liq_pnl_symbol_usd{col="gross_realized",symbol="RKLB",window="1d"} 5.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="RKLB",window="1d"} 8.25 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="RKLB",window="1d"} 0.5 +liq_pnl_symbol_usd{col="net_realized",symbol="RKLB",window="1d"} -2.75 +liq_pnl_symbol_usd{col="realized",symbol="RKLB",window="1d"} 1.0 +liq_pnl_symbol_usd{col="inventory_drift",symbol="RKLB",window="1d"} -15.25 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="RKLB",window="1d"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="RKLB",window="1d"} 2.0 +liq_pnl_symbol_shares{kind="open_short",symbol="RKLB",window="1d"} 0.0 +liq_pnl_symbol_lots{symbol="RKLB",window="1d"} 1.0 +liq_pnl_sample_total_fills{window="1d"} 9.0 +liq_pnl_sample_symbols{window="1d"} 2.0 +liq_pnl_sample_first_ts_seconds{window="1d"} 1771597800.25 +liq_pnl_sample_last_ts_seconds{window="1d"} 1772550000.0 +liq_pnl_warnings{window="1d"} 2.0 +liq_pnl_day_usd{day="2026-03-01",symbol="AAPL",window="1d"} 2.5 +liq_pnl_day_usd{day="2026-03-01",symbol="RKLB",window="1d"} 0.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="AAPL",window="1d"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="RKLB",window="1d"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="counter_trade",window="1d"} 3.25 +liq_pnl_day_stream_usd{day="2026-03-01",stream="onchain_netting",window="1d"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1d"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1d"} 0.75 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="counter_trade",window="1d"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="onchain_netting",window="1d"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1d"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1d"} 0.75 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="AAPL",window="1d"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="RKLB",window="1d"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="counter_trade",window="1d"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="onchain_netting",window="1d"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1d"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1d"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="counter_trade",window="1d"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="onchain_netting",window="1d"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1d"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1d"} 0.75 +liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="1d"} 1.75 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="AAPL",window="1d"} 4.25 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="RKLB",window="1d"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="counter_trade",window="1d"} 1.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="onchain_netting",window="1d"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1d"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1d"} -0.25 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="counter_trade",window="1d"} 4.75 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="onchain_netting",window="1d"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1d"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1d"} 0.5 +liq_pnl_summary_usd{stream="counter_trade",window="all"} 12.5 +liq_pnl_summary_usd{stream="onchain_netting",window="all"} -3.25 +liq_pnl_summary_usd{stream="directional_inventory_baseline",window="all"} 4.0 +liq_pnl_summary_usd{stream="directional_imbalance_excess",window="all"} -1.75 +liq_pnl_summary_usd{stream="directional_exposure",window="all"} 2.25 +liq_pnl_summary_usd{stream="total",window="all"} 11.5 +liq_pnl_summary_usd{stream="gross_realized",window="all"} 20.0 +liq_pnl_summary_usd{stream="tracked_costs",window="all"} 14.25 +liq_pnl_summary_usd{stream="net_realized",window="all"} 7.25 +liq_pnl_summary_usd{stream="realized",window="all"} 11.5 +liq_pnl_cost_usd{category="broker_fees",window="all"} 2.0 +liq_pnl_cost_usd{category="tokenization_fees",window="all"} 3.5 +liq_pnl_cost_usd{category="cctp_fees",window="all"} 0.75 +liq_pnl_cost_usd{category="bot_gas",window="all"} 1.99 +liq_pnl_cost_usd{category="margin_interest",window="all"} 4.0 +liq_pnl_cost_usd{category="wallet_transfer_fees",window="all"} 0.0 +liq_pnl_cost_usd{category="regulatory_fees",window="all"} 0.01 +liq_pnl_cost_usd{category="unclassified",window="all"} 2.0 +liq_pnl_revenue_usd{category="dividend_income",window="all"} 1.5 +liq_pnl_cost_entries{window="all"} 7.0 +liq_pnl_cost_missing_observations{window="all"} 2.0 +liq_pnl_cost_coverage{source="tokenization_fees",status="included",window="all"} 1.0 +liq_pnl_cost_coverage{source="wallet_transfer_fees",status="not_ingested",window="all"} 1.0 +liq_pnl_summary_shares{kind="matched",window="all"} 300.0 +liq_pnl_summary_shares{kind="inventory_drift",window="all"} -2.0 +liq_pnl_summary_shares{kind="open_long",window="all"} 10.0 +liq_pnl_summary_shares{kind="open_short",window="all"} 0.0 +liq_pnl_summary_shares{kind="unmatched_offchain",window="all"} 1.5 +liq_pnl_summary_count{kind="onchain_fill",window="all"} 5.0 +liq_pnl_summary_count{kind="offchain_fill",window="all"} 4.0 +liq_pnl_summary_count{kind="matched_lot",window="all"} 3.0 +liq_pnl_summary_count{kind="open_lot",window="all"} 2.0 +liq_pnl_summary_count{kind="unmatched_offchain_fill",window="all"} 1.0 +liq_pnl_summary_usd{stream="inventory_drift",window="all"} -30.5 +liq_pnl_summary_usd{stream="onchain_notional",window="all"} 6000.0 +liq_pnl_summary_usd{stream="offchain_notional",window="all"} 5950.5 +liq_pnl_capital_avg_deployed_usd{window="all"} 12500.5 +liq_pnl_capital_coverage_days{window="all"} 3.0 +liq_pnl_capital_sample_days{window="all"} 3.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="AAPL",window="all"} 10.0 +liq_pnl_symbol_usd{col="onchain_netting",symbol="AAPL",window="all"} -1.0 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="AAPL",window="all"} 3.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="AAPL",window="all"} -1.5 +liq_pnl_symbol_usd{col="directional_exposure",symbol="AAPL",window="all"} 1.5 +liq_pnl_symbol_usd{col="total",symbol="AAPL",window="all"} 10.5 +liq_pnl_symbol_usd{col="gross_realized",symbol="AAPL",window="all"} 15.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="AAPL",window="all"} 6.0 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="AAPL",window="all"} 1.0 +liq_pnl_symbol_usd{col="net_realized",symbol="AAPL",window="all"} 10.0 +liq_pnl_symbol_usd{col="realized",symbol="AAPL",window="all"} 10.5 +liq_pnl_symbol_usd{col="inventory_drift",symbol="AAPL",window="all"} -15.25 +liq_pnl_symbol_shares{kind="matched",symbol="AAPL",window="all"} 200.0 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="AAPL",window="all"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="AAPL",window="all"} 8.0 +liq_pnl_symbol_shares{kind="open_short",symbol="AAPL",window="all"} 0.0 +liq_pnl_symbol_lots{symbol="AAPL",window="all"} 2.0 +liq_pnl_symbol_volume_shares{symbol="AAPL",window="all"} 400.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="RKLB",window="all"} 2.5 +liq_pnl_symbol_usd{col="onchain_netting",symbol="RKLB",window="all"} -2.25 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="RKLB",window="all"} 1.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="RKLB",window="all"} -0.25 +liq_pnl_symbol_usd{col="directional_exposure",symbol="RKLB",window="all"} 0.75 +liq_pnl_symbol_usd{col="total",symbol="RKLB",window="all"} 1.0 +liq_pnl_symbol_usd{col="gross_realized",symbol="RKLB",window="all"} 5.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="RKLB",window="all"} 8.25 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="RKLB",window="all"} 0.5 +liq_pnl_symbol_usd{col="net_realized",symbol="RKLB",window="all"} -2.75 +liq_pnl_symbol_usd{col="realized",symbol="RKLB",window="all"} 1.0 +liq_pnl_symbol_usd{col="inventory_drift",symbol="RKLB",window="all"} -15.25 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="RKLB",window="all"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="RKLB",window="all"} 2.0 +liq_pnl_symbol_shares{kind="open_short",symbol="RKLB",window="all"} 0.0 +liq_pnl_symbol_lots{symbol="RKLB",window="all"} 1.0 +liq_pnl_sample_total_fills{window="all"} 9.0 +liq_pnl_sample_symbols{window="all"} 2.0 +liq_pnl_sample_first_ts_seconds{window="all"} 1771597800.25 +liq_pnl_sample_last_ts_seconds{window="all"} 1772550000.0 +liq_pnl_warnings{window="all"} 2.0 +liq_pnl_day_usd{day="2026-03-01",symbol="AAPL",window="all"} 2.5 +liq_pnl_day_usd{day="2026-03-01",symbol="RKLB",window="all"} 0.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="AAPL",window="all"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="RKLB",window="all"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="counter_trade",window="all"} 3.25 +liq_pnl_day_stream_usd{day="2026-03-01",stream="onchain_netting",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="all"} 0.75 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="counter_trade",window="all"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="onchain_netting",window="all"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="all"} 0.75 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="AAPL",window="all"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="RKLB",window="all"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="counter_trade",window="all"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="onchain_netting",window="all"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="all"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="all"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="counter_trade",window="all"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="onchain_netting",window="all"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="all"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="all"} 0.75 +liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="all"} 1.75 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="AAPL",window="all"} 4.25 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="RKLB",window="all"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="counter_trade",window="all"} 1.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="onchain_netting",window="all"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="all"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="all"} -0.25 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="counter_trade",window="all"} 4.75 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="onchain_netting",window="all"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="all"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="all"} 0.5 +liq_pnl_summary_usd{stream="counter_trade",window="1m"} 12.5 +liq_pnl_summary_usd{stream="onchain_netting",window="1m"} -3.25 +liq_pnl_summary_usd{stream="directional_inventory_baseline",window="1m"} 4.0 +liq_pnl_summary_usd{stream="directional_imbalance_excess",window="1m"} -1.75 +liq_pnl_summary_usd{stream="directional_exposure",window="1m"} 2.25 +liq_pnl_summary_usd{stream="total",window="1m"} 11.5 +liq_pnl_summary_usd{stream="gross_realized",window="1m"} 20.0 +liq_pnl_summary_usd{stream="tracked_costs",window="1m"} 14.25 +liq_pnl_summary_usd{stream="net_realized",window="1m"} 7.25 +liq_pnl_summary_usd{stream="realized",window="1m"} 11.5 +liq_pnl_cost_usd{category="broker_fees",window="1m"} 2.0 +liq_pnl_cost_usd{category="tokenization_fees",window="1m"} 3.5 +liq_pnl_cost_usd{category="cctp_fees",window="1m"} 0.75 +liq_pnl_cost_usd{category="bot_gas",window="1m"} 1.99 +liq_pnl_cost_usd{category="margin_interest",window="1m"} 4.0 +liq_pnl_cost_usd{category="wallet_transfer_fees",window="1m"} 0.0 +liq_pnl_cost_usd{category="regulatory_fees",window="1m"} 0.01 +liq_pnl_cost_usd{category="unclassified",window="1m"} 2.0 +liq_pnl_revenue_usd{category="dividend_income",window="1m"} 1.5 +liq_pnl_cost_entries{window="1m"} 7.0 +liq_pnl_cost_missing_observations{window="1m"} 2.0 +liq_pnl_cost_coverage{source="tokenization_fees",status="included",window="1m"} 1.0 +liq_pnl_cost_coverage{source="wallet_transfer_fees",status="not_ingested",window="1m"} 1.0 +liq_pnl_summary_shares{kind="matched",window="1m"} 300.0 +liq_pnl_summary_shares{kind="inventory_drift",window="1m"} -2.0 +liq_pnl_summary_shares{kind="open_long",window="1m"} 10.0 +liq_pnl_summary_shares{kind="open_short",window="1m"} 0.0 +liq_pnl_summary_shares{kind="unmatched_offchain",window="1m"} 1.5 +liq_pnl_summary_count{kind="onchain_fill",window="1m"} 5.0 +liq_pnl_summary_count{kind="offchain_fill",window="1m"} 4.0 +liq_pnl_summary_count{kind="matched_lot",window="1m"} 3.0 +liq_pnl_summary_count{kind="open_lot",window="1m"} 2.0 +liq_pnl_summary_count{kind="unmatched_offchain_fill",window="1m"} 1.0 +liq_pnl_summary_usd{stream="inventory_drift",window="1m"} -30.5 +liq_pnl_summary_usd{stream="onchain_notional",window="1m"} 6000.0 +liq_pnl_summary_usd{stream="offchain_notional",window="1m"} 5950.5 +liq_pnl_capital_avg_deployed_usd{window="1m"} 12500.5 +liq_pnl_capital_coverage_days{window="1m"} 3.0 +liq_pnl_capital_sample_days{window="1m"} 3.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="AAPL",window="1m"} 10.0 +liq_pnl_symbol_usd{col="onchain_netting",symbol="AAPL",window="1m"} -1.0 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="AAPL",window="1m"} 3.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="AAPL",window="1m"} -1.5 +liq_pnl_symbol_usd{col="directional_exposure",symbol="AAPL",window="1m"} 1.5 +liq_pnl_symbol_usd{col="total",symbol="AAPL",window="1m"} 10.5 +liq_pnl_symbol_usd{col="gross_realized",symbol="AAPL",window="1m"} 15.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="AAPL",window="1m"} 6.0 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="AAPL",window="1m"} 1.0 +liq_pnl_symbol_usd{col="net_realized",symbol="AAPL",window="1m"} 10.0 +liq_pnl_symbol_usd{col="realized",symbol="AAPL",window="1m"} 10.5 +liq_pnl_symbol_usd{col="inventory_drift",symbol="AAPL",window="1m"} -15.25 +liq_pnl_symbol_shares{kind="matched",symbol="AAPL",window="1m"} 200.0 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="AAPL",window="1m"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="AAPL",window="1m"} 8.0 +liq_pnl_symbol_shares{kind="open_short",symbol="AAPL",window="1m"} 0.0 +liq_pnl_symbol_lots{symbol="AAPL",window="1m"} 2.0 +liq_pnl_symbol_volume_shares{symbol="AAPL",window="1m"} 400.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="RKLB",window="1m"} 2.5 +liq_pnl_symbol_usd{col="onchain_netting",symbol="RKLB",window="1m"} -2.25 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="RKLB",window="1m"} 1.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="RKLB",window="1m"} -0.25 +liq_pnl_symbol_usd{col="directional_exposure",symbol="RKLB",window="1m"} 0.75 +liq_pnl_symbol_usd{col="total",symbol="RKLB",window="1m"} 1.0 +liq_pnl_symbol_usd{col="gross_realized",symbol="RKLB",window="1m"} 5.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="RKLB",window="1m"} 8.25 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="RKLB",window="1m"} 0.5 +liq_pnl_symbol_usd{col="net_realized",symbol="RKLB",window="1m"} -2.75 +liq_pnl_symbol_usd{col="realized",symbol="RKLB",window="1m"} 1.0 +liq_pnl_symbol_usd{col="inventory_drift",symbol="RKLB",window="1m"} -15.25 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="RKLB",window="1m"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="RKLB",window="1m"} 2.0 +liq_pnl_symbol_shares{kind="open_short",symbol="RKLB",window="1m"} 0.0 +liq_pnl_symbol_lots{symbol="RKLB",window="1m"} 1.0 +liq_pnl_sample_total_fills{window="1m"} 9.0 +liq_pnl_sample_symbols{window="1m"} 2.0 +liq_pnl_sample_first_ts_seconds{window="1m"} 1771597800.25 +liq_pnl_sample_last_ts_seconds{window="1m"} 1772550000.0 +liq_pnl_warnings{window="1m"} 2.0 +liq_pnl_day_usd{day="2026-03-01",symbol="AAPL",window="1m"} 2.5 +liq_pnl_day_usd{day="2026-03-01",symbol="RKLB",window="1m"} 0.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="AAPL",window="1m"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="RKLB",window="1m"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="counter_trade",window="1m"} 3.25 +liq_pnl_day_stream_usd{day="2026-03-01",stream="onchain_netting",window="1m"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1m"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1m"} 0.75 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="counter_trade",window="1m"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="onchain_netting",window="1m"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1m"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1m"} 0.75 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="AAPL",window="1m"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="RKLB",window="1m"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="counter_trade",window="1m"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="onchain_netting",window="1m"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1m"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1m"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="counter_trade",window="1m"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="onchain_netting",window="1m"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1m"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1m"} 0.75 +liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="1m"} 1.75 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="AAPL",window="1m"} 4.25 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="RKLB",window="1m"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="counter_trade",window="1m"} 1.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="onchain_netting",window="1m"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1m"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1m"} -0.25 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="counter_trade",window="1m"} 4.75 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="onchain_netting",window="1m"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1m"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1m"} 0.5 +liq_pnl_summary_usd{stream="counter_trade",window="ytd"} 12.5 +liq_pnl_summary_usd{stream="onchain_netting",window="ytd"} -3.25 +liq_pnl_summary_usd{stream="directional_inventory_baseline",window="ytd"} 4.0 +liq_pnl_summary_usd{stream="directional_imbalance_excess",window="ytd"} -1.75 +liq_pnl_summary_usd{stream="directional_exposure",window="ytd"} 2.25 +liq_pnl_summary_usd{stream="total",window="ytd"} 11.5 +liq_pnl_summary_usd{stream="gross_realized",window="ytd"} 20.0 +liq_pnl_summary_usd{stream="tracked_costs",window="ytd"} 14.25 +liq_pnl_summary_usd{stream="net_realized",window="ytd"} 7.25 +liq_pnl_summary_usd{stream="realized",window="ytd"} 11.5 +liq_pnl_cost_usd{category="broker_fees",window="ytd"} 2.0 +liq_pnl_cost_usd{category="tokenization_fees",window="ytd"} 3.5 +liq_pnl_cost_usd{category="cctp_fees",window="ytd"} 0.75 +liq_pnl_cost_usd{category="bot_gas",window="ytd"} 1.99 +liq_pnl_cost_usd{category="margin_interest",window="ytd"} 4.0 +liq_pnl_cost_usd{category="wallet_transfer_fees",window="ytd"} 0.0 +liq_pnl_cost_usd{category="regulatory_fees",window="ytd"} 0.01 +liq_pnl_cost_usd{category="unclassified",window="ytd"} 2.0 +liq_pnl_revenue_usd{category="dividend_income",window="ytd"} 1.5 +liq_pnl_cost_entries{window="ytd"} 7.0 +liq_pnl_cost_missing_observations{window="ytd"} 2.0 +liq_pnl_cost_coverage{source="tokenization_fees",status="included",window="ytd"} 1.0 +liq_pnl_cost_coverage{source="wallet_transfer_fees",status="not_ingested",window="ytd"} 1.0 +liq_pnl_summary_shares{kind="matched",window="ytd"} 300.0 +liq_pnl_summary_shares{kind="inventory_drift",window="ytd"} -2.0 +liq_pnl_summary_shares{kind="open_long",window="ytd"} 10.0 +liq_pnl_summary_shares{kind="open_short",window="ytd"} 0.0 +liq_pnl_summary_shares{kind="unmatched_offchain",window="ytd"} 1.5 +liq_pnl_summary_count{kind="onchain_fill",window="ytd"} 5.0 +liq_pnl_summary_count{kind="offchain_fill",window="ytd"} 4.0 +liq_pnl_summary_count{kind="matched_lot",window="ytd"} 3.0 +liq_pnl_summary_count{kind="open_lot",window="ytd"} 2.0 +liq_pnl_summary_count{kind="unmatched_offchain_fill",window="ytd"} 1.0 +liq_pnl_summary_usd{stream="inventory_drift",window="ytd"} -30.5 +liq_pnl_summary_usd{stream="onchain_notional",window="ytd"} 6000.0 +liq_pnl_summary_usd{stream="offchain_notional",window="ytd"} 5950.5 +liq_pnl_capital_avg_deployed_usd{window="ytd"} 12500.5 +liq_pnl_capital_coverage_days{window="ytd"} 3.0 +liq_pnl_capital_sample_days{window="ytd"} 3.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="AAPL",window="ytd"} 10.0 +liq_pnl_symbol_usd{col="onchain_netting",symbol="AAPL",window="ytd"} -1.0 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="AAPL",window="ytd"} 3.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="AAPL",window="ytd"} -1.5 +liq_pnl_symbol_usd{col="directional_exposure",symbol="AAPL",window="ytd"} 1.5 +liq_pnl_symbol_usd{col="total",symbol="AAPL",window="ytd"} 10.5 +liq_pnl_symbol_usd{col="gross_realized",symbol="AAPL",window="ytd"} 15.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="AAPL",window="ytd"} 6.0 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="AAPL",window="ytd"} 1.0 +liq_pnl_symbol_usd{col="net_realized",symbol="AAPL",window="ytd"} 10.0 +liq_pnl_symbol_usd{col="realized",symbol="AAPL",window="ytd"} 10.5 +liq_pnl_symbol_usd{col="inventory_drift",symbol="AAPL",window="ytd"} -15.25 +liq_pnl_symbol_shares{kind="matched",symbol="AAPL",window="ytd"} 200.0 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="AAPL",window="ytd"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="AAPL",window="ytd"} 8.0 +liq_pnl_symbol_shares{kind="open_short",symbol="AAPL",window="ytd"} 0.0 +liq_pnl_symbol_lots{symbol="AAPL",window="ytd"} 2.0 +liq_pnl_symbol_volume_shares{symbol="AAPL",window="ytd"} 400.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="RKLB",window="ytd"} 2.5 +liq_pnl_symbol_usd{col="onchain_netting",symbol="RKLB",window="ytd"} -2.25 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="RKLB",window="ytd"} 1.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="RKLB",window="ytd"} -0.25 +liq_pnl_symbol_usd{col="directional_exposure",symbol="RKLB",window="ytd"} 0.75 +liq_pnl_symbol_usd{col="total",symbol="RKLB",window="ytd"} 1.0 +liq_pnl_symbol_usd{col="gross_realized",symbol="RKLB",window="ytd"} 5.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="RKLB",window="ytd"} 8.25 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="RKLB",window="ytd"} 0.5 +liq_pnl_symbol_usd{col="net_realized",symbol="RKLB",window="ytd"} -2.75 +liq_pnl_symbol_usd{col="realized",symbol="RKLB",window="ytd"} 1.0 +liq_pnl_symbol_usd{col="inventory_drift",symbol="RKLB",window="ytd"} -15.25 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="RKLB",window="ytd"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="RKLB",window="ytd"} 2.0 +liq_pnl_symbol_shares{kind="open_short",symbol="RKLB",window="ytd"} 0.0 +liq_pnl_symbol_lots{symbol="RKLB",window="ytd"} 1.0 +liq_pnl_sample_total_fills{window="ytd"} 9.0 +liq_pnl_sample_symbols{window="ytd"} 2.0 +liq_pnl_sample_first_ts_seconds{window="ytd"} 1771597800.25 +liq_pnl_sample_last_ts_seconds{window="ytd"} 1772550000.0 +liq_pnl_warnings{window="ytd"} 2.0 +liq_pnl_day_usd{day="2026-03-01",symbol="AAPL",window="ytd"} 2.5 +liq_pnl_day_usd{day="2026-03-01",symbol="RKLB",window="ytd"} 0.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="AAPL",window="ytd"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="RKLB",window="ytd"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="counter_trade",window="ytd"} 3.25 +liq_pnl_day_stream_usd{day="2026-03-01",stream="onchain_netting",window="ytd"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="ytd"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="ytd"} 0.75 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="counter_trade",window="ytd"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="onchain_netting",window="ytd"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="ytd"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="ytd"} 0.75 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="AAPL",window="ytd"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="RKLB",window="ytd"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="counter_trade",window="ytd"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="onchain_netting",window="ytd"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="ytd"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="ytd"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="counter_trade",window="ytd"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="onchain_netting",window="ytd"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="ytd"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="ytd"} 0.75 +liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="ytd"} 1.75 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="AAPL",window="ytd"} 4.25 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="RKLB",window="ytd"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="counter_trade",window="ytd"} 1.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="onchain_netting",window="ytd"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="ytd"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="ytd"} -0.25 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="counter_trade",window="ytd"} 4.75 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="onchain_netting",window="ytd"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="ytd"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="ytd"} 0.5 +liq_pnl_summary_usd{stream="counter_trade",window="1y"} 12.5 +liq_pnl_summary_usd{stream="onchain_netting",window="1y"} -3.25 +liq_pnl_summary_usd{stream="directional_inventory_baseline",window="1y"} 4.0 +liq_pnl_summary_usd{stream="directional_imbalance_excess",window="1y"} -1.75 +liq_pnl_summary_usd{stream="directional_exposure",window="1y"} 2.25 +liq_pnl_summary_usd{stream="total",window="1y"} 11.5 +liq_pnl_summary_usd{stream="gross_realized",window="1y"} 20.0 +liq_pnl_summary_usd{stream="tracked_costs",window="1y"} 14.25 +liq_pnl_summary_usd{stream="net_realized",window="1y"} 7.25 +liq_pnl_summary_usd{stream="realized",window="1y"} 11.5 +liq_pnl_cost_usd{category="broker_fees",window="1y"} 2.0 +liq_pnl_cost_usd{category="tokenization_fees",window="1y"} 3.5 +liq_pnl_cost_usd{category="cctp_fees",window="1y"} 0.75 +liq_pnl_cost_usd{category="bot_gas",window="1y"} 1.99 +liq_pnl_cost_usd{category="margin_interest",window="1y"} 4.0 +liq_pnl_cost_usd{category="wallet_transfer_fees",window="1y"} 0.0 +liq_pnl_cost_usd{category="regulatory_fees",window="1y"} 0.01 +liq_pnl_cost_usd{category="unclassified",window="1y"} 2.0 +liq_pnl_revenue_usd{category="dividend_income",window="1y"} 1.5 +liq_pnl_cost_entries{window="1y"} 7.0 +liq_pnl_cost_missing_observations{window="1y"} 2.0 +liq_pnl_cost_coverage{source="tokenization_fees",status="included",window="1y"} 1.0 +liq_pnl_cost_coverage{source="wallet_transfer_fees",status="not_ingested",window="1y"} 1.0 +liq_pnl_summary_shares{kind="matched",window="1y"} 300.0 +liq_pnl_summary_shares{kind="inventory_drift",window="1y"} -2.0 +liq_pnl_summary_shares{kind="open_long",window="1y"} 10.0 +liq_pnl_summary_shares{kind="open_short",window="1y"} 0.0 +liq_pnl_summary_shares{kind="unmatched_offchain",window="1y"} 1.5 +liq_pnl_summary_count{kind="onchain_fill",window="1y"} 5.0 +liq_pnl_summary_count{kind="offchain_fill",window="1y"} 4.0 +liq_pnl_summary_count{kind="matched_lot",window="1y"} 3.0 +liq_pnl_summary_count{kind="open_lot",window="1y"} 2.0 +liq_pnl_summary_count{kind="unmatched_offchain_fill",window="1y"} 1.0 +liq_pnl_summary_usd{stream="inventory_drift",window="1y"} -30.5 +liq_pnl_summary_usd{stream="onchain_notional",window="1y"} 6000.0 +liq_pnl_summary_usd{stream="offchain_notional",window="1y"} 5950.5 +liq_pnl_capital_avg_deployed_usd{window="1y"} 12500.5 +liq_pnl_capital_coverage_days{window="1y"} 3.0 +liq_pnl_capital_sample_days{window="1y"} 3.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="AAPL",window="1y"} 10.0 +liq_pnl_symbol_usd{col="onchain_netting",symbol="AAPL",window="1y"} -1.0 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="AAPL",window="1y"} 3.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="AAPL",window="1y"} -1.5 +liq_pnl_symbol_usd{col="directional_exposure",symbol="AAPL",window="1y"} 1.5 +liq_pnl_symbol_usd{col="total",symbol="AAPL",window="1y"} 10.5 +liq_pnl_symbol_usd{col="gross_realized",symbol="AAPL",window="1y"} 15.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="AAPL",window="1y"} 6.0 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="AAPL",window="1y"} 1.0 +liq_pnl_symbol_usd{col="net_realized",symbol="AAPL",window="1y"} 10.0 +liq_pnl_symbol_usd{col="realized",symbol="AAPL",window="1y"} 10.5 +liq_pnl_symbol_usd{col="inventory_drift",symbol="AAPL",window="1y"} -15.25 +liq_pnl_symbol_shares{kind="matched",symbol="AAPL",window="1y"} 200.0 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="AAPL",window="1y"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="AAPL",window="1y"} 8.0 +liq_pnl_symbol_shares{kind="open_short",symbol="AAPL",window="1y"} 0.0 +liq_pnl_symbol_lots{symbol="AAPL",window="1y"} 2.0 +liq_pnl_symbol_volume_shares{symbol="AAPL",window="1y"} 400.0 +liq_pnl_symbol_usd{col="counter_trade",symbol="RKLB",window="1y"} 2.5 +liq_pnl_symbol_usd{col="onchain_netting",symbol="RKLB",window="1y"} -2.25 +liq_pnl_symbol_usd{col="directional_inventory_baseline",symbol="RKLB",window="1y"} 1.0 +liq_pnl_symbol_usd{col="directional_imbalance_excess",symbol="RKLB",window="1y"} -0.25 +liq_pnl_symbol_usd{col="directional_exposure",symbol="RKLB",window="1y"} 0.75 +liq_pnl_symbol_usd{col="total",symbol="RKLB",window="1y"} 1.0 +liq_pnl_symbol_usd{col="gross_realized",symbol="RKLB",window="1y"} 5.0 +liq_pnl_symbol_usd{col="tracked_costs",symbol="RKLB",window="1y"} 8.25 +liq_pnl_symbol_usd{col="tracked_revenue",symbol="RKLB",window="1y"} 0.5 +liq_pnl_symbol_usd{col="net_realized",symbol="RKLB",window="1y"} -2.75 +liq_pnl_symbol_usd{col="realized",symbol="RKLB",window="1y"} 1.0 +liq_pnl_symbol_usd{col="inventory_drift",symbol="RKLB",window="1y"} -15.25 +liq_pnl_symbol_shares{kind="inventory_drift",symbol="RKLB",window="1y"} -1.0 +liq_pnl_symbol_shares{kind="open_long",symbol="RKLB",window="1y"} 2.0 +liq_pnl_symbol_shares{kind="open_short",symbol="RKLB",window="1y"} 0.0 +liq_pnl_symbol_lots{symbol="RKLB",window="1y"} 1.0 +liq_pnl_sample_total_fills{window="1y"} 9.0 +liq_pnl_sample_symbols{window="1y"} 2.0 +liq_pnl_sample_first_ts_seconds{window="1y"} 1771597800.25 +liq_pnl_sample_last_ts_seconds{window="1y"} 1772550000.0 +liq_pnl_warnings{window="1y"} 2.0 +liq_pnl_day_usd{day="2026-03-01",symbol="AAPL",window="1y"} 2.5 +liq_pnl_day_usd{day="2026-03-01",symbol="RKLB",window="1y"} 0.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="AAPL",window="1y"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-01",symbol="RKLB",window="1y"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="counter_trade",window="1y"} 3.25 +liq_pnl_day_stream_usd{day="2026-03-01",stream="onchain_netting",window="1y"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1y"} -0.5 +liq_pnl_day_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1y"} 0.75 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="counter_trade",window="1y"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="onchain_netting",window="1y"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_inventory_baseline",window="1y"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-01",stream="directional_imbalance_excess",window="1y"} 0.75 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="AAPL",window="1y"} 2.5 +liq_pnl_day_cum_usd{day="2026-03-02",symbol="RKLB",window="1y"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-02",stream="counter_trade",window="1y"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="onchain_netting",window="1y"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1y"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1y"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="counter_trade",window="1y"} 3.25 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="onchain_netting",window="1y"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_inventory_baseline",window="1y"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-02",stream="directional_imbalance_excess",window="1y"} 0.75 +liq_pnl_day_usd{day="2026-03-03",symbol="AAPL",window="1y"} 1.75 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="AAPL",window="1y"} 4.25 +liq_pnl_day_cum_usd{day="2026-03-03",symbol="RKLB",window="1y"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="counter_trade",window="1y"} 1.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="onchain_netting",window="1y"} 0.0 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1y"} 0.5 +liq_pnl_day_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1y"} -0.25 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="counter_trade",window="1y"} 4.75 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="onchain_netting",window="1y"} -0.5 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_inventory_baseline",window="1y"} 0.0 +liq_pnl_day_cum_stream_usd{day="2026-03-03",stream="directional_imbalance_excess",window="1y"} 0.5