Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

replace ADF test with Ljung-Box test for no autocorrelation #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mabrek
Copy link
Contributor

@mabrek mabrek commented Oct 22, 2013

No description provided.

@mabrek
Copy link
Contributor Author

mabrek commented Oct 22, 2013

using adfuller test to rule out non-stationary timeseries was a wrong idea (it's a unit root test, not a stationarity test). Non-stationary series have high autocorrelation so Ljung-Box test will catch them.

adf = sm.tsa.stattools.adfuller(reference, 10)
if adf[1] < 0.05:
_, ljp = sm.stats.diagnostic.acorr_ljungbox(reference)
if ljp[-1] > 0.05:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this line broke the build. We're PEP8 compliant now - can you please take care of that extra space after 'if'?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants