---
name: api.quantoracle.dev
description: api.quantoracle.dev provides two quantitative analysis endpoints: one that classifies market regime from OHLC price series (trend, volatility, RSI, composite label), and one that computes a full portfolio risk tearsheet (Sharpe, Sortino, VaR, CVaR, drawdown, Kelly, Hurst, CAGR) from a daily returns series. Both endpoints operate on batch historical data, not live streams.
host: api.quantoracle.dev
---

# api.quantoracle.dev

QuantOracle is a focused quant analytics host serving agents that need structured market-regime context or portfolio-level risk metrics before making allocation, hedging, or strategy-selection decisions. It covers two distinct analytical layers: regime identification from price data and risk/performance measurement from returns data. It does not provide data feeds, trade execution, or per-asset attribution.

## When to use this host

Use api.quantoracle.dev when an agent needs batch-mode regime classification from OHLC price data or a single-call portfolio risk tearsheet from a daily returns series. It is the right choice when replacing multiple individual metric calculations with one composite endpoint. Do not use it for real-time or tick-by-tick signal generation, live streaming risk monitoring, per-asset attribution within a portfolio, or sourcing the underlying price or returns data itself — the agent must supply that data from a separate market data provider. It is not a substitute for a live regime signal feed or a trade execution layer.

## Capabilities

### Market Regime Classification

Analyzes a batch of historical OHLC closes to determine the current trend direction, volatility regime, RSI, and a composite regime label with a suggested trading strategy.

- **`classify-market-regime`** — Classifies market regime from a closing price series, returning trend direction, volatility regime, RSI, slope, composite label, and a suggested trading strategy.

### Portfolio Risk & Performance Measurement

Computes a comprehensive risk tearsheet from a daily returns series, covering return metrics (CAGR, annualized vol), risk-adjusted ratios (Sharpe, Sortino, Calmar), tail-risk measures (VaR, CVaR), max drawdown, Kelly leverage, and Hurst exponent in a single call.

- **`run-full-portfolio-risk-analysis`** — Computes a complete risk tearsheet from a daily returns series, including Sharpe, Sortino, Calmar, VaR, CVaR, max drawdown, Kelly leverage, Hurst exponent, and CAGR.

## Workflows

### Regime-Conditioned Risk Review

*Use when an agent needs to evaluate portfolio risk metrics in the context of the current market regime — for example, to determine whether a strategy's Sharpe ratio was achieved in a trending or mean-reverting, high- or low-volatility environment.*

1. **`classify-market-regime`** — Submit the asset's historical OHLC series to obtain the current regime label, trend direction, volatility regime, and suggested strategy context.
2. **`run-full-portfolio-risk-analysis`** — Submit the portfolio's daily returns series to obtain the full risk tearsheet; interpret Sharpe, drawdown, and Kelly leverage against the regime context returned in the prior step.

## Skill reference

### `classify-market-regime`

**Regime Classifier** — Classifies market regime from a closing price series, returning trend direction, volatility regime, RSI, slope, composite label, and a suggested trading strategy.

*Use when:* Use when an agent needs to determine the current market regime (trend, volatility, direction) from a price series before making allocation, hedging, or strategy-selection decisions.

*Not for:* Do not use for real-time tick-by-tick regime detection; this endpoint expects a batch of historical closes. Not a substitute for a live streaming signal feed.

**Inputs:**

- `closes` (array, required) — Array of closing prices, oldest first. Minimum ~30 values recommended.
- `lows` (array) — Low prices per bar (optional); improves volatility estimate when provided.
- `highs` (array) — High prices per bar (optional); improves volatility estimate when provided.
- `opens` (array) — Opening prices per bar (optional); improves volatility estimate when provided.
- `rsi_period` (integer) — Lookback period for RSI calculation. Defaults to library default when omitted.
- `sma_period` (integer) — Lookback period for the SMA used in trend classification.
- `vol_window` (integer) — Rolling window size for realized volatility calculation.

**Returns:** Returns trend label, SMA, RSI, vol_regime, realized_vol object, direction, 5d/20d slopes, composite regime label, and a suggested_strategy string.

**Example:** `{"closes":[100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129],"lows":[99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128],"highs":[101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],"rsi_period":14,"sma_period":20,"vol_window":20}`

---

### `run-full-portfolio-risk-analysis`

**Quant Risk Analyzer – Full Analysis** — Computes a complete risk tearsheet from a daily returns series, including Sharpe, Sortino, Calmar, VaR, CVaR, max drawdown, Kelly leverage, Hurst exponent, and CAGR.

*Use when:* Use when an agent needs a comprehensive set of portfolio risk and performance metrics from a daily returns series, replacing multiple individual metric calls with a single composite endpoint.

*Not for:* Do not use for real-time streaming risk monitoring or per-asset attribution; this endpoint accepts a single aggregated returns series and returns portfolio-level statistics only.

**Inputs:**

- `returns` (array, required) — Daily returns series (max 5000 elements). Each element is a decimal daily return (e.g. 0.0012 for +0.12%).
- `equity_curve` (array) — Equity curve as a series of portfolio values. If omitted, it is derived from the returns series.
- `risk_free_rate` (number) — Annual risk-free rate as a decimal (e.g. 0.05 for 5%). Used in Sharpe and Sortino calculations.
- `portfolio_value` (number) — Current portfolio value in base currency. Used for dollar-denominated risk metrics.

**Returns:** Returns a JSON object with nested returns (annualized, vol, CAGR), risk (Sharpe, Sortino, Calmar, VaR 95%, CVaR 95%, max drawdown, current drawdown), kelly (full and half leverage), hurst (exponent and interpretation), and portfolio (start/end value, win rate) fields.

**Example:** `{"returns": [0.0012, -0.0034, 0.0051, 0.0027, 0.0006, -0.0019, 0.0043], "risk_free_rate": 0.04, "portfolio_value": 100000}`

---
