--- myst: html_meta: description: >- qis significance tests for supplied return means, regression alphas and paired Sharpe differences, with Holm/BHY corrections, stationary-bootstrap p-values, a catalogue of every hypothesis test in qis and explicit finite-sample validation limits. --- # Significance tests for factors and backtests *Author: [Artur Sepp](https://github.com/ArturSepp) / First recorded: [2026-11-03](https://github.com/ArturSepp/QuantInvestStrats/commit/e4c3383d91a24c49d1b78461ee7d60e40127b6e8)* Implemented in [qis — Quantitative Investment Strategies](https://github.com/ArturSepp/QuantInvestStrats). Software citation: [CITATION.cff](https://github.com/ArturSepp/QuantInvestStrats/blob/main/CITATION.cff). A significance test measures evidence against a specified null hypothesis, conditional on its sample, model and assumptions. A family correction addresses testing several supplied hypotheses; it does not reconstruct an unrecorded search for successful strategies. > **Pitfall.** The family interfaces in this chapter ship with qis 5.44.6 and later as > **submodule-only development interfaces**: import them from their `qis.perfstats` and > `qis.utils` submodules, not from `qis.*`. They are not in `qis.__all__` or the API reference > and carry no stability guarantee beyond the CHANGELOG. Correctness and reference checks do not > establish nominal size or coverage, and the maintainer's finite-sample validation study did > not meet all of its predeclared gates for either intercept estimator. ## Overview Three questions have different estimands: | Question | Null hypothesis | Calculation | |---|---|---| | Does each supplied return series have a nonzero mean? | Mean equals zero | Equal-weight mean with Bartlett HAC inference, optionally AR(1)-prewhitened | | Does each supplied strategy have alpha against supplied factors? | Regression intercept equals zero | Common-sample OLS with an intercept and Bartlett HAC inference, optionally AR(1)-prewhitened | | Does each candidate differ from one fixed benchmark? | Arithmetic Sharpe difference equals zero | Existing paired Sharpe-difference test, followed by family correction | Heteroskedasticity- and autocorrelation-consistent (HAC) standard errors address dependence under their asymptotic assumptions. Holm controls family-wise error rate (FWER); the Benjamini–Yekutieli procedure, called `BHY` in qis, controls false discovery rate (FDR) under arbitrary dependence when the marginal p-values are valid. These are different error targets, not interchangeable names for the same test. The optional stationary bootstrap changes the marginal p-values of the mean and alpha tests. It does not implement bootstrap Sharpe inference, simultaneous intervals, a maximum-statistic test, or a rerun of strategy selection. Factor-return means and time-series alphas are not cross-sectional prices of factor risk. ### Hypothesis tests in qis The table lists every hypothesis test that qis computes. The first five rows are the submodule-only interfaces of this chapter and carry the qualification limits of the Pitfall above; the other rows are `qis.*` exports documented in the linked chapters. A test without a family correction reports marginal statistics only. | Null hypothesis | Inference | Family correction | Entry point | Chapter | |---|---|---|---|---| | Each supplied mean equals zero | Bartlett HAC or AR(1)-prewhitened standard error, normal reference | Holm or BHY | `qis.perfstats.significance.compute_mean_significance` | This chapter | | Each alpha against supplied factors equals zero | Common-sample OLS, Bartlett HAC or AR(1)-prewhitened standard error | Holm or BHY | `qis.perfstats.significance.compute_alpha_significance` | This chapter | | Each candidate's Sharpe ratio equals one fixed benchmark's | Ledoit–Wolf delta method, Bartlett HAC | Holm or BHY | `qis.perfstats.significance.compute_sharpe_significance` | This chapter | | Each mean or alpha equals zero, with bootstrap p-values | Studentised circular stationary bootstrap, HAC refitted in every draw | Holm or BHY | `qis.perfstats.bootstrap_significance.compute_bootstrap_mean_significance`, `compute_bootstrap_alpha_significance` | This chapter | | Any declared family of supplied p-values | Supplied marginal p-values | Holm or BHY | `qis.perfstats.multiple_testing.adjust_pvalues` | This chapter | | Two Sharpe ratios are equal | Ledoit–Wolf delta method, Bartlett HAC | None | `qis.sharpe_difference_test` | [Sharpe ratios](performance_analytics_and_sharpe.md#paired-hac-test-of-a-sharpe-difference) | | A sample mean equals zero | Sample mean over its IID standard error | None | `qis.compute_desc_table(..., is_add_tstat=True)` | [Sharpe ratios](performance_analytics_and_sharpe.md) | | An EWMA-WLS regression alpha equals zero | Bartlett HAC, normal reference | None | `qis.estimate_ewma_alpha_beta_hac` | [Regression and HAC inference](regression_and_hac.md) | | A pooled cross-sectional signal slope equals zero | OLS t-statistic charging one residual degree of freedom per date | None | `qis.estimate_signal_diagnostics` | [Signal diagnostics](signal_diagnostics.md) | | The mean information coefficient equals zero | t-statistic of the per-date IC series | None | `qis.estimate_ic_ir` | [Signal diagnostics](signal_diagnostics.md) | | The summed lagged Dimson slopes equal zero | Classical OLS t-statistic, a screening statistic | None | `qis.estimate_dimson_beta` | [Serial dependence](serial_dependence.md) | qis does not compute the probabilistic or deflated Sharpe ratio, the minimum track record length, the probability of backtest overfitting, White's reality check, Hansen's test of superior predictive ability, a Romano–Wolf stepdown maximum-statistic test, or Ljung–Box and Box–Pierce portmanteau tests; for the last two use `statsmodels.stats.diagnostic.acorr_ljungbox`. No function corrects for a research search that was not recorded as a declared family. ## Inputs, notation, and assumptions | Convention | This article | |---|---| | Return basis | Supplied fractional simple returns; the caller has already applied reference-currency, cash/funding and cost treatment consistently | | Sampling grid | One complete common `DatetimeIndex`; declare `sampling_frequency` or an exact `expected_index`; no implicit resampling or pair-specific deletion | | Annualisation | `af=None` retains per-period units; explicit `af` scales mean/alpha estimates, SEs and bounds linearly, and paired Sharpe quantities by its square root | | Mean adjustment | Equal-weight estimation with an intercept; mean bootstrap subtracts sample means, alpha bootstrap subtracts fitted intercepts only | | Timing | Full-sample descriptive inference on supplied realised returns; decision timing and model selection must already be free of look-ahead | | Output units | Fractional return per period for mean/alpha, dimensionless Sharpe-difference units for the paired test; p-values and statistics are dimensionless | | qis default | Family method `HOLM`, significance level .05, pointwise confidence level .95, HAC lags 3, `InterceptInference.BARTLETT_HAC`, no annual display; generated bootstrap B=9,999, expected block length 6, seed 20261101 | | Symbol or input | Meaning | Units and convention | |---|---|---| | $T$, $M$, $k$ | Common observations, supplied hypotheses, design columns including the intercept | Counts; $T\geq24$ and $T>k$ | | $y_{j,t}$, $f_t$ | Response $j$ and supplied factor vector | Fractional simple returns on identical dates | | $\theta_j$ | Mean, alpha or candidate-minus-benchmark arithmetic Sharpe difference | The chosen test's estimand | | $L$, $B$ | Bartlett lag count and bootstrap draws | Observation counts, not calendar durations | | $q$, $c$ | Requested error-rate target and pointwise confidence level | `significance_level` and `confidence_level`, separately chosen | | $N_{\mathrm{false}}$, $N_{\mathrm{rej}}$ | False rejections and all rejections in the declared family | Counts in one experiment | Supply real numeric DataFrames with unique, nonblank hypothesis labels and finite values. Responses, factors and the fixed benchmark must have exactly the same ordered dates. An attached `index.freq` alone does not declare the sampling contract. With a regular frequency, missing interior observations fail validation. A custom `expected_index` explicitly defines its sessions; it is not inferred from the observed gaps. Factors must be nonempty and full rank, without constants, duplicate columns, self-regressors or a column named `Intercept`. Invalid family members reject the entire call. Zero or scale-relative degenerate residuals/SEs are errors, not hypotheses silently dropped from $M$. The paired Sharpe test retains its existing identical/positively proportional-series convention. The descriptions `return_basis` and `cost_basis` are required provenance, not transformations. For excess-return inference, prepare the returns before calling the tests; see [reference-currency excess returns](reference_currency_excess_returns.md). The code does not subtract cash, convert currencies, deduct costs or choose factors from these strings. ## Methodology ### Means and regression alphas **Definition.** Each two-sided null is $H_{0,j}:\theta_j=0$. For alpha, fit the supplied model $$ y_{j,t}=\alpha_j+\beta_j^\top f_t+\varepsilon_{j,t}. $$ The mean test is the intercept-only case. Both delegate to the shared equal-weight regression core. For design rows $x_t$, fitted residuals $\hat\varepsilon_{j,t}$ and scores $g_{j,t}=x_t\hat\varepsilon_{j,t}$, the Bartlett meat is $$ S_j=\sum_{t=1}^T g_{j,t}g_{j,t}^\top +\sum_{\ell=1}^{L}\left(1-\frac{\ell}{L+1}\right) \sum_{t=\ell+1}^{T} \left(g_{j,t}g_{j,t-\ell}^\top+g_{j,t-\ell}g_{j,t}^\top\right). $$ The covariance estimate is $$ \widehat{\operatorname{Cov}}(\hat b_j) =\frac{T}{T-k}(X^\top X)^{-1}S_j(X^\top X)^{-1}. $$ The intercept's diagonal element gives its squared HAC standard error. The correction is $T/(T-k)$, not an effective-sample-size replacement. See [regression and HAC inference](regression_and_hac.md) for derivation and assumptions, and [Newey–West (1987)](https://www.nber.org/papers/t0055) for the covariance estimator. The statistic $z_j=\hat\theta_j/\widehat{\operatorname{se}}_j$ uses the standard normal reference: $p_j=2\Phi(-|z_j|)$. The unadjusted pointwise interval is $$ \hat\theta_j\;\pm\;z_{(1+c)/2}\widehat{\operatorname{se}}_j. $$ This is not an exact finite-sample Student distribution. `hac_lags=None` selects the existing `newey_west_lag_rule(T)` once; an explicit lag must satisfy $0\leq L