Skip to content

Instantly share code, notes, and snippets.

@mikekeith52
Created May 4, 2022 13:15
Show Gist options
  • Save mikekeith52/012255d52c6b0e897dfec66771642ab0 to your computer and use it in GitHub Desktop.
Save mikekeith52/012255d52c6b0e897dfec66771642ab0 to your computer and use it in GitHub Desktop.
critical_pval = 0.05
print('-'*100)
print('Augmented Dickey-Fuller results:')
stat, pval, _, _, _, _ = f.adf_test(full_res=True)
print('the test-stat value is: {:.2f}'.format(stat))
print('the p-value is {:.4f}'.format(pval))
print('the series is {}'.format('stationary' if pval < critical_pval else 'not stationary'))
print('-'*100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment