Calculating Volatility with Exponentially Decaying Weights
Summary
The document explains how to apply an exponential decay factor to daily asset returns when estimating volatility. First calculate returns from the price series, then weight each squared return, giving the greatest weight to the most recent observation and progressively smaller weights to older ones. The estimate is normalized by the decay complement, based on the geometric sum of the weights, rather than by the number of observations.
After obtaining the weighted variance, take its square root to get volatility. The question also raises monthly scaling, but the answer does not explain how to annualize or scale the weighted estimate to a month, nor does it discuss whether to subtract a weighted mean. Its guidance is therefore focused on the basic weighted squared-return calculation; the exact finite-sample normalization and treatment of the mean may depend on the estimator being used.
Key ideas
- Convert prices into returns before applying decay weights.
- Give recent squared returns greater weight than older squared returns.
- Normalize the weighted sum using the decay complement, reflecting the geometric weight sum.
- Take the square root of the resulting variance estimate to obtain volatility.
Tags
Full text
# How to apply decay factor in the volatility calculation for 1 asset?
# How to apply decay factor in the volatility calculation for 1 asset?
I read somewhere that the decay factor is (1-lamba)*lamba^t where t is first return, second return, third return, ...
I also found this formula which I have difficulty to understand:
How do I calculate the volatility of my asset taking into account my 0.97 decay factor? I have the time series of daily prices.
Normally to get volatility I would get the average daily return, then calculate the variance by summing all the (return-average return)^2 and dividing by N.
I would then square the variance and multiply by square(25) to have a volatility for a period of 1 month.
At what stage am I supposed to incorporate the decay factor?
## Answer by Kermittfrog (score 2, accepted)
https://quant.stackexchange.com/a/51848
Effectively, you take your series of prices and transform those to returns as you would do in your standard approach, as well.
```
step return date weight
1 2020-03-26 0.97
2 2020-03-25 0.97 * 0.97
3 2020-03-24 0.97 * 0.97 * 0.97
...
K T-K+1 097^K
```
For $K$ sufficiently large, the sum of the weights $\sum_i \lambda^i$ will converge to $\frac{1}{1-\lambda}$, hence the prefactor in your formula.
In order to calculate your volatility, you do not sum the squared returns and divide by $N$, as you would do normally, but you compute the weighted sum of your squared returns, normalised by $1-\lambda$. You may then calculate the square root to arrive at your $\sigma_t$.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.