top of page

Exponentially Weighted Moving Average (EWMA) Approach | Volatility Estimation

In real life, volatility is a characteristic of many financial and economic variables that can change in an uncertain and unpredictable manner over time. This means that the underlying variable can fluctuate or vary at any moment and can take on a wide range of values. Any variable that changes in an uncertain manner is said to be following a stochastic process.


Stochastic processes are used to model phenomena that exhibit randomness or uncertainty, such as stock prices, exchange rates, and interest rates. They are an important tool in the analysis and forecasting of financial and economic data and are widely used in fields such as finance, economics, and risk management.


One of the main characteristics of a stochastic process is its volatility or the degree to which the variable fluctuates over time. Volatility is often measured using statistical measures such as standard deviation or the exponentially weighted moving average (EWMA). These measures can provide valuable insights into the level of risk associated with a particular variable and can help analysts and investors make more informed decisions.


The exponentially weighted moving average (EWMA) is a statistical measure that is used to smooth out short-term fluctuations in data and highlight longer-term trends. It is similar to a simple moving average but gives more weight to recent observations and less weight to observations from the distant past.


The Exponentially Weighted Moving Average (EWMA) Approach tries to capture two components and uses only one parameter in estimating the current volatility-


  • Innovation (μ2n-1) i.e., actual previous volatility based on the continuous change in the variable.

Innovation (μi) = LN ( Si / Si-1 )

Where,

Si = current at the end of the day closing stock price

Si-1 = previous at the end of the day closing stock price


  • Persistence i.e., previous volatility estimate (σ2n-1), where current volatility estimate (σ2n) tends to be persistent around the previous estimate of volatility (σ2n-1).

Current Volatility Estimate (σ2n) = [ Lambda (λ) * Previous Volatility Estimate (σ2n-1) ] + [ (1 - Lambda (λ)) * Innovation (μn-1) ]

Where,

λ = lambda, estimated using Parameter Estimation Engine

σ2n = current volatility estimate

σ2n-1 = previous volatility estimate

μ2n-1 = innovation i.e., actual previous volatility based on continuous change in the variable


  • Parameter Lambda(λ) is estimated using Parameter Estimation Engine either via Unbiased Estimator Approach or Maximum Likelihood Estimator Approach. Suppose that, Lambda(λ) estimated using the Parameter Estimation Engines is 0.94. It means that 94% importance (weight) is given to Persistence while 6% importance (weight) is given to Innovation. If the series of the variable is misbehaved, Lambda(λ) will be low as it is obvious to give less importance to Persistence and more importance to Innovation. And if the series is well-behaved, Lambda(λ) will be high and therefore, more importance to Persistence and less importance to Innovation.


EWMA Approach for estimating volatility using an example-

The volatility of a stock that is currently trading at $500 is estimated at 1.5%. Update the volatility estimate if the stock price at the end of the day closing happens to be $495. Parameter Lambda (λ) is estimated to be 0.94.


Previous volatility estimate (σn-1) = 1.5%

Innovation (μn-1) = LN ( Si / Si-1 ) = LN ( $495 / $500 ) = -1.005%

Lambda (λ) = 0.94


Current Volatility Estimate (σ2n) = [ Lambda (λ) * Previous Volatility Estimate (σ2n-1) ] + [ (1 - Lambda (λ)) * Innovation (μn-1) ]

Therefore,

σ2n = 0.94 * ( 1.5 )^2 + ( 1 - 0.94 ) * ( -1.005 )^2 = 2.1756%2

σn = √2.175 = 1.475%


Since, Innovation i.e., actual previous volatility based on the change in the variable of -1.005% (getting weightage of 0.06) is lower than the previous volatility estimate (σ2n-1) of 1.5% (with Lambda (λ) 0.94). Hence, the currently estimated volatility of 1.475% is slightly less than the previous volatility estimate of 1.5%.


EWMA Approach for estimating volatility using market data-

We want to estimate the daily volatility of a stock [ IndusInd Bank ] for the next day and to estimate that, we have 737 days closing prices of the period 01-01-2017 to 31-12-2019.


We calculate the daily return of the stock [ LN ( Sn / Sn-1 ) ] as shown above- [ represented in column "Change" ]

Graph representing actual volatility of the stock over the period.


As we know, to calculate the volatility of the stock, we take the square root of the squared returns so as to incorporate both upside and downside fluctuation in the stock price. [ represented in column "Change^2" ]

Note: As per Efficient Market Hypothesis, it is very difficult to predict the stock price at the end of the next day. The best prediction would be the current stock price, such that the expected return (i.e., mean(X) of the current returns) would be 0. Hence, the square root of X and not X - X̅.


Also, we have to consider (while averaging the volatility of the period) the fact that, recent observations should be given relatively more weights than their own predecessor(s). This is because of giving more importance to the recency and less importance to decency. Hence smoothing via exponentially decreasing weights as the observations get older. [ represented in column "Exponentially Decreasing Weights" ]

Exponentially Decreasing Weights ( W ) = [ 1 - Lambda(λ) ] Lambda(λ)^n

Where, for Lambda(λ), Parameter Estimation Engine: Maximum Likelihood Estimator Approach which maximizes the joint probability of observing the data, can be used to identify the Parameter: Lambda(λ) = 0.945204537964387.


Graph representing exponentially decreasing weights over the period.


Using the exponentially decreasing weights, we can calculate the exponentially weighted innovation (μ2n-1) at each trading day by simply taking the product of Change^2 and exponentially decreasing weight. [ represented in column "Exponentially Weighted Innovation (u2n)" ]


Finally, to calculate the Daily Variance Estimate (σ2n), either calculate the Persistency (σ2n-1) and Innovation (μn-1) and apply the direct formula or take the sum product of Change^2 and exponentially decreasing weight as shown below-

Current Volatility Estimate (σ2n) = Σ Exponentially Decreasing Weight * Change^2

Therefore,

σ2n = [ ( 1 - λ ) * λ^0 ) * μ2n-1 ] + [ ( 1 - λ ) * λ^1 ) * μ2n-2 ] + [ ( 1 - λ ) * λ^2 ) * μ2n-3 ] + . . . + [ ( 1 - λ ) * λ^k-1 ) * μ2k ]

σ2n = ( 0.0548 * 0.0000 ) + ( 0.0518 * 0.0000 ) + ( 0.0490 * 0.0004 ) + . . . = 0.00033267%2

σn = √0.00033267 = 1.8239%


Most importantly, EWMA Approach has the ability to save the current volatility estimate which can later be used to estimate the future volatilities via the direct method. As we already know that current volatility estimate (σ2n) = [ ( 1 - λ ) * λ^0 ) * μ2n-1 ] + [ ( 1 - λ ) * λ^1 ) * μ2n-2 ] + [ ( 1 - λ ) * λ^2 ) * μ2n-3 ] + . . . + [ ( 1 - λ ) * λ^k-1 ) * μ2k ]


However, one can also use the direct method (estimate shall be the same)-

Current Volatility Estimate (σ2n) = [ Lambda (λ) * Previous Volatility Estimate (σ2n-1) ] + [ (1 - Lambda (λ)) * Innovation (μn-1) ]

Where, previous volatility estimate (σ2n-1) = [ ( 1 - λ ) * λ^0 ) * μ2n-2 ] + [ ( 1 - λ ) * λ^1 ) * μ2n-3 ] + [ ( 1 - λ ) * λ^2 ) * μ2n-4 ] + . . . + [ ( 1 - λ ) * λ^k-2 ) * μ2k ]


The current volatility estimated using the Unbiased Approach is 1.8452%. And under EWMA Approach, the current volatility estimated is 1.8239% --very close to the Unbiased Approach. We can conclude that EWMA Approach did a very good job. Also note that the parameter, Lambda, is estimated using Parameter Estimation Engine: Maximum Likelihood Estimator Approach which maximizes the joint probability of observing the data, also did a very good job in our estimation. The comment on the preciseness can only be done once it is backtested.


Drawbacks of EWMA Approach

EWMA Approach gives exponentially decreasing weights i.e., less importance (weight) to the far observations and more importance to the near observations irrespective of if the far observation period is exactly similar to the current environment. This can be captured using Kernel Density Approach or Multivariate Kernel Density Approach. Also, EWMA Approach is unable to capture the mean-reverting feature i.e., volatility has a tendency of reverting to its long-term mean-variance. For suppose, if the previous volatility (σ2n-1) is more than far from its long-term variance (σ2nLt) or is less than far from its long-term variance, σ2n will revert to σ2nLt. This can be captured using the GARCH (1,1) Model.

 

Greek Alphabets

lambda(λ), volatility(σ), omega(ω), innovation(μ), alpha(α), beta(β), gamma(γ)

873 views0 comments
bottom of page