GithubHelp home page GithubHelp logo

iisayoo / johansen Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 27.0 67 KB

Python implementation of the Johansen test for cointegration

License: MIT License

Python 13.79% Jupyter Notebook 69.46% OpenEdge ABL 16.76%

johansen's People

Contributors

esvhd avatar iisayoo avatar scoursen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

johansen's Issues

Import error

When first importing johansen (in python3), it gives me a "module not found error".
Prior, it also gave me errors relating to python 2 vs 3 in the johansen.py file, but I edited those to conform to python 3.

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-a1c691410a6a> in <module>()
----> 1 import johansen

~/.local/lib/python3.6/site-packages/johansen/__init__.py in <module>()
----> 1 from .johansen import Johansen

~/.local/lib/python3.6/site-packages/johansen/johansen.py in <module>()
      2 from statsmodels.tsa.tsatools import lagmat
      3 
----> 4 import critical_values
      5 
      6 

ModuleNotFoundError: No module named 'critical_values'

However, in ~/.local/lib/python3.6/site-packages/johansen, the critical_values.py file is there!
This question / problem may be better suited for StackOverflow--however I thought I would try here.

Any insight is appreciated.
Edit: added sys.path.append('/home/theo/.local/lib/python3.6/site-packages/johansen') andimport johansen worked properly, however from johansen import coint_johansen did not work properly.

rejected_r_values

Hi dear,

Thanks for these awesome scripts. One question I have is that when johansen() returns eigenvectors and rejected_r_values, if r=x null hypothesis got rejected, should we append x+1 into the rejected_r_values list?
My idea is that if we rejected the null hypothesis r=0 , we should have 1 (using maxeigen) or 3(using trace) cointegrating vectors, therefore we should append r=1 into the rejected_r_values list.
For example,
rejected_r_values = []
for r in range(m):
if self.h_test(eigenvalues, r):
rejected_r_values.append(r+1)

In your notebook example, where the johansen function returns r=[1], I don't quite understand how you get r=[1] only. Because in the johansen function, rejected_r_values should be like [0,1]. Could you elaborate more on this? Thank you so much!

Once again, thanks for the awesome work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.