Volatility Forecast API - EWMA, HAR-RV, GARCH(1,1) - FlashAlpha Lab API
Lab API Volatility Forecast

Volatility Forecast API

Conditional volatility forecasts from daily price history: EWMA (RiskMetrics, λ=0.94), HAR-RV (Corsi), and GARCH(1,1) fitted by maximum likelihood with selectable Gaussian or Student-t innovations.

Endpoint

GET /v1/volatility/forecast/{symbol}
Auth required (X-Api-Key) Rate Limited: Yes Alpha plan+

Parameters

Name In Required Default Description
symbol path yes - Underlying symbol (coverage limited to ramped symbols in the historical archive)
dist query no student_t GARCH innovation distribution: student_t or gaussian
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://lab.flashalpha.com/v1/volatility/forecast/AAPL?dist=student_t"
import requests

resp = requests.get(
    "https://lab.flashalpha.com/v1/volatility/forecast/AAPL",
    params={"dist": "student_t"},
    headers={"X-Api-Key": "YOUR_API_KEY"}
)
data = resp.json()
print(f"GARCH 21d: {data['garch']['forecast'][-1]['vol_annualized']}")
const resp = await fetch(
  "https://lab.flashalpha.com/v1/volatility/forecast/AAPL?dist=student_t",
  { headers: { "X-Api-Key": "YOUR_API_KEY" } }
);
const data = await resp.json();
console.log("EWMA next-day: " + data.ewma.next_day_forecast);

Response

{
  "symbol": "AAPL",
  "as_of": "2026-06-08T15:30:00Z",
  "ewma":   { "lambda": 0.94, "vol_annualized": 19.60, "next_day_forecast": 19.60 },
  "har_rv": {
    "vol_annualized": 20.30,
    "components": { "daily": 18.40, "weekly": 21.20, "monthly": 22.70 },
    "next_day_forecast": 20.10
  },
  "garch": {
    "model": "garch_1_1",
    "distribution": "student_t",
    "params": { "omega": 0.000003, "alpha": 0.078, "beta": 0.905, "dof": 6.20 },
    "persistence": 0.9830,
    "long_run_vol_annualized": 21.40,
    "half_life_days": 40.2,
    "converged": true,
    "forecast": [
      { "horizon_days": 1,  "vol_annualized": 20.10 },
      { "horizon_days": 5,  "vol_annualized": 20.60 },
      { "horizon_days": 21, "vol_annualized": 21.00 }
    ]
  }
}

Key Response Fields

Field Description
ewma.vol_annualizedCurrent EWMA conditional vol (%); next_day_forecast equals it (random walk in variance).
har_rv.componentsDaily / weekly (5d) / monthly (22d) realized-vol components, annualized %.
garch.paramsFitted ω, α, β (and dof for Student-t).
garch.persistenceα + β. Must be < 1 for a stationary fit.
garch.long_run_vol_annualizedAnnualized unconditional volatility: 100·sqrt(252 · ω/(1-α-β)); null for a non-stationary fit.
garch.half_life_daysHalf-life of a vol shock: ln(0.5)/ln(α+β).
garch.convergedfalse when the MLE fails to converge or the fit is non-stationary; forecast is then null.
garch.forecastTerminal conditional vol (annualized %) at 1/5/21-day horizons, reverting toward the long-run level.

The three models

  • EWMA (RiskMetrics, λ=0.94) - exponentially weighted moving variance. Fast-reacting, no parameters to fit; its next-day forecast equals the current level (variance follows a random walk).
  • HAR-RV (Corsi) - a heterogeneous autoregression that mixes daily, weekly, and monthly realized-vol components, capturing how short- and long-horizon traders both move vol.
  • GARCH(1,1) - the workhorse conditional-variance model, fitted by maximum likelihood with Gaussian or Student-t innovations; returns the full term structure of forecasts that mean-reverts toward the long-run level.

All annualized vols follow 100·sqrt(252·variance) from daily-return variance units. Price history comes from the historical replay archive (the OHLC series at GET /v1/stock/{symbol}/prices on historical.flashalpha.com), so coverage is limited to ramped symbols.

Notes

  • With daily-only data, HAR-RV uses squared daily returns as the realized-variance proxy.
  • GARCH is fitted by maximum likelihood via a deterministic (seeded) Nelder-Mead optimizer, so results are reproducible.
  • A non-convergent or non-stationary GARCH fit is not an error: it returns 200 with converged: false and a null forecast.

Errors

Status Description
400invalid_dist - dist must be student_t (default) or gaussian.
403tier_restricted - requires Alpha plan or higher.
404insufficient_history - genuine no-coverage (symbol not in the archive) or fewer than 30 daily bars.
429rate_limit_exceeded - the historical archive is rate limiting; retry shortly.
502upstream_error - the historical archive rejected the forwarded request.
503upstream_unavailable - the historical archive is down or unreachable.

About

Where /v1/volatility/realized tells you what vol has been, this endpoint tells you what the models expect vol to be. EWMA gives a fast tape-following read, HAR-RV captures multi-horizon persistence, and GARCH gives a mean-reverting term structure with a fitted long-run anchor and half-life. Compare the GARCH forecast against ATM implied vol from /v1/volatility to spot rich/cheap option premium.

Common Use Cases

  • Forecast multi-horizon vol for sizing - read garch.forecast at the 1/5/21-day horizons to set position size and stop distance against expected risk, not just trailing realized
  • Flag rich or cheap options - compare the 21-day garch.forecast against ATM implied vol; a forecast well below IV flags expensive premium to sell
  • Judge how sticky a vol shock is - use garch.half_life_days and garch.persistence to decide whether a spike will fade quickly or linger
  • Anchor mean reversion - use garch.long_run_vol_annualized as the level forecasts revert toward when deciding if current vol is stretched
  • Cross-check with a fast estimator - lean on ewma.next_day_forecast for a tape-following next-day read and har_rv.components to see daily/weekly/monthly persistence
  • Stress-test tail assumptions - switch dist=gaussian versus student_t and compare the fitted dof to gauge how much fat tails move the forecast
  • Gate on fit quality - skip a slice when garch.converged is false and fall back to EWMA or HAR-RV for that symbol

Related reading

Complementary endpoints

  • Realized Volatility - the backward-looking estimate this forecast is benchmarked against
  • VRP - the forecast-vs-implied spread as a ready-made signal
  • VIX State - index-level vol regime to contextualize a single-name forecast

Ready to build?

Get your free API key and start pulling live options data in 30 seconds.