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-DDformat). - 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
