Volatility Forecast API - EWMA, HAR-RV, GARCH(1,1) | FlashAlpha
  1. 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, plus five models on 5-minute realized variance and 30-day implied vol: HAR-RV, HAR-IV, HARQ, Realized GARCH and HEAVY.

Endpoint

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

Parameters

Name In Type Required Default Description
symbol path string required - Underlying symbol (any of the 200+ symbols in the historical archive)
dist query enum student_t GARCH innovation distribution: student_t or gaussian. Invalid values return 400 invalid_dist.

Request

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"}
)
resp.raise_for_status()
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" } }
);
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();
console.log("EWMA next-day: " + data.ewma.next_day_forecast);

Try it live

Runs on live market data and uses 1 request from your daily quota.

GET

Response

{
  "symbol": "AAPL",
  "as_of": "2026-11-09T10:46:10.5361362Z",
  "ewma": {
    "lambda": 0.94,
    "vol_annualized": 32.68,
    "next_day_forecast": 32.68
  },
  "har_rv": {
    "vol_annualized": 39.19,
    "components": {
      "daily": 7.23,
      "weekly": 46.63,
      "monthly": 31.67
    },
    "next_day_forecast": 39.19
  },
  "garch": {
    "model": "garch_1_1",
    "distribution": "student_t",
    "params": {
      "omega": 0.0001021038591330686,
      "alpha": 0.22046766722834052,
      "beta": 0.5658983288811215,
      "dof": 3.0220319160058273
    },
    "persistence": 0.7864,
    "long_run_vol_annualized": 34.7,
    "half_life_days": 2.9,
    "converged": true,
    "forecast": [
      {
        "horizon_days": 1,
        "vol_annualized": 33.97
      },
      {
        "horizon_days": 5,
        "vol_annualized": 34.43
      },
      {
        "horizon_days": 21,
        "vol_annualized": 34.7
      }
    ]
  },
  "realized_models": {
    "as_of_session": "2026-11-06",
    "computed_at": "2026-11-09T10:42:44.6444728Z",
    "observations": 1000,
    "iv30": 25.48,
    "target": "mean_daily_close_to_close_variance_next_h_sessions",
    "models": [
      {
        "model": "har_rv_5m",
        "converged": true,
        "forecast": [
          { "horizon_days": 1, "vol_annualized": 38.85 },
          { "horizon_days": 5, "vol_annualized": 33.71 },
          { "horizon_days": 21, "vol_annualized": 29.82 }
        ],
        "params": {
          "h1_const": 0.0001294393,
          "h1_daily": 0.1173249009,
          "h1_weekly": 0.427236304,
          "h1_monthly": 0.0230634349,
          "h5_const": 0.0001713538,
          "h5_daily": 0.1488612656,
          "h5_weekly": 0.1651533586,
          "h5_monthly": 0.1099666051,
          "h21_const": 0.0002236055,
          "h21_daily": 0.041233971,
          "h21_weekly": 0.0521704686,
          "h21_monthly": 0.1493405953
        }
      },
      {
        "model": "har_iv",
        "converged": true,
        "forecast": [
          { "horizon_days": 1, "vol_annualized": 34.23 },
          { "horizon_days": 5, "vol_annualized": 29.17 },
          { "horizon_days": 21, "vol_annualized": 27.02 }
        ],
        "params": {
          "h1_const": -0.0002455761,
          "h1_daily": 0.0797728311,
          "h1_weekly": 0.2432442653,
          "h1_monthly": -0.206762381,
          "h1_implied": 2.0217159036,
          "h5_const": -0.0001440185,
          "h5_daily": 0.1166322232,
          "h5_weekly": 0.0101433212,
          "h5_monthly": -0.0829504285,
          "h5_implied": 1.7003809676,
          "h21_const": 4.65485E-05,
          "h21_daily": 0.02301885,
          "h21_weekly": -0.0352795812,
          "h21_monthly": 0.0397917239,
          "h21_implied": 0.9595585786
        }
      },
      {
        "model": "harq",
        "converged": true,
        "forecast": [
          { "horizon_days": 1, "vol_annualized": 39.44 },
          { "horizon_days": 5, "vol_annualized": 33.47 },
          { "horizon_days": 21, "vol_annualized": 29.99 }
        ],
        "params": {
          "h1_const": 0.0001207111,
          "h1_daily": 0.1613177966,
          "h1_weekly": 0.4347755864,
          "h1_monthly": 0.0113895987,
          "h1_daily_rq": -11.451796645,
          "h5_const": 0.0001743769,
          "h5_daily": 0.1333320098,
          "h5_weekly": 0.1625388905,
          "h5_monthly": 0.1141113878,
          "h5_daily_rq": 4.0120346712,
          "h21_const": 0.0002216716,
          "h21_daily": 0.0512063267,
          "h21_weekly": 0.0538446235,
          "h21_monthly": 0.1466705815,
          "h21_daily_rq": -2.5734938996
        }
      },
      {
        "model": "realized_garch",
        "converged": true,
        "forecast": [
          { "horizon_days": 1, "vol_annualized": 36.37 },
          { "horizon_days": 5, "vol_annualized": 33.13 },
          { "horizon_days": 21, "vol_annualized": 28.22 }
        ],
        "params": {
          "omega": -1.3798900701,
          "beta": 0.488707392,
          "gamma": 0.3376799269,
          "xi": 0.1208350244,
          "phi": 1.0416258101,
          "tau1": -0.0452364569,
          "tau2": 0.1535598087,
          "sigma_u": 0.5845577294,
          "persistence": 0.8404435193,
          "loglik": 1896.916972765
        }
      },
      {
        "model": "heavy",
        "converged": true,
        "forecast": [
          { "horizon_days": 1, "vol_annualized": 30.89 },
          { "horizon_days": 5, "vol_annualized": 29.89 },
          { "horizon_days": 21, "vol_annualized": 27.61 }
        ],
        "params": {
          "omega": 4.97586E-05,
          "alpha": 0.8081154592,
          "beta": 0.248732498,
          "omega_r": 2.83111E-05,
          "alpha_r": 0.5191075529,
          "beta_r": 0.3281726326,
          "loglik": 2778.4125036696,
          "loglik_r": 2959.3205963788
        }
      }
    ]
  },
  "endpoint_version": "2026.09.30",
  "data_as_of": {
    "node": "fa4",
    "equity_feed": "2026-11-09T10:46:10.447Z",
    "equity_options_feed": "2026-11-06T21:29:45Z",
    "index_feed": "2026-11-09T10:46:01.383Z",
    "index_options_feed": "2026-11-06T22:00:00Z",
    "futures_feed": "2026-11-09T10:46:10.466Z",
    "futures_options_feed": "2026-11-09T10:46:10.385Z",
    "flow_feed": null,
    "oi_feed": "2026-11-06T21:00:00Z",
    "macro_feed": "2026-11-06T21:15:01Z"
  }
}

Sending request…

See this endpoint on live data

Send this exact request and the real response shows up here, right next to the example.

Response Fields

Field Type Description
ewma.vol_annualizednumberCurrent EWMA conditional vol (%); next_day_forecast equals it (random walk in variance).
har_rv.componentsobjectDaily / weekly (5d) / monthly (22d) realized-vol components, annualized %.
garch.paramsobjectFitted ω, α, β (and dof for Student-t).
garch.persistencenumberα + β. Must be < 1 for a stationary fit.
garch.long_run_vol_annualizednumberAnnualized unconditional volatility: 100·sqrt(252 · ω/(1-α-β)); null for a non-stationary fit.
garch.half_life_daysnumberHalf-life of a vol shock: ln(0.5)/ln(α+β).
garch.convergedbooleanfalse when the MLE fails to converge or the fit is non-stationary; forecast is then null.
garch.forecastarrayTerminal conditional vol (annualized %) at 1/5/21-day horizons, reverting toward the long-run level.
symbolstringUnderlying symbol
as_ofstringTimestamp of the data (ISO 8601, UTC)
ewmaobjectEWMA
ewma.lambdanumberEWMA: lambda
ewma.next_day_forecastnumberEWMA: next day forecast
har_rvobjectHAR RV
har_rv.components.dailynumberComponents: daily
har_rv.components.weeklynumberComponents: weekly
har_rv.components.monthlynumberComponents: monthly
har_rv.next_day_forecastnumberHAR RV: next day forecast
har_rv.vol_annualizednumberCurrent EWMA conditional vol (%); next_day_forecast equals it (random walk in variance).
garchobjectGARCH
garch.modelstringGARCH: model
garch.distributionstringGARCH: distribution
garch.params.omeganumberParams: omega
garch.params.alphanumberParams: alpha
garch.params.betanumberParams: beta
garch.params.dofnumberParams: degrees of freedom
garch.forecast[].horizon_daysnumberForecast: horizon days
garch.forecast[].vol_annualizednumberCurrent EWMA conditional vol (%); next_day_forecast equals it (random walk in variance).
realized_modelsobjectFive models fitted on 5-minute realized variance and 30-day implied vol, refreshed once a day. Available for symbols with at least 300 archived sessions.
realized_models.as_of_sessionstringForecasts use data through this session's close, normally the previous trading day.
realized_models.computed_atstringWhen this block was fitted (ISO 8601, UTC).
realized_models.observationsnumberSessions in the fit window, up to 1,000.
realized_models.iv30number30-day ATM implied vol (%) at the same close, for comparing with the forecasts.
realized_models.targetstringWhat every forecast measures: mean daily close-to-close variance over the next h sessions, as annualized vol (%).
realized_models.models[].modelstringhar_rv_5m, har_iv, harq, realized_garch or heavy.
realized_models.models[].convergedbooleanfalse when the fit failed or an input was missing; forecast is then omitted and note says why.
realized_models.models[].forecastarrayAnnualized vol (%) of the mean daily variance over the next 1, 5 and 21 sessions.
realized_models.models[].paramsobjectFitted parameters. The HAR family reports one set per horizon, for example h21_daily.
endpoint_version, data_as_ofstring, objectResponse envelope, see Response envelope.

Errors

Status Error When
400invalid_distdist must be student_t (default) or gaussian.
401-Missing or invalid X-Api-Key. The body is empty; check the status code before parsing JSON.
403tier_restrictedYour plan is below Alpha. The body includes current_plan and required_plan.
404insufficient_historyGenuine no-coverage (symbol not in the archive) or fewer than 30 daily bars.
429rate_limit_exceededThe historical archive is rate limiting; retry shortly.
429Quota exceededDaily quota used up. Retry-After gives the seconds until the reset at 00:00 UTC. Rejected requests (including 403) count toward the quota.
502upstream_errorThe historical archive rejected the forwarded request.
503upstream_unavailableThe historical archive is down or unreachable.

The Models

Daily-close 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, split-adjusted (the OHLC series at GET /v1/stock/{symbol}/prices?adjusted=true on historical.flashalpha.com), which holds 200+ symbols with 54+ at 8+ years of daily history.

Realized-variance models

The realized_models block is fitted on 5-minute stock mids and 30-day ATM implied vol, once a day after each session reaches the archive. The block carries iv30 so you can compare each model with implied vol at the same close.

Model Source How it works
har_rv_5mCorsi 2009HAR on daily, weekly and monthly realized variance from 5-minute returns plus the overnight return, with one regression per horizon.
har_ivHAR with implied volhar_rv_5m plus 30-day implied variance as a regressor.
harqBollerslev, Patton and Quaedvlieg 2016Lowers the daily weight when realized variance is noisy. A forecast outside the range of the fitted targets resets to their mean, as in the paper.
realized_garchHansen, Huang and Shek 2012Log-linear Realized GARCH(1,1), fitted by Gaussian maximum likelihood.
heavyShephard and Sheppard 2010Two equations driven by intraday realized variance, each fitted by quasi-maximum likelihood.

For forecasts as of any past session, call GET /v1/volatility/forecast/{symbol}?at=... on historical.flashalpha.com. Forecasts use data through that session's close, with no look-ahead.

Notes

  • har_rv uses squared daily returns as the realized-variance proxy; har_rv_5m uses 5-minute data.
  • 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.

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
  • Compare models with implied vol - read each model's 21-session forecast beside realized_models.iv30, taken at the same close
  • Build a forecast history - call the historical API with ?at= once per session for point-in-time forecasts with no look-ahead
  • 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 with FlashAlpha?

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

No credit card required Setup in 60 seconds Secure & reliable