# ECB 90-Day FX Realized Volatility & Z-Score Regime API

- **Canonical HTML**: https://quantdesk.fastmesh.dev/seo_geo/ecb-90-day-fx-realized-volatility-zscore-api.html
- **Target Query**: `ECB 90 day FX realized volatility z-score API` (`calculator`)
- **Source Family**: `ecb_fx` | **MCP Tool**: `quantdesk_full_brief` | **Pricing**: $0.10 full brief ($0.05 harvest-only; $0 on unchanged)
- **Seed**: `42` | **Trials**: `10000` | **Receipt SHA-256**: `72722334ea2666244b3cf4e17fbc735bee6364df1e4aba6f96da5a64bfc4b1a7`

## Direct Answer
Ingest the European Central Bank's rolling 90-day official FX XML series (~63 TARGET business days across 29 currencies) to compute 20-day annualized realized volatility, z-score mean-reversion regimes, and Monte Carlo FX hedge drawdown distributions.

## Rolling 20-Day Realized FX Volatility & Z-Score Dislocation
- Daily Simple Return: r_t = (S_t - S_{t-1}) / S_{t-1} ordered chronologically from oldest to newest TARGET day.
- Annualized Realized Vol: sigma_ann = sqrt(252) * std(r_{t-19..t}).
- Regime Z-Score: z_t = (S_t - mean(S_{t-19..t})) / std(S_{t-19..t}); factor_score = clamp(z_t / 3.0, -1.0, 1.0).

## Deterministic 10,000-Trial Risk Metrics (Seed 42)
- P5 / P50 / P95 Return: -2.59% / +1.47% / +5.49%
- Mean / Std Return: +1.49% / 2.47%
- VaR 95 / CVaR 95: 2.59% / 3.53%
- VaR 99 / CVaR 99: 4.11% / 4.90%
- Max Drawdown (95th) / Ruin Probability: 3.32% / 0.00%
- Half-Kelly Cap: 25.00%
- Top Tornado Driver: `expected_return` (swing 5.79%, variance share 76.9%)

## Key Engineering Capabilities
- Correctly reverses ECB eurofxref-hist-90d.xml ordering (which ships newest-date-first) before computing sequential returns.
- Supports all 29 official ECB reference currencies including USD, JPY, GBP, CHF, CAD, AUD, SEK, NOK, PLN, and CZK.
- Feeds realized FX volatility directly into Stage 4 Monte Carlo currency-exposure VaR 95/99 modeling.

## Remote `/mcp` Invocation Example
```bash
curl -fsSL -X POST "https://quantdesk.fastmesh.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "quantdesk_full_brief", "arguments": {"source_type": "ecb_fx", "source_url": "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml", "seed": 42, "trials": 10000, "horizon_days": 21, "initial_capital": 1000000}}}'
```

## Frequently Asked Questions
### In what chronological order does ECB eurofxref-hist-90d.xml list dates?
The XML publishes the newest TARGET business day first. Our parser sorts cubes chronologically ascending before calculating returns and rolling 20-day volatility.

### How frequently are official ECB FX reference rates updated?
The European Central Bank publishes reference rates around 16:00 CET on every TARGET business day (cached for 300 seconds on the ECB CDN).

### Can treasury and FX risk agents derive non-EUR cross volatilities?
Yes. Because all 29 currencies share an identical daily timestamp, Decimal cross rates such as USD/JPY and GBP/USD are derived cleanly for every historical day.

## Compliance & Zero-Resale Policy
Agent-WallStreet-Desk is a deterministic quantitative public-disclosure extraction and Monte Carlo risk modeling engineering tool only. It is NOT investment advice under the U.S. Investment Advisers Act of 1940, NOT a broker-dealer, and provides ZERO asset management, trade execution, or custody. 100% legal public regulatory disclosures and public market data only (zero MNPI, zero paywall bypass). Strictly $0 billed on empty, unchanged, fake-200, SSRF-blocked, or HTTP 422 responses. Zero client trading strategy, portfolio holdings, or watchlist retention or resale (zero_resale_policy: true). Support: support@fastmesh.dev.
