Volatility Estimation
Produced by Plotly

Volatility Estimation

What is Volatility?

In simple terms: volatility is the degree of fluctuations in a time series, most commonly financial prices. A very closely related term that one might have already encountered is standard deviation.

Bitcoin is a famous example of a financial instrument whose price heavily fluctuates on a day-to-day basis, luring in investors and gamblers alike. On the other hand, bond prices move much more slowly, and are more likely to attract someone who is risk-averse. It is important to note that the direction of the price has no bearing on the volatility of the instrument in question. We could have two very distinct stocks moving in opposite directions while having the same volatility.

Having an accurate measure of volatility is extremely important for investors and financial institutions for risk management and asset allocation. If you ever invested an equal amount to various stocks you might have noticed something rather frustrating. What usually happens is that the impact of the most volatile stocks dwarf the impact of the remaining investments, be it positively or negatively. This highlights the importance of knowing which stocks are riskier than others, and by how much.

Having an idea of how volatile your chosen stocks are, we can replace our initial portfolio of equal capital allocation, and instead opt for equal risk allocation. If, for example, stock A is exactly three times as volatile as stock B, then investing €100 in A and €300 in B would yield an equal contribution of risk from both stocks. From the below example, we can see that with equal capital allocation, Stock A outperforms stock B. In the second scenario, we give three times the weight to stock B to achieve equal risk, where this time, stock B outperforms A.

No alt text provided for this image

SMA and EWMA

One popular volatility estimation technique employed by financial institutions is the Simple Moving Average (SMA). Let's consider daily data. At any point in time the SMA is the standard deviation of the past N days, where N is some window size, say 20 days.

An improvement to this is the Exponentially Weighted Moving Average (EWMA) which gives greater importance to values that are closer to the specified date, with an exponential decay of weights the further away we go. Both these methods are widely used by practitioners due to their simplicity. More information about these two methods can be found in J.P Morgan's Risk Metric technical document (1996).

No alt text provided for this image

The above image shows the daily Apple log-returns in blue i.e. the logarithm of the daily percentage change, along with the SMA and EWMA volatility estimates. As we can see, the EWMA estimate decays at a slower rate than the SMA during the Covid-19 pandemic. Such a large spike in volatility surely has a long-lasting effect, which is much more adequately modeled by the EWMA.

Nonparametric Bayesian Estimation

In my Masters dissertation, I study "Nonparametric Bayesian estimation of the diffusion coefficient of Stochastic Differential Equations". Quite a mouthful, no? Best to split this up into small sections and giving a very shallow introduction to each separate term.

Nonparametric: A linear regression model written as f(x)=b x + a, is parametric, because we need to estimate a finite number of parameters a and b, two to be exact. A quadratic model f(x)=c x^2 + b x + a requires three parameters to be estimated. Nonparametric simply means that there are an infinite number of parameters to estimate. For any machine learning enthusiasts, an SVM can achieve nonparametric regression through the use of the kernel trick. Such models allow extremely flexible modelling, with little effort to choose the "right" type of model for your data.

Bayesian: As the name implies, Bayesian techniques exploits the relationship described by the renowned Bayes Theorem. We won't be going into much detail as books can (and have been) written on such a subject. We will simply mention that this theorem allows us to calculate the probability of an event A given B by switching them around and calculating the probability of event B given A. The latter is usually much easier to work out.

Stochastic Differential Equations (SDE): It is often much easier to describe physical phenomena by how they change in time. This is where Differential Equations come in, with a plethora of uses in physics. The need to also model randomness in such physical systems prompted the analysis of SDEs, which adds a random component to the model.

Diffusion Coefficient: This is simply the volatility that we are after, as it is the term multiplied by the random component mentioned above. This in turn controls the size of fluctuations.

My GitHub page, which also goes into a slightly more detailed description of the volatility estimation procedure, contains the code for various nonparametric Bayesian techniques to estimation the volatility. Here we will focus on the Gaussian Process (GP) technique, with more detail found in Rasmussen (2006).

Let's again consider daily Apple stock data. The grey lines in the below image are the log-returns of the price. The blue shaded region is the 95% credible region, meaning that 95% of the "true" volatility function is contained in this region. The dark blue line is the average value, which we can ultimately take as our estimate of the volatility function.

No alt text provided for this image

Other nonparametric Bayesian techniques explored in my Masters degree include an application of LARK introduced by Tu et. al (2007), and another technique introduced by Gugushvili et. al (2019).

References

Morgan, J.P. (1996) Risk Metrics—Technical Document. J.P. Morgan/Reuters, New York.

Tu, Chong, Clyde, Merlise & Wolpert, Robert. (2007). Lévy adaptive regression kernels.

Rasmussen, C.E. & Williams, C.K.I (2006). Gaussian Processes for Machine Learning?.

Gugushvili, S., der Meulen, F.v., Schauer, M. & Spreij, P. (2019). Nonparametric Bayesian Volatility Estimation.

Jonathan Farrugia

Reading for a PhD (Physics) - Biomedical Applied Electromagnetism - Research and Innovation in the Diving Industry

2 年

Interesting read Dyl! Proset ??

要查看或添加评论,请登录

Dylan Zammit的更多文章

  • Squid Game: Your Odds of Survival

    Squid Game: Your Odds of Survival

    Following Netflix's 2021 Squid Game debut, we now have the second installment of the show hitting the screens…

    1 条评论
  • Pigeon Racing and AI

    Pigeon Racing and AI

    Introduction Pigeon racing is an unconventional sport, loved by relatively few, and misunderstood by many. I recently…

    3 条评论
  • Malta Traffic Optimisation

    Malta Traffic Optimisation

    Introduction Commuting to and from work on a daily basis is a frustrating experience to say the least. It is especially…

    5 条评论
  • How to win at Blackjack (51% of the time)!

    How to win at Blackjack (51% of the time)!

    In this article I will describe what I learned in my latest side-project related to Blackjack and card counting. We…

    1 条评论
  • Ranking EPL Football Teams

    Ranking EPL Football Teams

    Introduction Predicting the probability of an outcome in a football match is of great interest to bookies and punters…

    1 条评论
  • Estimating the odds of teams that never encountered each other.

    Estimating the odds of teams that never encountered each other.

    Introduction In sporting events, the chances that there exists at least one pair of teams that never played each other…

社区洞察

其他会员也浏览了