Inside Hedgekit: Features, Agents, and the Dashboard
A private systematic trading lab — PnL charts, risk gates, and eight AI agents that feed the runner
What This Article Is
This is an update on Hedgekit — my private systematic trading lab. The first post was about why I am building it. This one is about what it actually does: the dashboard, the PnL charts, the risk layer, and each AI agent that writes into the runner.
I am documenting the build for anyone curious how a self-taught developer structures a paper-trading stack — and for my own learning journal.
Important: Educational project only. Not financial advice. Simulated and paper modes are the intended path.
Platform at a Glance
Everything revolves around one loop:
market data → strategy → risk gate → broker
↑
AI agents (research + guardrails)What you get
Strategies: Pairs, baskets, triplets, optional intraday ETF sleeve
Risk gate: Daily loss cap, position limits, kill switch, max trades/day
Broker: Simulated (default) or IBKR paper
Agents: Scheduled markdown reports + live parameter overrides
Dashboard: Positions, PnL charts, blotter, agent feed
Feature Breakdown
1. Command Center Dashboard
The local dashboard is a FastAPI app with two tabs: Trading and Agents. It does not send orders — it mirrors what the runner is doing and what the agents last wrote.
Hedgekit command center — Trading tab
Top bar controls:
- Day trade — toggle the intraday ETF mean-reversion sleeve without editing YAML
- IBKR — pull live account data (NLV, positions) in paper mode
- Live sync — auto-refresh every few seconds
- Refresh — manual pull
The status strip shows execution mode, active strategy module, and last sync time.
2. Session PnL Chart
The Session PnL card plots net liquidation value vs today’s open from IBKR equity snapshots. Times are in CT. This is how I sanity-check whether the account moved the way I expect — separate from the internal trade journal estimate.
Session PnL chart
I watch for noisy intraday curves (overtrading) vs flat discipline, and whether session PnL aligns with the daily loss cap meter below.
3. Lifetime PnL Chart
Lifetime PnL charts every equity snapshot since the first record — weeks of paper trading in one view.
Lifetime PnL chart
4. Positions Table
Live positions when IBKR sync is on: symbol, side, quantity, last price, notional, estimated unrealized PnL. Pairs strategies show offsetting legs (long one name, short another).
Positions table
5. Risk and Limits Panel
The risk card surfaces what the risk gate enforces before any order ships:
LimitExample configMax daily loss$1,000Max gross exposure$75,000Max position per symbol$5,000Max trades per day25
A loss vs daily cap progress bar shows how close session PnL is to tripping the gate.
Risk and limits panel
6. Agent Thresholds (Live Overrides)
This panel reflects News thresholds and related agents — not static YAML:
- Current
entry_z/exit_z - Market regime (
risk_on,cautious, etc.) - Paused symbols and paused sectors
When headlines spike, thresholds tighten without me editing config by hand.
Agent thresholds panel
7. Trade Blotter
The last 100 strategy fills from the trade journal — housekeeping flattens filtered out. Columns: time, symbol, side, qty, fill, sleeve, reason.
Trade blotter
This is where I catch churn — did a pair fire dozens of times in one session? The blotter tells the story.
8. Multi-Sleeve Strategy Engine
Hedgekit runs a multi-portfolio strategy with ordered sleeves:
Get Ashlyn Bain’s stories in your inbox
Join Medium for free to get updates from this writer.
Sleeve Style
- Pairs: Daily mean-reversion spreads
- Day trade: Intraday ETF mean reversion, flat by 3:50pm ET
- Baskets / Triplets: Dispersion research portfolios
Sleeves respect symbol exclusivity — one symbol does not appear in two books at once.
Strategy status
Agent Breakdown
Agents run inside the main loop when enabled. Each writes a markdown artifact to data/agents/ and may push overrides (paused symbols, entry_z deltas, sector focus).
The dashboard Agents tab lists schedule, last run, summary, and full artifact text.
Agents tab overview
Earnings Guard
Schedule: Daily after 07:00 ET
Data: Earnings calendar + optional LLM confirm
Effect: Pauses symbols with earnings in 1–2 days
Earnings guard agent
Sector Rotation
Schedule: Daily after 07:30 ET
Effect: Sets pair_sectors / triplet_sectors focus for the day
Sector rotation agent
Pre-Market Briefing
ScheduleDaily after 08:00 ETEffectRead-only morning context — headlines + threshold state
Pre-market briefing agent
News Thresholds (Intraday)
Schedule Every 1–4h in market hours
Effectentry_z, exit_z, regime, paused symbols/sectors
The most active agent intraday. Respects min_entry_z / max_entry_z floors from config.
News thresholds agent
Day-Trade Guard (Intraday)
Schedule: Every 15–20m when day-trade sleeve is ON
Effect: Pause sleeve, force flatten, widen entry_z on macro days
Day-trade guard agent
Post-Close Review
Schedule: Daily after 16:15 ET
Effect: End-of-day narrative journal
Post-close review agent
Trade Learning
Schedule: Daily after 16:30 ET
Effect:entry_z_delta, per-symbol pauses from 14-day fill stats
Closes the feedback loop — chronic churners get paused next session.
Trade learning agent
Corporate Actions
Schedule: Runner interval (min 24h between scans)
Effect: Flags splits, mergers, delistings for symbol registry
Corporate actions scan
How Agents Connect to the Runner
hedgekit-run (each poll)
│
├─► run_all_agents()
│ ├─ earnings_guard → paused_symbols
│ ├─ sector_rotation → pair_sectors
│ ├─ premarket_briefing → artifact only
│ ├─ post_close_review → artifact only
│ ├─ trade_learning → entry_z_delta, pauses
│ ├─ corporate_actions → registry scan
│ ├─ news_thresholds → entry_z, regime, pauses
│ └─ daytrade_guard → intraday sleeve guard
│
├─► merge overrides → strategy params
├─► strategy.on_bars() → orders
├─► risk_gate.evaluate()
└─► broker.submit()What I Am Learning
- Separate account PnL from journal PnL — IBKR NLV charts and internal estimates diverge; both belong in the UI.
- Agents should write human-readable artifacts — markdown reports are an audit trail.
- Overrides need floors —
min_entry_zstops an LLM from loosening risk too far. - If I cannot see regime and session PnL in one place, I will not trust the loop.
Disclaimer
Hedgekit is private educational software I built for myself. It is not financial advice, not a public repo, and not an invitation to copy my configuration. Paper and simulated modes exist so I can learn the shape of systematic trading without capital at risk.
Someday I may share more — but the mission is already clear in how I use it: make the learning path visible to myself first, without needing a finance degree or a seat at a hedge fund to understand how the plumbing works.







