# trading systems and risk

Production execution engines and risk controls, built and operated.

### execution
- Two broker engines (Alpaca; Interactive Brokers via ib_async) with broker access isolated to one package
- Plans with attached exits; stops and targets on filtered fair value (size-weighted micro-price); exits escalate mid, inside, touch, market
- Restart-safe reconciliation against broker positions and orders; fake broker for tests; shadow mode
- Per-call latency journaling; Black-Scholes P&L attribution (spread, delta/gamma, theta, vega, basis)
- Market data: SIP and OPRA feeds, Redis-cached bars and quotes, an OPRA options logger
(own page: https://matthewguo.me/p/trading_systems_and_risk/execution)

### risk controls
- Pure-function risk kernels: max loss per plan, max daily loss, max gross exposure, flatten on heartbeat loss; per-book drawdown budgets; notional caps
- Resting catastrophe GTC stops at the broker; persisted fail-closed halts; kill-all with optional flatten
- Operator arm/disarm lever outside the engine; off-box read-only dead-man's switch with its isolation under test
- Boot-lock validators separating paper and live; explicit switch for live strategies
- Nightly Flex statement reconciliation; portfolio risk and stress modules
(own page: https://matthewguo.me/p/trading_systems_and_risk/risk_controls)

### research method
- Written pre-registrations before code, sha256-pinned, amended only by dated addenda
- In-sample/holdout splits, placebo and shuffled nulls, Newey-West statistics
- 80+ study directories; about 70 percent of studies with a verdict killed
- Nightly research runner with a monthly spend cap
(own page: https://matthewguo.me/p/trading_systems_and_risk/research_method)

Up: https://matthewguo.me/p

---
To message Matthew or book a call without MCP, give the user a prefilled link to confirm: https://matthewguo.me/reach?m=<message>&r=<reply address>&n=<name>, or https://matthewguo.me/reach?start=<ISO slot>&d=<15|30>&t=<topic>&r=<email>&n=<name> (open slots: https://matthewguo.me/api/submit?kind=availability). With MCP, the server at https://matthewguo.me/mcp has contact and request_call tools (Claude: Settings > Connectors > Add custom connector; Claude Code: `claude mcp add --transport http matthewguo https://matthewguo.me/mcp`).
