The unpredictability of financial markets is somewhat like the shifts in mood that we often associate with human interactions. Just as understanding and navigating the various shades of emotions in a gathering can be a skill, can we also develop a tool to make sense of the unpredictable mood swings of financial markets? Let’s embark on this journey to explore the intriguing comparison between the unpredictability of markets and the ebbs and flows of human emotions!
Imagine the market as a gathering of friends, each person representing a unique temperament. Just like a sudden change in one person’s demeanour can influence the entire group, a notable shift in the volatility of a specific asset can ripple through the market, impacting the volatility of related assets — resembling the notion of volatility spillovers.
Volatility spillovers, in essence, are the transmission of volatility from one financial asset or market to another. This interconnectedness amplifies the overall market volatility, often triggered by significant events, economic indicators, or sudden changes in investor sentiment.
Here’s where our trusty compass, the GARCH (Generalized Autoregressive Conditionally Heteroscedastic) model, steps in. Just as an astute observer can discern patterns in the interactions of a group, the GARCH model helps us decipher patterns and relationships in market volatility. It allows us to measure and predict volatility spillovers by analyzing the historical behaviour of asset prices and identifying patterns in their volatility.
In this blog, we will dive deeper into the workings of the GARCH model, exploring its mathematical foundations and demonstrating how it helps us quantify and comprehend the cascading effects of volatility spillovers in the financial realm. Just as understanding social dynamics aids us in navigating our interactions, understanding volatility spillovers through the GARCH model equips us to make informed decisions in the ever-evolving landscape of finance.
CONDITIONAL VARIANCE
This is a concept integral to the implementation of the GARCH model. Conditional variance is a statistical concept that measures how much variation is left behind in a random variable after some of its variation is explained by another random variable. It is a measure of uncertainty, and it can be used to assess the risk of an event occurring.

The number of sides on a die represents the number of possible outcomes for a random variable. The conditional variance is a measure of how much the distribution of one random variable changes, given the value of another random variable. For example, the conditional variance of the roll of a 6-sided die is lower than the conditional variance of the roll of a 12-sided die, because there are fewer possible outcomes.
Imagine you’re at a lively party, and you’re trying to understand how the enthusiasm in the room fluctuates over time. Variance would give you an overall sense of how energetic the crowd is throughout the night. On the other hand, the conditional variance would help you pinpoint the energy level at a particular moment, considering what you know about the guests and their excitement patterns up to that point.
In the context of financial markets, it’s akin to assessing the unpredictability of price movements at a specific moment, factoring in all the available information about the market up to that time. Just as you might gauge the excitement at a party by considering who’s attending and their past behaviour, conditional variance in finance considers the history of market behaviour to estimate how volatile prices are at any given point.
THE GARCH MODEL
GARCH model: An approach to estimating volatility in the financial markets
Understanding what the terms in GARCH mean
Before we dive into understanding how the model works, let’s understand what the complicated terms in GARCH mean. Generalized indicates that the GARCH model is a generalization of earlier models like ARCH (Autoregressive Conditional Heteroskedasticity). It extends the ARCH model by allowing for more flexibility in modelling the conditional volatility of a time series. Autoregressive means that the model considers the past values of the conditional variance (volatility) to predict future values. It assumes that the current volatility depends on past volatility. Conditional indicates that it models the conditional variance of a time series, which means it estimates the variance of the data at a specific time given past data. Heteroskedasticity refers to the phenomenon where the variance of a time series is not constant over time.
Understanding how the GARCH model works
The GARCH model is like having a gathering host (the model) who’s exceptionally good at predicting how the energy levels (volatility) in the room (market) will change over time.
Estimating Conditional Atmosphere (Variance) — “Average Mood”: The host starts by estimating the average mood (conditional variance) of the gathering (market) at a specific time. It’s like determining the average energy level in the room over time.
Autoregressive Coefficients — “Influence of Enthusiasm Echo”: The host observes how the current enthusiasm (volatility) in the gathering is influenced by the energy levels (squared returns) in the previous gatherings (time periods). It’s akin to understanding how the current mood is influenced by the energy levels in recent gatherings.
Moving Average Coefficients — “Recollection of Previous Gatherings”: Additionally, the host considers how the current enthusiasm (volatility) is influenced by the ‘average mood’ (conditional variances) in previous gatherings (time periods). It’s like recalling the general energy levels over time and how they impact the current mood.
GARCH(p, q) Model — “Host’s Expertise in Mood Prediction”: The host is denoted as a GARCH(p, q) expert, where ‘p’ (autoregressive lags) signifies how many past gathering’s moods (squared asset returns) influence today’s mood (volatility). ‘q’ (moving average lags) signifies how much the average mood (previous conditional variances) impacts today’s mood (volatility).
The math behind the GARCH model
As the GARCH model is an extension of the ARCH model first let’s understand what the ARCH model does. The ARCH model expresses the conditional variance of a time series as a linear function of the past returns squared.

𝜎(t)^2 is the conditional variance at a time t 𝜔 is a constant 𝛼i are the parameters that are to be estimated r(t-i)^2 is the squared returns at lag i q is the order of the model (the number of lags we want the conditional variance to be dependent on)
The GARCH model is extended from this by incorporating the past conditional variances in the linear function of the ARCH model. Now the conditional variance at a time t is dependent on the past squared returns and also past conditional variances. The expression becomes

𝛽(i) represents the weights of the past conditional variances p is the order of autoregressive conditional variances q is the order for lagged squared returns
The estimation of the parameters involved is done using statistical techniques like maximum likelihood estimation(MLE). The main function of the MLE is to maximize the maximum likelihood function related to the observed data. It helps us to determine the most probable values of the parameters so that they can best explain the data.
Characteristics of Volatility
- Volatility Clusters (Mood Swings at Gatherings): Just as people’s moods can cluster at a gathering — sometimes everyone is energetic, and sometimes everyone is calm — volatility in markets also clusters. There are phases when the market is highly excitable (high volatility) and phases when it’s more stable (low volatility).
- Continuous Evolution of Volatility (Gradual Changes in Room Atmosphere): Volatility evolves like the atmosphere at a gathering, changing smoothly over time. Just as the room’s mood doesn’t abruptly shift from calm to chaotic, volatility generally changes in a continuous, gradual manner.
- Bounded Volatility (Room Temperature Range): Similar to how room temperature has a defined range, volatility in markets also operates within bounds. It doesn’t shoot to extreme levels; there’s a limit to how high or low it can go, providing a degree of predictability.
- Leverage Effect (Echoing Reactions in a Conversation): Think of a conversation where a sudden loud response (big price drop) prompts a more subdued reaction (increased volatility). Conversely, a quiet response (big price increase) might cause a more animated reaction (decreased volatility). This parallels how volatility reacts differently to market price increases and decreases, forming the leverage effect.
Variants of the GARCH model
Financial volatility has a lot of different aspects such as asymmetry, leverage effects, long memory, and heavy-tailed distributions. To provide a more accurate representation of the volatility in the financial time series we can use variants of the GARCH model to capture these aspects.
GJR-GARCH (Glosten-Jagannathan-Runkle GARCH): This model extends the traditional GARCH model by including an asymmetry parameter to capture the leverage effect, where negative returns have a greater impact on volatility than positive returns.
PARCH (Power GARCH): Power GARCH models introduce a power transformation of the conditional variances to allow for heavy-tailed distributions (the probability of observing extreme events is relatively higher) in the returns.
LSTM-GARCH (Long Short-Term Memory GARCH): Hybrid time series model integrating LSTM to handle long-term dependencies and GARCH estimates the time-varying volatility. It forecasts future values effectively.
Applications of GARCH Model
- Asset Pricing Models: Capital Asset Pricing Model (CAPM): In CAPM, GARCH can be used to model the conditional volatility of an asset’s returns. This information is valuable for estimating the asset’s beta, a measure of its sensitivity to market movements. By incorporating GARCH, you can provide a more accurate estimate of the asset’s risk and expected return.
- Portfolio Optimization: Mean-Variance Portfolio Optimization: GARCH models can help estimate the conditional covariance matrix of asset returns. This matrix is a crucial input in mean-variance portfolio optimization. By using GARCH to account for time-varying volatility, you can construct portfolios that are better suited to changing market conditions and risk profiles.
- Options Pricing: Black-Scholes Model: When using the Black-Scholes model for options pricing, you can incorporate GARCH-modeled volatility as the standard deviation of the asset’s returns. This allows you to account for the dynamic nature of volatility, improving the accuracy of option pricing and risk assessment.
- Risk Management: Value at Risk (VaR) and Conditional Value at Risk (CVaR): GARCH models are commonly used to estimate the conditional volatility of financial assets, which is a fundamental component in calculating VaR and CVaR. By employing GARCH, you can generate more accurate risk measures that reflect the changing risk environment.
- High-Frequency Trading: Market Microstructure Models: In high-frequency trading, GARCH models can be used to model and predict intraday volatility patterns. By incorporating GARCH volatility forecasts, traders can optimize their execution strategies, reduce market impact, and manage risk more effectively.
- Credit Risk: Credit Default Models: GARCH models can be employed to estimate the time-varying volatility of credit spreads and asset prices. This information is crucial for assessing credit risk accurately, particularly for fixed-income securities and credit derivatives.
WHAT ARE VOLATILITY SPILLOVERS?
Now that we’ve explored how the GARCH model helps us understand and forecast volatility in financial markets, let’s shift our focus to the broader impact of these volatility predictions. Volatility, much like the fluctuating energy levels at a lively gathering, doesn’t exist in isolation within one market. Instead, it can permeate and influence other interconnected markets, akin to how excitement in one group at a gathering can ripple and affect nearby groups. This phenomenon is known as “volatility spillovers.”
Imagine our gathering, where each group represents a unique financial market. In this scenario, a surge in excitement (volatility) in one group, like the stock market group, can spark similar enthusiasm in nearby groups, such as the real estate or commodities market groups. This is akin to volatility spillovers, where heightened excitement in one market influences the volatility of connected markets.
Much like a burst of excitement in one group creating a ripple effect across nearby groups at a gathering, a significant increase in volatility in a specific market can ripple through and amplify the volatility in related or interconnected markets. Volatility spillovers occur when this contagious excitement affects neighbouring markets, causing a collective increase in volatility.
These spillover effects often manifest due to shared events, significant economic news, or shifts in investor sentiment. Just as an unexpected event at a gathering, like a surprise guest arriving, can excite not only the immediate group but also neighbouring groups, unexpected economic events can trigger a ripple of heightened excitement (volatility) across related financial markets, amplifying their volatility levels.
Granger Causality Test
Think of a lively gathering where excitement levels represent volatility. Granger causality helps us understand if the past excitement level of one person can predict the current excitement level of another. Similarly, we analyze if past volatility in one financial asset (e.g., TESLA) can predict current volatility in another (e.g., NASDAQ).
In finance, Granger causality helps us assess if past volatility in one market influences the current volatility in another market. It’s like asking whether yesterday’s market volatility affects today’s in a different financial market, aiding our understanding of volatility spillovers.
Code Implementation
Let’s shift gears into the thrilling code implementation segment of our financial adventure! Uncover the electrifying secrets of volatility spillovers between the iconic Tesla and the pulsating beat of NASDAQ — the ultimate stage for this market thriller.
Why Tesla, you ask? Picture Tesla as the rockstar of the NASDAQ stage, setting it ablaze with its high-octane performance. It’s like choosing the most electrifying dancer in a lively dance-off — the one who sets the crowd on fire! Tesla, being one of the most active stocks on NASDAQ, is our superstar spotlight, and we’re ready to see how its moves influence the market dance.
With our trusty GARCH model as our magical staff, we’ll summon the power of past volatility to predict the future beats of Tesla’s dance. It’s all about reading the rhythm of the past to groove to the tunes of tomorrow.
By employing the Granger causality test, we’re essentially playing detective. We want to uncover if Tesla’s volatility can be a predictor or influencer of the fluctuations in NASDAQ’s excitement level. It’s like determining if Tesla’s moves on the dance floor make everyone else groove along or if they dance to their beat independently.
In Granger causality, p-values are a way to measure the strength of evidence that past values of one variable can predict another. Specifically, in our analysis, the p-values from the Granger causality tests at different time lags tell us how likely it is that the past volatility of Tesla can predict or influence the volatility of NASDAQ.
A small p-value (usually less than 0.05) suggests that past Tesla volatility does influence NASDAQ volatility at that specific time lag.
A larger p-value implies that past Tesla volatility may not significantly affect NASDAQ volatility at that time lag.
#install and import necessary libraries !pip install arch import numpy as np import pandas as pd import matplotlib.pyplot as plt from arch import arch_model import yfinance as yf import seaborn as sns from statsmodels.tsa.stattools import grangercausalitytests #Collecting data tesla_data = yf.download('TSLA', start='2014–01–01', end='2022–12–31') nasdaq_data = yf.download('^IXIC', start='2014–01–01', end='2022–12–31') # Calculate Returns tesla_returns = tesla_data['Adj Close'].pct_change().dropna() nasdaq_returns = nasdaq_data['Adj Close'].pct_change().dropna() # Estimate GARCH Model and Parameters # Choose GARCH(1, 1) model for demonstration purposes garch_tesla = arch_model(tesla_returns, vol='Garch', p=1, q=1) garch_result_tesla = garch_tesla.fit(disp='off') garch_nasdaq = arch_model(nasdaq_returns, vol='Garch', p=1, q=1) garch_result_nasdaq = garch_nasdaq.fit(disp='off') # Analyze Volatility Spillover # Calculate conditional variances tesla_cond_volatility = np.sqrt(garch_result_tesla.conditional_volatility) nasdaq_cond_volatility = np.sqrt(garch_result_nasdaq.conditional_volatility) # Residuals from the GARCH models tesla_residuals = garch_result_tesla.resid nasdaq_residuals = garch_result_nasdaq.resid # Conduct Granger causality test max_lag = 10 # Maximum lag for the test test_result = grangercausalitytests(np.column_stack((tesla_residuals, nasdaq_residuals)), max_lag, verbose=True) # Print the results for lag in range(1, max_lag + 1): p_value = test_result[lag][0]['ssr_ftest'][1] print(f'Granger causality test at lag {lag}: p-value = {p_value}') # Visualize the results lags = range(1, max_lag + 1) p_values = [test_result[lag][0]['ssr_ftest'][1] for lag in lags] # Visualization of residuals plt.figure(figsize=(12, 6)) plt.subplot(2, 1, 1) plt.plot(tesla_residuals, label='TESLA Residuals') plt.plot(nasdaq_residuals, label='NASDAQ Residuals') plt.xlabel('Time') plt.ylabel('Residuals') plt.title('Residuals from GARCH Model') plt.legend() # Visualization of volatilities plt.subplot(2, 1, 2) plt.plot(tesla_cond_volatility, label='TESLA Volatility') plt.plot(nasdaq_cond_volatility, label='NASDAQ Volatility') plt.xlabel('Time') plt.ylabel('Volatility') plt.title('Volatility (Conditional Standard Deviation)') plt.legend() plt.tight_layout() plt.show() # Visualization of Grange causality test plt.figure(figsize=(10, 6)) plt.plot(lags, p_values, marker='o', linestyle='-', color='b') plt.xlabel('Lag') plt.ylabel('p-value') plt.title('Granger Causality Test Results') plt.axhline(0.05, color='r', linestyle=' - ', label='Significance Level (0.05)') plt.legend() plt.show()
RESULT:
CONCLUSION
In conclusion, our Granger causality tests have unveiled intriguing insights into the relationship between Tesla’s volatility and the volatility of NASDAQ. The p-values obtained at various lag intervals have illuminated the temporal influence of Tesla’s volatility on NASDAQ’s volatility.
At lag 1, the p-value of approximately 0.957 suggests a weak causal relationship, indicating that Tesla’s volatility at the immediate previous time point doesn’t significantly impact NASDAQ’s volatility.
However, as we progress to higher lag intervals, particularly from lag 2 to lag 10, the p-values steadily decline. Notably, at lag 3, we breach the conventional threshold of 0.05, with a p-value of approximately 0.027. This implies a growing influence of Tesla’s volatility on NASDAQ’s volatility as we look back further in time.
Thus, our findings hint at a delayed but meaningful relationship, emphasizing the importance of considering Tesla’s past volatility when assessing and predicting the volatility dynamics of NASDAQ. This knowledge could be instrumental for investors and analysts crafting strategies in the dynamic world of finance.
REFERENCES
- https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4064024
- https://machinelearningmastery.com/develop-arch-and-garch-models-for-time-series-forecasting-in-python/
- https://faculty.washington.edu/ezivot/econ589/ch18-garch.pdf
- https://medium.com/@ranjithkumar.rocking/time-series-model-s-arch-and-garch-2781a982b448