statsmodels
Statsmodels, statistical modeling and econometrics in Python
...The package is released under the open source Modified BSD (3-clause) license. Generalized linear models with support for all of the one-parameter exponential family distributions. Markov switching models (MSAR), also known as Hidden Markov Models (HMM). Vector autoregressive models, VAR and structural VAR. Vector error correction model, VECM. Robust linear models with support for several M-estimators. statsmodels supports specifying models using R-style formulas and pandas DataFrames.