How Can Volatility Analysis Help You Navigate Stock Market Uncertainty

Volatility Analysis

In this part of my blog series, I would like to introduce volatility analysis in Stockaivisor. Volatility analysis has long been at the core of financial research, as measuring volatility is essential for effective risk management. To navigate the market successfully, volatility should be monitored continuously, allowing investors to adjust their positions accordingly.

At this part, let’s see what Stockaivisor has for us to measure volatility. Here are the tools that you can use:

  • Rolling volatility
  • Close to close volatility
  • Parkinson volatility
  • Garman-Klass volatility
  • Yang-Zhang volatility

Rolling Volatility

Rolling volatility provides a dynamic view of volatility, updating the measure as new data becomes available by moving through the dataset in successive windows. So, it is a dynamic way of keeping track of volatility in the financial markets. 

Rolling volatility is the standard deviation of returns over a moving window of time:

σ_t = √( (1 / (N-1)) Σ (r_i - r̄)^2 )

where:

• σ_t = rolling volatility at time t

• N = window length (e.g., 30 days, 90 days)

• r_i = log return at time i, calculated as r_i = ln(P_i / P_{i-1})

• r̄ = mean return over the window

Using Stockaivisor, you can easily run this analysis simply by picking the window length and benchmark market as shown below:

A graph on a black backgroundDescription automatically generated

Let me briefly interpret this graph for you. It seems like Apple’s volatility is almost always higher than that of the S&P-500 over this period, but there is one period that attracts our attention, which corresponds to March 2020. The pandemic triggered by Covid-19 resulted in uncertainty and loss of income, leading to fewer people buying Apple devices. 

Please note that adjusting the window length in volatility analysis can significantly impact the results. A shorter window captures volatility more precisely, while a longer window smooths out fluctuations. You can select a window length of 1 month, 6 months, 1 year, or 5 years based on your analysis needs.

  • Close to Close volatility

The close-to-close method calculates volatility based on the daily closing prices of an asset. It is calculated using the standard deviation of daily returns over a specific period:

σ = √( (1 / (T-1)) Σ (r_t - r̄)^2 )

where:

• σ = close-to-close volatility

• T = total number of days in the period

• r_t = daily return at time t, computed as r_t = ln(P_t / P_{t-1})

• r̄ = average return over the period

As opposed to rolling volatility, which can be sensitive to short-term anomalies within its window, potentially resulting in greater fluctuation and noise. Close-to-close volatility typically provides a more stable and standardized measure of price fluctuations, as it uses clearly defined opening and closing prices. Here is the snapshot of Apple’s close-to-close volatility.

A graph of a graphDescription automatically generated with medium confidence

Parkinson Volatility

The Parkinson volatility estimator utilizes the high and low prices of an asset within a trading day to estimate volatility, providing a more accurate measure than the close-to-close method under certain conditions.

Parkinson volatility is specifically designed to measure volatility using the high and low prices during the day rather than just close-to-close prices. It is defined as:

σ_P = √(1 / (4 * N * ln(2)) * Σ(ln(H_t / L_t))²)

where:

• σ_P = Parkinson volatility

• N = number of observations (days)

• H_t = highest price during period t

• L_t = lowest price during period t

Unlike rolling or close-to-close volatility, Parkinson volatility uses the highest (H_t) and lowest (L_t) prices of each period instead of closing prices. This approach captures intraday price movements, offering a more accurate estimate of volatility when intraday data is available.

A screen shot of a graphDescription automatically generated

Garman-Klass Volatility

The Garman-Klass is the next volatility estimator, and it refines volatility estimates by incorporating open, high, low, and close prices. It is defined as:

σ_GK = √(1/N * Σ [0.511*(ln(H_t/L_t))² - (2*ln(2)-1)*(ln(C_t/O_t))²])

where:

• σ_GK = German-Klass volatility

• N = number of observations

• H_t = highest price in period t

• L_t = lowest price in period t

• O_t = opening price in period t

• C_t = closing price in period t

German-Klass volatility differs from other volatility measures like rolling, close-to-close, or Parkinson volatility by including opening, closing, high, and low prices. This comprehensive use of price data better captures intraday price dynamics and volatility.

A screenshot of a graphDescription automatically generated

The Yang-Zhang

The Yang-Zhang estimator is the method that combines the strengths of previous estimators, accounting for overnight price jumps and intraday price movements. It is considered one of the most accurate volatility estimators for daily data.

Zhang volatility combines open (O_t), high (H_t), low (L_t), and closing (C_t) prices to provide a robust estimator that accounts for price jumps and drift in intraday movements. It is defined as:

σ_Zhang = √[ (1/N) Σ {ln(O_t/C_{t-1})}² + (k/N) Σ {ln(C_t/O_t)}² + ((1 - k)/N) Σ {ln(H_t/L_t)}² ]

where:

• N = number of observations

• O_t = opening price at time t

• C_t = closing price in period t

• C_{t-1} = closing price of the previous period

• H_t = highest price in period t

• L_t = lowest price in period t

• k ≈ 0.34 (a constant proposed by Zhang et al. to optimize the accuracy of volatility estimation)

The Zhang volatility model uniquely incorporates opening prices, previous period closing prices, and intraday highs and lows, differentiating it from Parkinson and German-Klass volatility models. This helps better capture overnight price gaps and intraday volatility.

This is how Yang-Zhang volatility looks for the period of  2014-2025. As can be readily seen below, the graph clearly indicates two significant volatility spikes for AAPL around early 2015 and early 2020. These spikes suggest major market-moving events such as Covid-19 or earnings announcements that sharply increased Apple's volatility at those specific points.

In contrast, volatility for the S&P-500 appears relatively stable and significantly lower, showing fewer pronounced spikes during the same period. Apart from the extreme spikes, Apple's volatility generally stays above the broader market index, suggesting that Apple’s stock exhibits more frequent or intense price fluctuations relative to the market.

A screen shot of a graphDescription automatically generated

FAQs:

  1. What is volatility analysis in Stockaivisor?
    Volatility analysis measures price fluctuations to help investors assess market risks and make informed decisions.

  2. How does rolling volatility work?
    Rolling volatility tracks price volatility over a moving time window, offering a dynamic view of market fluctuations.

  3. Why is Parkinson volatility useful?
    Parkinson volatility uses daily highs and lows, providing a more accurate volatility measure than close-to-close data.

  4. How does Yang-Zhang volatility differ from other methods?
    Yang-Zhang volatility combines multiple price points to better capture intraday and overnight price changes, offering high accuracy.

 

"