GARCH Parameters
Fits a GARCH(1, 1) model to the historical returns and returns the estimated Omega, Alpha and Beta parameters for each asset.
GARCH (Generalized autoregressive conditional heteroskedasticity) is a stochastic model for time series, used to model volatility clustering. A GARCH(1, 1) model expresses the conditional variance sigma_t^2 as:
\[\sigma_{t} ^{2} = \text{Omega} + \text{Alpha} \cdot \operatorname{u\_}(t-1) ^{2} + \text{Beta} \cdot \operatorname{sigma\_}(t-1) ^{2}\]With the constraints Omega, Alpha, Beta > 0 and Alpha + Beta < 1. The parameters are estimated via simulated annealing, maximizing the GARCH log-likelihood function.
Unlike get_garch and get_garch_forecast, which return a (forecasted) volatility path, this method returns the fitted parameters themselves. This is useful when the parameters are needed directly, for example to seed a separate volatility simulation.
For more information about the method, see the following book:
- Finance Compact Plus Band 1, by Yvonne Seler Zimmerman and Heinz Zimmerman; ISBN: 978-3-907291-31-1
Also known as: GARCH weights, GARCH coefficients, conditional variance parameters.
GARCH Parameters in Python
get_garch_parameters is part of the Risk module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_garch_parameters as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AMZN", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.risk.get_garch_parameters(period="quarterly")
Which returns:
| AMZN | TSLA | Benchmark | |
|---|---|---|---|
| Omega | 0.0191 | 0.1379 | 0.0011 |
| Alpha | 0.0038 | 0.143 | 0.1528 |
| Beta | 0.278 | 0.0677 | 0.6939 |
Parameters
get_garch_parameters 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”.
- optimization_t (int, optional): Time steps of the returns series to use for the optimization. Defaults to the full length of the returns series.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.