EGARCH Volatility Forecast
Calculates sigma_2 forecasts based on the EGARCH model.
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: volatility forecast, predicted volatility.
EGARCH Volatility Forecast in Python
get_egarch_forecast is part of the Risk module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_egarch_forecast as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AMZN", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.risk.get_egarch_forecast(period="quarterly")
Which returns:
| AMZN | TSLA | Benchmark | |
|---|---|---|---|
| 2026Q4 | 0.0261 | 0.1672 | 0.0053 |
| 2027Q1 | 0.0255 | 0.1465 | 0.0066 |
| 2027Q2 | 0.0255 | 0.1448 | 0.0067 |
| 2027Q3 | 0.0255 | 0.1447 | 0.0067 |
| 2027Q4 | 0.0255 | 0.1447 | 0.0067 |
| 2028Q1 | 0.0255 | 0.1447 | 0.0067 |
| 2028Q2 | 0.0255 | 0.1447 | 0.0067 |
| 2028Q3 | 0.0255 | 0.1447 | 0.0067 |
| 2028Q4 | 0.0255 | 0.1447 | 0.0067 |
| 2029Q1 | 0.0255 | 0.1447 | 0.0067 |
Parameters
get_egarch_forecast 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 and to forecast sigma_2 values for.
- within_period (bool, optional): Whether to calculate EGARCH within each specified period or all at once. Defaults to False.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.
- 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.