GJR-GARCH Volatility Model
Calculates the conditional variance (sigma_t^2) of the returns with a GJR-GARCH(1, 1, 1) model fitted to them. Take the square root for the conditional volatility, and see get_gjr_garch_forecast for the variance forecast.
GJR-GARCH extends GARCH with a leverage term that lets negative shocks (bad news) raise volatility by more than positive shocks of the same size, a well documented asymmetry in equity returns that symmetric GARCH cannot capture.
For more information about the method, see the following paper:
- Glosten, L.R., Jagannathan, R., and Runkle, D.E. (1993). “On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks.” The Journal of Finance, 48(5), 1779-1801.
The formula is as follows:
\[\sigma_{t} ^{2} = \text{Omega} + (\text{Alpha} + \text{Gamma} \cdot I_{t-1}) \cdot r_{t-1} ^{2} + \text{Beta} \cdot \sigma_{t-1} ^{2}\] \[\sigma_{1} ^{2} = \text{Omega} + (\text{Alpha} + \text{Gamma} / 2 + \text{Beta}) \cdot \text{Backcast}\]Where r_t are the returns (not demeaned), I_(t-1) is 1 when r_(t-1) < 0 and 0 otherwise, and the Backcast is the same as in get_garch. The parameters maximize the Gaussian log-likelihood under Alpha + Gamma / 2 + Beta < 1 and Alpha + Gamma >= 0 (see get_gjr_garch_parameters).
Also known as: GJR-GARCH, threshold GARCH, TGARCH.
GJR-GARCH Volatility Model in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_gjr_garch as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["NVDA"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2025-01-01",
end_date="2025-12-31",
)
toolkit.risk.get_gjr_garch().tail(5)
Or, after setting up the Finance Toolkit MCP, ask:
What was the GJR-GARCH conditional variance of Nvidia and the S&P 500 over the last five trading days of 2025, fitted on their returns in 2025?
Which returns:
| Date | NVDA | Benchmark |
|---|---|---|
| 2025-12-24 | 0.0005 | 0.0001 |
| 2025-12-26 | 0.0005 | 0.0001 |
| 2025-12-29 | 0.0005 | 0 |
| 2025-12-30 | 0.0005 | 0 |
| 2025-12-31 | 0.0005 | 0 |
Parameters
get_gjr_garch accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The data frequency for returns (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”. | "weekly" |
time_steps | int | Time steps to calculate GJR-GARCH for. Defaults to None, which uses the length of the returns. | 252 |
optimization_t | int | Time steps to optimize GJR-GARCH for. It is only used if no weights are given. Defaults to None, which uses the length of the returns. | 252 |
within_period | bool | Whether to calculate GJR-GARCH within the specified period or for the entire period. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the GJR-GARCH values over time. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |