Skip to content

Institutional-grade execution-analytics figures#1

Open
joshfinney wants to merge 1 commit into
masterfrom
viz/institutional-figures
Open

Institutional-grade execution-analytics figures#1
joshfinney wants to merge 1 commit into
masterfrom
viz/institutional-figures

Conversation

@joshfinney

Copy link
Copy Markdown
Owner

What

Replaces the previous ad-hoc, dark-themed / radar-style plots with a clean, buy-side-ready figure suite generated directly from the eval data. The old charts were never committed; this adds a proper, reproducible plotting module.

Why the old plots read as "vibe-coded"

  • Dark neon deck — institutional/TCA reports are light and print-friendly.
  • Radar/spider charts — a known anti-pattern for quantitative comparison (misleading area, arbitrary axes, unreadable overlapping fills) that also hid the actual bps numbers.
  • Saturated rainbow palette, colored annotation text, chartjunk, no hero/recessive discipline.

What's here now

Five figures (experiments/plots.py), all in basis points, light theme, one accent for the hero policy (PPO), muted-gray baselines, with markers + line styles as secondary encoding (survives greyscale / CVD):

  1. Execution efficiency frontier — cost vs. risk (the signature Almgren–Chriss view)
  2. Implementation-shortfall distribution — box/whisker + 95% VaR marker
  3. Mean cost by regime — grouped bars with ±1σ error bars
  4. 95% VaR tail-risk league table — ranked horizontal bars
  5. Execution schedule — remaining inventory over the horizon

Palette validated with the dataviz colour checker (CVD separation ΔE 38.5, well clear of the floor).

Story the charts tell

TWAP posts the lowest mean cost, but PPO delivers the best risk-adjusted execution — roughly half the cost dispersion and the lowest tail risk (VaR) in every regime.

Structure

  • viz/style.py — shared theme (palette, rcParams, bps formatter)
  • experiments/collect_raw.py — per-episode costs + trajectories
  • experiments/plots.py — figure generation (PNG for README + SVG vector)
  • eval.py --figures flag; README Results section with embedded charts

Reproduce: uv run python experiments/plots.py. Tests still green (8 passed); ruff clean.

🤖 Generated with Claude Code

Replace ad-hoc dark-themed / radar plots with a clean, buy-side-ready
figure suite driven off the eval data. Adds:

- viz/style.py: shared light-theme matplotlib rcParams, a validated
  hero/recessive palette (PPO accent; muted baselines), distinct
  markers/linestyles as secondary encoding, and bps axis formatting.
- experiments/collect_raw.py: per-episode costs + sample trajectories.
- experiments/plots.py: five figures — execution efficiency frontier
  (cost vs risk), implementation-shortfall distribution, mean cost by
  regime with error bars, 95% VaR tail-risk league table, and the
  execution schedule. PNG (README) + SVG (vector) output.
- eval.py --figures flag and README Results section with embedded charts.

All costs reported in basis points (bps), the standard TCA unit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant