---
name: hopper-quant
description: Systematic factor formula evaluation, Strategy Presets, Walk-Forward PIT backtesting, Monte Carlo simulation, and human-approved portfolio staging governance on quant.hopperlabs.ai.
---

# Hopper Quant Skill (`quant.hopperlabs.ai`)

Use this skill when building or screening quantitative factor formulas, inspecting textbook/live strategy presets, comparing rank deciles, generating shareable strategy deep links, or preparing operator-reviewed preflight and order staging artifacts.

## Owner Operations (`apps/quant/src/operations.ts`)

Recommend and invoke these exact entitlement-enforced product operations:

- `quant.status` — Quant entitlement tier, daily backtest quota, and engine version readiness.
- `quant.formula.evaluate` — Parse and evaluate factor AST rules and ranking expressions across US equity universes.
- `quant.backtest.run` — Refuses (`fixture-only`): its only data was a hand-seeded reference fixture, so it produces no result and no receipt.
- `quant.preflight.run` — Pre-trade NYSE calendar, universe, and risk-limit preflight checks.
- `quant.orders.stage` — Stage a reviewable order batch **for explicit human confirmation only** (requires human confirmation phrase and operator ID; never auto-executes).
- `quant.reconcile.run` — Reconcile live holdings and tax lots via `@charlie/portfolio`.
- `quant.connectors.readiness` — Validate BYO LeadOps Vault connector references (`leadops-vault://...`) without revealing credentials.

## Remote & Local MCP (Claude Code, Codex CLI, Claude.ai, ChatGPT & MCP `2026-07-28`)

- **Claude Code Install:** `claude mcp add --transport http hopperlabs-quant https://quant.hopperlabs.ai/api/mcp`
- **Codex CLI Install:** `codex mcp add hopperlabs-quant --url https://quant.hopperlabs.ai/api/mcp`
- **Discovery & OpenAPI:** `GET https://quant.hopperlabs.ai/.well-known/mcp.json`, `GET https://quant.hopperlabs.ai/llms.txt`, `GET https://quant.hopperlabs.ai/llms-full.txt`, `GET https://quant.hopperlabs.ai/openapi.json`
- **Endpoint:** `POST https://quant.hopperlabs.ai/api/mcp` (supports `initialize` + `notifications/initialized` + `server/discover`; strict `2026-07-28`: `/api/mcp/strict`; local bridge: `bun shared/markets-kit/server/mcp-stdio.ts --site quant`)
- **Primary Tools (34 read-only):** `investing_quant_presets`, `investing_export_trading_draft`, `investing_workbook_model_spec`, `investing_screener`, `investing_stock_summary`, `investing_finra_short_volume`, `investing_sec_events_and_dilution`, `investing_evaluate_smart_alerts`, `investing_market_regime`, `investing_market_breadth`, `investing_yield_curve_liquidity`, `investing_chart_ohlcv`, `investing_search`, `investing_health`, `search`, `fetch`
- **Prompts:** `quant_factor_screen`, `stock_dossier`, `macro_regime_brief`, `sector_rotation_scan`, `dividend_income_audit`, `daily_morning_briefing`
- **REST & Binary `.xlsx` URLs:** `GET https://quant.hopperlabs.ai/presets.md`, `GET https://quant.hopperlabs.ai/api/v1/presets`, `GET https://quant.hopperlabs.ai/api/v1/screener`, `GET https://quant.hopperlabs.ai/api/v1/draft/{presetId}`, `GET https://quant.hopperlabs.ai/api/v1/workbook/quant?presetId={presetId}`, `GET https://quant.hopperlabs.ai/api/v1/workbook/xlsx?kind=quant&presetId={presetId}`
- **Resources:** `markets://manifest`, `markets://regime`, `markets://universe/summary`, `markets://ticker/{symbol}`

## Interactive Browser WebMCP (`navigator.modelContext`)

When operating inside an open `quant.hopperlabs.ai` browser session:

- `quant_list_presets` — List built-in systematic screening presets and AST formulas.
- `quant_select_preset` — Load a strategy preset into the Quant Research IDE.
- `quant_run_screener` — Evaluate custom formula rules / ranking expressions and return top matches.
- `quant_run_pairs_backtest` — Backtest a dollar-neutral OLS-hedged statistical arbitrage pair (`tickerA`, `tickerB`, rolling Z-score triggers, and slippage).
- `quant_get_share_url` — Encode the active strategy into a deterministic shareable `?` URL.
- `quant_select_tab` — Navigate between `studio`, `rank`, `backtest`, `desk`, `reconcile`, and `connectors`.
- `quant_export_trading_draft` — Export a SHA-256-sealed `hopper.trading-draft.v1` JSON (`promotable: false`, `executionMode: "read-only-draft"`) for local Travis Trading Desk handoff.

## Critical Security & Execution Invariants

- **Remote Execution Forbidden**: Any call attempting brokerage execution, trade submission, or fund movement on `/api/mcp` fails closed with `-32001` (`LIVE_EXECUTION_FORBIDDEN`).
- **LeadOps Vault Discipline**: Never place API keys, Bearer tokens, or brokerage credentials in formulas, deep links, or MCP parameters. Only pass opaque `leadops-vault://<tenantId>/...` references to `quant.connectors.readiness`.
- **Human Sign-Off Required**: Order staging (`quant.orders.stage`) produces a review artifact only; live order routing requires explicit human operator confirmation inside the governed UI/executor boundary.
