Historic Volatility

API TraderAPI QuantAPI Developer

Track how much a stock has actually been moving, day by day. Historic volatility — also called realized volatility — is the annualized standard deviation of daily logarithmic returns over a trailing window of trading days, quoted in percent.

Six windows are returned on every row, from 5 trading days out to 90. The short windows react within days of a move and are the ones to compare against short-dated implied volatility; the long windows say whether that reading is unusual for the stock. Because a 5-day window holds only five returns it is expected to be spiky — that responsiveness is the point of it, not noise in the data.

Available Data Points:

  • Date: The trading date the volatility readings are as of. (YYYY-MM-DD format).
  • HV 5D: Annualized volatility over the trailing 5 trading days, in percent.
  • HV 10D: Annualized volatility over the trailing 10 trading days, in percent.
  • HV 20D: Annualized volatility over the trailing 20 trading days, in percent.
  • HV 30D: Annualized volatility over the trailing 30 trading days, in percent.
  • HV 60D: Annualized volatility over the trailing 60 trading days, in percent.
  • HV 90D: Annualized volatility over the trailing 90 trading days, in percent.

Method

Each value is the sample standard deviation of the daily log returns in its window, annualized by the square root of 252 trading days and multiplied by 100. Prices are closing prices; which adjustments are applied to them before measuring is set by the price basis parameters below.

Price basis

Two parameters choose the price series the volatility is measured on. adjust_for_split defaults to true and should normally stay there: on an unadjusted series a 1:10 split is a -90% one-day return, which inside a 5-day window prints a volatility in the hundreds of percent for a week. adjust_for_dividend defaults to false, giving the price-return basis every volatility vendor quotes and the one that lines up with implied volatility, because options are struck on price rather than total return; set it to true for total-return volatility. Volatility is unchanged by scaling a whole price series, so each parameter changes the answer only for windows containing a split or an ex-dividend date respectively — elsewhere all four combinations agree.

Coverage

A window is null until the instrument has enough closing prices to fill it, so a recently listed stock reports its short windows before its long ones. A window spanning a gap in the price history is also null rather than being computed from fewer days than its name claims. Rows begin on the first date any window can be filled.

Try it out! You can test the API with the trial key TEST. Simply include it in your request headers; either here, or add the header "Ortex-Api-Key": "TEST" to your http request.

Trial key restrictions: Trial keys may be limited to a specific date range and set of regions. Requests outside the allowed regions or entirely outside the allowed date range are rejected; a date window that partially overlaps the allowed range is trimmed to it, reported in meta.restriction.

Get full access! Get a key at app.ortex.com/apis

Path Params
string
required

Where to find the instrument: a venue (exchange symbol, MIC or ISO-2 country) or an identifier scheme (tid, sid, cid, isin, figi). See Identifying an instrument.

string
required

The ticker on that venue, or the value in that scheme. An ISIN, sid, cid or share-class FIGI answers for the main listing only; reference/listings lists the others. See Identifying an instrument.

Query Params
date
required

Inclusive start of the returned date window. Format: YYYY-MM-DD.

Also selects the instrument: the ticker resolves to the listing that held it on the exchange in the URL path on this date. To retrieve a delisted or renamed company, use its former exchange and ticker with a from_date from when it was listed. An identifier path (/stock/isin|figi|sid|cid/<value>/…) resolves at this date too. The instrument block in the response names the company the data belongs to.

date

Inclusive end of the returned date window (defaults to today). Format: YYYY-MM-DD.

boolean
Defaults to true

Whether prices are adjusted for share splits before the volatility is measured. Defaults to true, and should normally stay there: on an unadjusted series a 1:10 split is a -90% one-day return, which inside a 5-day window prints a volatility in the hundreds of percent for a week. Pass false only if you specifically want volatility as the prices actually traded.

boolean
Defaults to false

Whether prices are adjusted for dividends before the volatility is measured, giving total-return volatility. Defaults to false, which is what every volatility vendor quotes and the basis that lines up with implied volatility, because options are struck on price rather than total return. Affects only windows containing an ex-dividend date.

integer

Page number within the paginated result set. Must be >= 1. Defaults to 1.

integer

Number of rows per page. The default and the maximum allowed depend on the API tier; a value above the tier maximum is rejected with 400 invalidPageSize.

string
enum
Defaults to json

Response format. "json" (default) or "csv".

Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/csv