EGARCH Volatility Model
Calculates volatility forecasts based on the EGARCH model.
EGARCH models the log of the conditional variance, which avoids having to constrain the parameters to keep the variance positive and, like GJR-GARCH, lets negative and positive shocks of the same size have a different impact on volatility (the leverage effect).
For more information about the method, see the following paper:
- Nelson, D.B. (1991). “Conditional Heteroskedasticity in Asset Returns: A New Approach.” Econometrica, 59(2), 347-370.
Also known as: exponential GARCH, log-GARCH.
EGARCH Volatility Model in Python
get_egarch is part of the Risk module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_egarch as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AMZN", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.risk.get_egarch(period="quarterly")
Which returns:
| Date | AMZN | TSLA | Benchmark |
|---|---|---|---|
| 2024Q2 | 0.0263 | 0.1078 | 0.005 |
| 2024Q3 | 0.0259 | 0.1658 | 0.0047 |
| 2024Q4 | 0.0255 | 0.1991 | 0.0048 |
| 2025Q1 | 0.0262 | 0.2357 | 0.0046 |
| 2025Q2 | 0.0249 | 0.1134 | 0.0078 |
| 2025Q3 | 0.0262 | 0.1846 | 0.0051 |
| 2025Q4 | 0.0257 | 0.2112 | 0.0049 |
| 2026Q1 | 0.0259 | 0.1543 | 0.0046 |
| 2026Q2 | 0.0251 | 0.1238 | 0.0079 |
| 2026Q3 | 0.0261 | 0.1672 | 0.0053 |
Parameters
get_egarch accepts the following parameters:
- period (str, optional): The data frequency for returns (daily, weekly, monthly, quarterly, or yearly). Defaults to “quarterly” if the Toolkit is initialized with quarterly=True, otherwise “yearly”.
- time_steps (int, optional): Time steps to calculate EGARCH for.
- optimization_t (int, optional): Time steps to optimize EGARCH for. It is only used if no weights are given.
- within_period (bool, optional): Whether to calculate EGARCH within the specified period or for the entire period. Defaults to False.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the EGARCH values over time. Defaults to False.
- lag (int | list[int], optional): The lag to use for the growth calculation. Defaults to 1.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.