How it works
Historical volatility, also called realised volatility, is the standard deviation of logarithmic returns, scaled to an annual figure. It is the only volatility measure on this list that speaks the same language as the options market, which is what makes it valuable: an HV of thirty-two can be compared directly with an implied volatility of forty and the difference means something concrete about whether option premium is rich or cheap relative to what the underlying has actually been doing.
Log returns rather than percentage changes are used for a specific reason. They are additive across time, so a return over ten days is simply the sum of the ten daily log returns, which is what allows the square-root-of-time scaling that turns a daily standard deviation into an annual one. That scaling assumes returns are independent and identically distributed, an assumption that is comfortably false in real markets but close enough to be the industry convention.
The practical use divides into two camps. Options traders compare HV with implied volatility to judge the variance risk premium, sell premium when implied sits well above what the underlying has been delivering, and buy it when the reverse holds. Directional traders use HV as a regime classifier and a risk input: a portfolio built to a volatility target scales position size inversely with HV, which is the mechanism behind most volatility-targeting funds and the reason exposure is cut automatically when markets become disorderly.
Against ATR, the trade-off is clear. HV is dimensionless and annualised, so it compares cleanly across instruments and against option markets, but it is computed from closes and therefore ignores intraday range and overnight gaps entirely. A market that gaps every night and then trades quietly will show a high HV and a moderate ATR; a market that swings wildly all day and closes unchanged shows a low HV and a high ATR. Serious volatility work usually looks at both, and often adds a range-based estimator that uses the high and low as well.
Calculation
The arithmetic in words, in the order it happens.
For each bar compute the logarithmic return as the natural log of the close divided by the previous close. Take the standard deviation of the last N of those returns, conventionally 10, 20 or 30 periods. Annualise by multiplying by the square root of the number of periods in a year: 252 is the usual convention for daily equity bars, though many platforms use 365 and crypto venues almost always do because those markets never close. Multiply by 100 to express the result as a percentage. The output is the annualised standard deviation of returns, directly comparable with the implied volatility quoted on options.
Source
An AlgoBeamScript implementation of the formula above, written by us from the arithmetic so the code and the calculation agree line for line.
Runs unchanged on the platform and in the AlgoBeamTS runtime. The language reference is in the documentation.
Inputs
Defaults are the values most charting packages ship with. They are conventions, not optimal settings — the right length depends on your instrument and your holding period.
| Input | Default | What it changes |
|---|---|---|
| Length | 10 | Number of returns in the standard deviation. Short windows such as 10 react quickly but are statistically thin and jump around; 30 to 60 gives a stable estimate that lines up better with the horizon of a listed option. |
| Annualisation factor | 252 trading days | Periods assumed per year. Using 365 instead of 252 raises every reading by about twenty percent, so a figure compared against an option implied volatility must use the same convention the option market does. |
| Source | Close | The series returns are computed from. Close-to-close is standard and matches option convention, but it ignores everything that happened inside the bar. |
How to read it
What practitioners take from the plot. Read these as descriptions of market state, not as entry signals.
- HV far below implied volatility
- Options are pricing more movement than the underlying has been delivering. The setup premium sellers look for, and also the normal state of affairs, since that gap is compensation for tail risk.
- HV rising above implied volatility
- The underlying is moving more than options assumed. Long-gamma positions are being paid, and short-premium positions are the ones under pressure.
- HV at a multi-year low
- A deep compression regime. Position sizes built on this reading will be large, which is precisely why volatility-targeted portfolios are most exposed just before a shock.
- HV spiking
- A shock has landed. Volatility clusters, so elevated readings tend to persist for weeks rather than reverting the next day.
Limitations
Where this indicator misleads. None of these are fixed by a better parameter.
- The square-root-of-time scaling assumes independent returns. Real returns cluster and trend, so annualised figures from short windows systematically misstate the volatility that will actually be realised over a year.
- It is computed from closes only, which means gaps between sessions are counted as returns while everything that happened inside the session is discarded. Range-based estimators capture considerably more information from the same data.
- Short lookbacks are statistically fragile: ten observations produce an estimate with a wide confidence interval, so day-to-day changes in the line are frequently noise rather than signal.
- Because it is backward looking it says nothing about forthcoming scheduled events. A stock with two weeks of quiet trading and an earnings release tomorrow has a low HV and an enormous forward risk.
Educational reference. This page explains how an indicator is built and how it is commonly read. It is not investment advice, not a recommendation and not a signal service. No indicator is profitable on its own — each is a way of describing a market, and any rule built on one has to be tested with realistic costs before it is traded.