Skip to content

Reference

Two complementary references for the tsecon API.

API reference

The complete callable surface — every function's signature and one-line contract, generated directly from the type stub so it never drifts from the shipped module. Start here when you know the function and need its arguments.

Results objects

tsecon.results — an opt-in layer of dict subclasses that render themselves: .summary() output an economist can read, plus the standard plots. Because they subclass dict, the plain-dict contract every estimator already returns is preserved exactly; adopting them is additive.

Testing & validation

The single map of how the library is tested: nine tiers from Rust goldens to a published-result replication, what each can and cannot prove, the commands to run them, and an honest list of what is not covered. Start here if you are deciding whether to trust a number this library produced.

Validation matrix

What every method family is validated against — the reference implementation (statsmodels, SciPy, arch, linearmodels, scikit-learn, ArviZ) or the documented closed form, with the fixture, the test, and the tolerance for each. Correctness, made auditable. Its runtime companion is the Monte Carlo suite, which verifies the statistical properties (size, coverage, consistency) that a fixture match cannot.

Model cards

One card per method family, each with the same anatomy: what it estimates · assumptions · when to use (and when not) · key arguments and defaults (and why) · how to read the output · failure modes · what it's validated against · references · a runnable example. Start here when you want to know whether a method fits your problem and how to trust its output.

Family Functions
Diagnostics acf, pacf, ljung_box, jarque_bera, arch_lm, adf, kpss, check_stationarity
Phillips-Perron & Ouliaris tests phillips_perron, phillips_ouliaris
Check series (one-call battery) check_series (plus the tsecon.results.check_series facade with .summary() / .plot_diagnostics())
ARIMA arima_fit, ar_loglik
Spectral analysis periodogram, welch, coherence
Volatility garch_fit, gas_volatility, ccc_garch, dcc_garch
VAR / SVAR var_fit, var_irf, var_irf_bands, var_fevd, var_granger, var_forecast, sign_restricted_svar, zero_sign_svar, favar, connectedness
Structural identification (advanced) long_run_svar, max_share_svar, proxy_svar, hetero_svar
Local projections lp, lp_iv, lp_multiplier, lp_state, smooth_lp
Bayesian bvar_fit, bvar_hierarchical, bvar_ssvs, bvar_irf_draws, mcmc_diagnostics
GMM iv_gmm, gmm_nonlinear
Cointegration & regimes johansen, vecm, markov_switching_ar
Forecasting backtest, dm_test, cw_test, gw_test, theta_forecast, accuracy
Machine learning ridge, lasso, elastic_net, adaptive_lasso, lasso_path, cv_splits
Panel panel_fe, panel_lp, mean_group_var, panel_mean_group, panel_pmg
Panel unit-root tests panel_unit_root (LLC, IPS, Fisher/Maddala-Wu-Choi)
Nowcasting & MIDAS dfm_nowcast, dfm_news, midas_weights, umidas, weighted_midas
Term structure nelson_siegel, svensson, dynamic_ns
Realized volatility realized_measures, har_rv, realized_quarticity, tripower_quarticity, bns_jump_test, realized_range
Predictive regressions & IVX predictive_regression, ivx_test
Recession probability recession_probit
Survey expectations cg_regression, forecast_efficiency, forecast_disagreement
Long memory frac_diff, frac_integrate, long_memory_d
Specification & diagnostic tests heteroskedasticity_test, reset_test, chow_test, cusum_test
Arbitrage-free Nelson-Siegel afns_adjustment
DSGE (linear RE solver) dsge_solve
Quantile regression & growth-at-risk quantile_regression, quantile_lp, growth_at_risk
Functional shocks (FVAR/FLP) functional_pca, flp, flp_scenario, fvar_scenario
Structural breaks bai_perron, sup_f_test