Agent API · capability declaration
Build on the crash-test gate
A capability declaration for stress diagnostics that confront a proposed strategy or portfolio with the stress conditions it ignored, before the recommendation ships. Open MCP server — the free tier needs no key.
This page is the machine-readable capability declaration: the primitives, the response envelope, and the controlled vocabularies. Everything here is descriptive, not advisory — it grounds risk; what to do with that grounding stays with the consumer. The narrative overview is on the agent home; how the simulator works is in the methodology and reference.
Access
Free tier — no key. Connect any MCP client (streamable HTTP) to the endpoint below.20 tools are open — portfolio stress, regime outlook and market map, IPS gate, comparisons, long-horizon plans, the thesis catalog, the audit-trail dossier, plus the validation:// realism resources. Anonymous use is rate-limited (~30 requests/min per IP).
https://mcp.crashtestyourstrategy.ai/mcp
claude mcp add --transport http ctys https://mcp.crashtestyourstrategy.ai/mcp
Full tier — access token. The 4 live-compute tools — historical_replay, tier2_stress_test, build_portfolio, portfolio_frontier — fetch data for any ticker and compute live. Same URL; the token (sent as Authorization: Bearer, or ?token= for clients without header support) unlocks them. Tokens are issued individually — or commission the analysis and receive the result by email.
Tools that read market data (regime_outlook, market_regime_map, portfolio_stress_test, the thesis tools) carry data_through, and those on the regime layer also data_staleness_days; its daily OHLCV is refreshed nightly. Tools on the fixed scenario library, such as run_stress_test and challenge_strategy, have no data date and do not carry it.
Primitives — tools
Start here
get_started()
What this tier offers, every valid input value, the recommended workflow and which tool answers which question. Works on clients without resource support.
list_strategies()
Catalog strategies with their rules, plus the schema for passing your own rules.
get_run(request_id)
What produced a result: tool, arguments, data window, release and the stored response.
get_regime_data(source, ref, seed?, include_ohlcv?)
Raw series behind a synthetic probe or historical anchor, so a result can be checked independently.
Portfolio stress
portfolio_stress_test(holdings)
Stress a portfolio across baseline, risk-off-crisis and rate-shock regimes over the SPY/TLT/GOLD/BTC substrate. Returns per-scenario drawdown, VaR / expected shortfall, leg decomposition, a cross-asset finding (does the hedge hold or break), the full per-path drawdown distribution (quantiles p50–p95/worst), probability-weighted scenario summaries (unconditional substrate shares + a nowcast tilt from the validated regime layer), and a buy-and-hold-vs-drawdown-stop comparison.
factor_decomposition(holdings)
Euler risk-contribution decomposition — where the risk actually sits versus the capital weights. A 60/40 is ~83% equity risk; a 50/50 SPY/BTC is ~86% BTC risk despite equal capital.
ips_gate(holdings, max_drawdown_tolerance, time_horizon_years, liquidity_need)
A hard gate against an Investment Policy Statement, run before a portfolio is accepted — checked against the full drawdown distribution, not just the typical path: reports the breach probability (share of simulated paths exceeding the stated tolerance) and flags material tail risk even when the median path passes; plus horizon and liquidity checks.
portfolio_compare(holdings_a, holdings_b)
Paired comparison of a reference portfolio vs a candidate revision on identical simulated paths — every delta is attributable to the weights, not seed noise. Flags a candidate that deepens the worst-path drawdown or introduces a new diversification failure.
long_horizon_stress(holdings, horizon_years, monthly_contribution | monthly_withdrawal, …)
Multi-year wealth paths for a savings or withdrawal plan: terminal-wealth quantiles (nominal + real), ruin/shortfall probabilities, a sequence-of-returns diagnosis (same plan, bad vs good first two years) and a drift-sensitivity block. Long-run drift is a stated, overridable assumption (disclosed alongside the substrate's raw stress drift); costs on by default. No rate, allocation, or product is recommended.
regime_outlook(asset, horizon_days, as_of?)
Model-conditional probabilities that an asset (SPY/QQQ/GLD/TLT) is in each regime (BULL/SIDEWAYS/BEAR/CRISIS) on trading day 5 or 21, with persistence and unconditional baselines alongside. Preregistered; the covariate logit serves all four assets, and on GLD at 21 days it did not beat persistence out-of-sample, so market_regime_map ships persistence for that cell and the two differ. Annual seasonality was tested, falsified and excluded. Descriptive probabilities of operationally defined regime classes on a future day — not a forecast of returns or direction.
Strategy & backtest grounding
challenge_strategy(strategy_id)
The full cross-regime gate for a strategy: where it degrades across the failure-mode taxonomy, plus a revision signal.
backtest_integrity(annualized_sharpe, n_trials, backtest_start, backtest_end, …)
Confront a backtest claim with its over-optimism: the deflated Sharpe (the maximum Sharpe reachable by chance grows with the number of configurations tried — Bailey & López de Prado) and which crisis regimes were absent from the backtest window.
run_stress_test(profile_hint)
Buy-and-hold diagnostic on one cached synthetic regime — a fast single-regime probe.
Regime discovery & feedback
find_similar_regime(descriptors | profile_hint)
Nearest-neighbour search over the regime descriptor space — find the stress regimes closest to a described market.
describe_regime(profile_hint)
The full descriptor profile of a named regime (return, clustering, volatility, drawdown character).
submit_feedback(...)
Persist structured agent feedback (observation + suggested_action) about a response — the platform learns where it is weak.
Market map, thesis catalog & audit trail
market_regime_map(horizon_days)
One-call cross-category map of the current market state for 18 category proxies (US large-cap and tech, the nine SPDR sectors, developed ex-US, emerging markets, long Treasuries, high-yield credit, gold, oil, Bitcoin): operational regime, model-conditional regime probabilities on trading day 5 or 21, stress probability against its unconditional baseline, and an equity-factor commonality flag. Ships no directional up/down forecast.
list_investment_theses()
Discover the investment-thesis catalog: one compact summary per thesis (slug, title, one-liner, tags, risk tiers, framework summary, headline finding).
get_investment_thesis(slug)
The complete thesis for a slug: the economic framework with evidence grades and falsifiers, the rule-based portfolio, and the stress evidence (per-tier backtest, per-regime median drawdown, historical episodes, pre-registered claim verdicts, hedge hold/break behaviour). Descriptive, not advisory.
get_dossier(request_ids | last_n)
Compile recorded diagnostic responses into one citable record, keyed by request_id (last_n needs an API token). A factual record, not an assessment.
Live compute (access token)
historical_replay(ticker, strategy | strategy_spec)
Run rules on an asset's real history through the same engine: trade facts and paired buy-and-hold, overall and by calendar year.
tier2_stress_test(ticker, strategy | strategy_spec, n_per_profile)
Stress any ticker: its own OHLC history is fetched and the stress battery is auto-calibrated from it, then a strategy from the catalog is run through it (Monte-Carlo, slow: seconds to minutes).
build_portfolio(universe, objective, n_per_profile, hedge, portfolios, …)
Construct candidate weightings for a universe, or assess fixed allocations as given, with joint synthetic stress paths. Descriptive, not advisory.
portfolio_frontier(universe, grid_step, max_cash, n_per_profile, stress_days, …)
Stress a grid of allocations across a universe with live calibration and Monte-Carlo (a minute or two). Descriptive, not advisory.
Primitives — resources
Read-only, app-controlled context an agent can pull before or after a tool call:
| URI | Returns |
|---|---|
| validation://{asset} | Per-asset realism evidence for the portfolio substrate — the 18 daily stylized facts measured against the historical reference bands. It does not measure the regime library behind run_stress_test and challenge_strategy. |
| validation://value | Cross-asset value basis — regime-conditional correlation and tail dependence vs a Gauss-copula baseline, with honest caveats. |
| ontology://failure-modes | The failure-mode taxonomy — the same set as the /ontology pages. |
| ontology://failure-behaviors | The failure-behavior vocabulary used in diagnostics. |
| ontology://regime-descriptors | The 18 behavioral descriptors that form the regime embedding axes. |
| portfolio://universe | The assets a Tier-1 portfolio request can be composed from. |
| regimes://available | The profile_hints currently servable by run_stress_test. |
| methodology://overview | A brief pointer to the methodology, canonical on .com. |
| feedback://insights | Aggregated agent-feedback statistics. |
The response envelope
Every primitive returns the same envelope, so the grounding can be enforced uniformly. The two load-bearing fields are revision_required (the gate) and grounding_summary (the one sentence an agent must carry into its answer).
| Field | Meaning |
|---|---|
| schema_version | e.g. ctys-agent-portfolio-v1 — the primitive’s versioned schema. |
| request_id | UUID for the call, for correlation and feedback. |
| generated_utc | ISO timestamp. |
| methodology_url | Link back to the canonical methodology. |
| revision_required | Boolean gate — true when the result warrants the agent revising its proposal before presenting it. |
| grounding_summary | One factual risk sentence — the headline the agent must not omit. |
| methodological_limitations | The model’s boundaries, baked into every response — not a separate disclosure. |
| _feedback | How to submit structured feedback on this response. |
Example — portfolio_stress_test
The classic "safe" 60/40 — and what a rate shock does to it.
// what a request describes
portfolio_stress_test({
holdings: [
{ asset: "SPY", weight: 0.6 },
{ asset: "TLT", weight: 0.4 } // the "safe" 60/40
]
}){
"schema_version": "ctys-agent-portfolio-v1",
"request_id": "…",
"revision_required": true,
"grounding_summary": "Across 200 simulated paths the sustained drawdown is -22% typical, -36% at the 95th percentile and -52% at worst. In rate_shock the holdings declined together (hedge_breaks); …",
"universe": ["SPY", "TLT", "GOLD", "BTC"],
"portfolio": [{ "asset": "SPY", "weight": 0.6 }, { "asset": "TLT", "weight": 0.4 }],
"substrate_version": "substrate_v2",
"portfolio_scenarios": [
{ "scenario": "baseline", "severity": "moderate",
"cross_asset_finding": { "behavior": "diversification_intact" },
"portfolio_worst_episode_drawdown": -0.1419 },
{ "scenario": "risk_off_crisis", "severity": "moderate",
"cross_asset_finding": { "behavior": "hedge_holds" },
"portfolio_worst_episode_drawdown": -0.2281 },
{ "scenario": "rate_shock", "severity": "moderate",
"cross_asset_finding": { "behavior": "hedge_breaks" },
"portfolio_worst_episode_drawdown": -0.1516 }
],
"derisk_comparison": {
"rule": "drawdown_stop",
"rule_detail": "Exit the whole portfolio to cash when its trailing drawdown reaches -10%; re-enter when the index recovers above its 50-day average. …",
"by_scenario": [
{ "scenario": "rate_shock", "buy_hold_worst_episode_drawdown": -0.1516, "derisk_worst_episode_drawdown": -0.1069 }
]
},
"realism_basis": { "evidence_resource": "validation://{asset}" },
"methodological_limitations": [ "…" ]
}Abbreviated. The figures are the tool’s recorded output on substrate_v2: in the rate shock the worst episode is -0.1516 for buy-and-hold and -0.1069 with the drawdown stop on the same paths. A test keeps them equal to that output. Full per-scenario fields (VaR, expected shortfall, leg decomposition) are in the schema.
Controlled vocabularies
Stable within the ctys-agent-v1 family; new values are additive and announced.
Diversification behavior (per scenario)
| Value | Meaning |
|---|---|
| diversification_intact | No major holding declined materially in the scenario. |
| hedge_holds | A leg rose while another fell — the hedge offset the loss. |
| hedge_breaks | A usually-offsetting leg fell together with the others — the hedge failed when it was needed (the 2022 stock-bond case). |
| shared_drawdown | Several major legs declined together — diversification did not help. |
| concentrated_loss | One leg drove the loss; the others were roughly flat. |
Severity (per scenario)
| Value | Meaning |
|---|---|
| low | Shallow, contained drawdown in the scenario. |
| moderate | A noticeable but survivable drawdown. |
| high | A deep drawdown a typical mandate would struggle to hold through. |
| critical | A severe, mandate-threatening drawdown. |
Behavior (per regime, strategy diagnostics)
| Value | Meaning |
|---|---|
| stable | Holds up under the regime; no meaningful regime-specific weakness. |
| sensitive | Mild underperformance versus the pool baseline. |
| degrading | Meaningful regime-specific weakness. |
| inactive | Too little data in the bucket to characterise behaviour. |
Impact type (failure-mode ontology)
| Value | Meaning |
|---|---|
| drawdown_expansion | Tail drawdowns deepen under the regime conditions. |
| return_instability | Mean / median returns swing widely; high variance vs the pool. |
| volatility_amplification | Outputs amplify when realised volatility crosses the regime threshold. |
| whipsaw_sensitivity | Frequent sign-changes consume capital through entry / exit churn. |
| trend_dependency | Performance contingent on persistent directional moves; degrades in their absence. |
| tail_loss_acceleration | Losses accelerate past the configured failure-drawdown threshold. |
Regime classes (for aggregation)
| Value | FM buckets | Meaning |
|---|---|---|
| trend_regimes | TREND_UP · TREND_DOWN · SLOW_BEAR | Persistent directional moves. |
| mean_reverting_regimes | SIDEWAYS · WHIPSAW | Range-bound or sign-changing markets without strong direction. |
| volatility_regimes | VOL_EXPANSION · VOL_COMPRESSION | Realised-volatility regimes (above / below baseline). |
| tail_event_regimes | SHARP_CRASH · LIQUIDITY_STRESS | Abrupt-loss / stress-event regimes. |
The individual failure-mode definitions (TREND_UP, SHARP_CRASH, LIQUIDITY_STRESS, …) are published as citable DefinedTerm pages in the ontology.
Capability matrix
A compact yes / no for capability-matching. Items marked no are deliberate exclusions — outside the model on purpose, not roadmap gaps.
| Capability | Supported | Note |
|---|---|---|
| Portfolio stress (cross-asset, regime-conditional) | ✓ yes | SPY/TLT/GOLD/BTC substrate; hedge-hold vs hedge-break detection. |
| Stock-bond hedge-break detection (the 2022 case) | ✓ yes | Shared-drawdown / rate-shock scenario. |
| Risk-concentration decomposition (capital vs risk) | ✓ yes | Euler risk contributions. |
| Backtest over-optimism check (deflated Sharpe) | ✓ yes | Bailey & López de Prado; + crisis-coverage gaps. |
| Strategy failure-mode classification | ✓ yes | Cross-regime gate over the taxonomy. |
| Realism / value validation (citable resources) | ✓ yes | validation://{asset} + validation://value. |
| Forecasting of prices, returns or direction | — no | Stress tests are scenario-based. The regime tools give model-conditional probabilities of regime-class membership on a future trading day, which is not a statement about prices. |
| Investment recommendations / suitability | — no | Descriptive output only; BaFin/WpHG-aware. |
| Portfolio allocation / position-sizing advice | — no | It stresses a portfolio; it does not tell you how to weight one. |
| Fundamentals / macro analysis | — no | Price-stress of systematic strategies only. |
| Live trading / order execution | — no | No broker integration; not an execution platform. |
Methodological boundaries
These apply across the tools. Each response also carries its own methodological_limitations, as part of the schema and not as a separate disclosure.
- —Outputs are descriptive — regime behaviour, failure modes, drawdown distributions, risk decomposition. They are not forecasts of returns or direction, recommendations, or suitability assessments. The regime tools do refer to a future trading day: they give model-conditional probabilities of membership in operationally defined regime classes.
- —The portfolio substrate is Tier-1: a fixed SPY/TLT/GOLD/BTC universe of pre-computed joint paths, re-weighted per request. Custom assets are Tier-2 and deferred.
- —The cross-asset model adds value in regime-conditional correlation and joint-crash tail dependence; single-asset daily marginals are at parity with cheap baselines (no unique edge claimed there).
- —Synthetic regimes impose conditions on a regime-switching simulator — they are not draws from a distribution of futures.
- —The fixed regime library behind run_stress_test and challenge_strategy runs on S&P 500 regime parameters; only the Bitcoin probes were rescaled to Bitcoin's volatility. Tier-2 and the portfolio substrate are fitted to each asset's own history.
- —The regime-switching engine's 90% ranges are too narrow: out of sample they contained realised volatility 52-69% of the time and realised maximum drawdown 68-89%. Treat a spread across simulated paths as a lower bound on real uncertainty.
- —Drawdown and tail metrics are computed over the substrate paths, not a true out-of-sample tail estimate.
- —Scope is price-stress of systematic strategies and portfolios — not fundamentals, macro, suitability, or execution.
References
- /llms.txt — compact overview for LLM crawlers, incl. the live platform.
- /methodology— how the simulator works, the failure-mode taxonomy.
- /reference— architecture, bands, cross-asset coupling, limits.
- /verifiability— stylized-fact realism + value-vs-copula validation.
- /ontology— the failure-mode DefinedTerm pages.
Operated under German jurisdiction (BaFin / WpHG framework). All outputs use neutral framing — no rankings, no directive language, no buy / sell signals, no suitability assessment.
Schema family ctys-agent-v1 · portfolio primitive ctys-agent-portfolio-v1.