问题描述
在任何处理统计和时间序列分析(pandas和statsmodel)的Python模块中,我找不到任何有关功能的参考信息来执行Johansen协整测试.是否有位bpdy知道周围是否有一些代码可以对时间序列之间的协整性进行这种测试?感谢您的帮助,
I can't find any reference on funcionality to perform Johansen cointegration test in any Python module dealing eith statistics and time series analysis (pandas and statsmodel). Does anybpdy know if there's some code around that can perform such a test for cointegration among time series?Thanks for your help,
Maruizio
推荐答案
statsmodels没有Johansen协整测试.而且,我也从未在任何其他python包中看到过它.
statsmodels doesn't have a Johansen cointegration test. And, I have never seen it in any other python package either.
statsmodels具有VAR和结构VAR,但还没有VECM(矢量误差校正模型).
statsmodels has VAR and structural VAR, but no VECM (vector error correction models) yet.
更新:
正如Wes所提到的,现在对Johansen的statsmodels的协整检验提出了要求.我已经在LeSage的空间计量经济学工具箱中翻译了matlab版本,并编写了一组测试以验证我们得到的结果相同.下一版本的statsmodels应该可用.
As Wes mentioned, there is now a pull request for Johansen's cointegration test for statsmodels. I have translated the matlab version in LeSage's spatial econometrics toolbox and wrote a set of tests to verify that we get the same results. It should be available in the next release of statsmodels.
更新2:
协整检验coint_johansen
与矢量误差校正模型VECM一起包含在stats模型0.9.0中.(另请参阅第三个答案)
The test for cointegration coint_johansen
was included in statsmodels 0.9.0 together with the vector error correction models VECM.(see also 3rd answer)
这篇关于python中的Johansen协整测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!