Historic Volatility

API QuantAPI Developer

Historic volatility for a group of stocks on a single date.

This API returns data for multiple stocks — every constituent of a market index, or of one of your own universes — for the specified date.

One row is returned per stock, carrying its identifiers alongside its six volatility windows as of the latest stored reading on or before the requested date (today when date is omitted); the row's date is that reading's date.

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 specific date for which the data is retrieved (YYYY-MM-DD format).
  • Exchange Symbol: Symbol of the exchange where the security trades.
  • Ticker: The ticker symbol associated with the security.
  • Company Name: The name of the company issuing the security.
  • Ortex Company ID: Unique id for a company.
  • Ortex Security ID: Unique id for a security issued by a company.
  • Ortex Tradable Item ID: Unique id for a listing of a security.
  • 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

Query Params
string

The ORTEX index identifier used by this endpoint. Return one row per constituent of this market index, as of the requested date. Pick one from the examples, or type another ORTEX index identifier — the list covers the identifiers published today and is not exhaustive. Matching ignores case, so us500 and US500 are the same index. Supply exactly one of 'index' or 'universe' — sending both, or neither, returns 400 invalidSelection. An unrecognized index identifier returns 404 indexNotFound.

string

Return one row per constituent of one of your own universes, matched case-insensitively by name. Supply exactly one of 'index' or 'universe' — sending both, or neither, returns 400 invalidSelection. A name you do not own, or that does not exist, returns 404 universeNotFound. On a Quant key, a universe holding more than 250 constituents returns 409 universeSizeExceeded; nothing in it is changed. Manage your universes at /api/v11/universes/.

date

The single date to return data for (defaults to the latest available). 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