The Econometrics module contains statistical tests and estimators for financial time series and panel data. It covers unit root and cointegration tests, regression estimators (OLS, WLS, GLS, quantile, logit, probit, Fama-MacBeth), causal inference methods (instrumental variables, difference-in-differences, regression discontinuity, propensity score matching, synthetic control), panel data estimators, specification and diagnostic tests, time series forecasting (ARIMA, VAR, VECM) and event studies.

Every function of the Econometrics module has its own page with an example and its parameters. Pick one from the sidebar on the left.Every function of the Econometrics module has its own page with an example and its parameters. Pick one from the .

Unlike the other modules, this one depends on statsmodels and linearmodels. These are bundled in the optional econometrics extra, so install the Finance Toolkit with:

pip install "financetoolkit[econometrics]" -U
Search Results

Getting Started

This class is closely related to the Risk class, which houses the risk measures (VaR, CVaR, GARCH) that these tests often inform the choice of.

Requires the optional financetoolkit[econometrics] extra (statsmodels and linearmodels) – install with pip install financetoolkit[econometrics].

The Econometrics module is reached through a Toolkit instance, as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")

toolkit.econometrics.get_augmented_dickey_fuller(period='yearly')

The sidebar gives access to every metric in the Econometrics module, each on its own page with a description, an example and its parameters. Pick one there to open it.The sidebar gives access to every metric in the Econometrics module, each on its own page with a description, an example and its parameters. On a phone, open the to pick one.