Sign Bias Test
Calculate the sign bias test of Engle and Ng (1993): whether a fall raises the volatility of every asset by more than its GARCH-family model expects (sign bias), and whether large falls or large rises do (negative and positive size bias).
A symmetric GARCH(1, 1) lets a fall and a rise of the same size raise the volatility equally. In equity returns falls tend to raise it by more (the leverage effect), so after a fall the squared standardized residuals stay larger than the model expects. The test regresses them on the sign and the size of the shock before them; a significant sign or negative size bias says the model misses that asymmetry and an asymmetric model, such as GJR-GARCH or APARCH, fits better.
The formula is as follows:
\[e_{t} \;\text{the residuals of the} \;\text{mean} \;\text{model and}\; z_{t} = \frac{e_{t}}{\sigma_{t} \;\text{the standardized residuals of the GARCH-family} \;\text{method} \;(\operatorname{GARCH}(1,\; 1) \;\text{by default}) \;\text{fitted to the returns of} \;\text{period}},\;\; \text{see toolkit.risk.get\_garch}\] \[z_{t}^{2} = c_{0} + c_{1} \cdot S^{-} \;\text{}_{t-1} + c_{2} \cdot S^{-} \;\text{}_{t-1} \cdot e_{t-1} + c_{3} \cdot S^{+} \;\text{}_{t-1} \cdot e_{t-1} + u_{t} \;\text{by OLS},\;\; \text{with}\;\; S^{-} \;\text{}_{t-1} = 1 \;\text{when}\; e_{t-1} < 0 \;\text{and 0 otherwise and}\; S^{+} \;\text{}_{t-1} = 1 - S^{-} \;\text{}_{t-1}\]- Sign Bias, Negative Size Bias and Positive Size Bias: the t-statistics of \(c_{1}\), \(c_{2}\) and \(c_{3}\), with two-sided p-values from the t-distribution with n - 4 degrees of freedom
Also known as: sign bias test, Engle-Ng test, size bias test, leverage effect test, asymmetric volatility test, GARCH residual diagnostics.
Example · ^GSPC, GLD · 2016 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_sign_bias_test:
from financetoolkit import Toolkit
toolkit = Toolkit(
["^GSPC", "GLD"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2016-01-01",
end_date="2025-12-31",
)
toolkit.econometrics.get_sign_bias_test()
Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:
Did good and bad news move the volatility of the S&P 500 and SPDR Gold Shares (GLD) differently than a GARCH model allows from 2016 to 2025, according to the Engle-Ng sign bias test?
Which returns:
| Item | ^GSPC | GLD |
|---|---|---|
| Sign Bias t-Statistic | 3.9418 | 0.6116 |
| Sign Bias P-Value | 0.0001 | 0.5409 |
| Negative Size Bias t-Statistic | -0.0432 | 1.8640 |
| Negative Size Bias P-Value | 0.9656 | 0.0624 |
| Positive Size Bias t-Statistic | -0.0972 | 0.0660 |
| Positive Size Bias P-Value | 0.9225 | 0.9474 |
| Joint Statistic | 27.0353 | 3.8098 |
| Joint P-Value | 0.0000 | 0.2827 |
| Observations | 2,512.0000 | 2,512.0000 |
9 rows
Using Your Own Data
get_sign_bias_test runs on any data, not only prices: ratios, economic indicators, yield curves or your own dataset. Pass a DataFrame, a Series or a dictionary of them to Econometrics as data, with the dates in the rows or the columns, and set changes to how its changes are calculated: "percentage", "log", "difference" for rates and ratios, or None when the data are changes already. For example, for the monthly unemployment rates of the United States and Germany:
from financetoolkit import Economics, Econometrics
economics = Economics(start_date="2000-01-01")
unemployment = economics.get_unemployment_rate(
countries=["United States", "Germany"], period="monthly"
)
econometrics = Econometrics(data=unemployment, changes="difference")
econometrics.get_sign_bias_test()
Parameters
get_sign_bias_test 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" |
method | str | The GARCH-family model fitted to the returns, as in toolkit.risk.get_garch. Options are: “garch” (GARCH(1, 1)), “gjr” (GJR-GARCH(1, 1, 1)), “egarch” (EGARCH(1, 1)), “igarch” (IGARCH(1, 1)), “aparch” (APARCH(1, 1)), “tgarch” (TGARCH), “ngarch” (NGARCH), “avgarch” (AVGARCH), “nagarch” (NAGARCH), “component” (component GARCH), “figarch” (FIGARCH(1, d, 1)). Defaults to “garch”. | "garch" |
distribution | str | The innovation distribution of the model. Options are: “normal” (normal), “t” (Student-t), “skewt” (skewed Student-t of Hansen), “skewt_fernandez_steel” (skewed Student-t of Fernández and Steel), “ged” (generalized error distribution), “johnson_su” (Johnson SU). Defaults to “normal”. | "studentt" |
mean | str | The mean model. Options are: “zero” (the returns themselves are the shocks), “constant” (constant mean), “arma” (ARMA(1, 1)), “in_mean” (GARCH-in-mean). Defaults to “zero”. | "zero" |
include_benchmark | bool | Whether to include “Benchmark” among the assets tested. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None. | 2 |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |
References
- Paper Engle, R.F. and Ng, V.K. (1993). “Measuring and Testing the Impact of News on Volatility.” The Journal of Finance, 48(5), 1749-1778.
- Library Referenced against rugarch (R)’s signbias