Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hurst exponent #8

Open
Prossi79 opened this issue Oct 29, 2019 · 1 comment
Open

Hurst exponent #8

Prossi79 opened this issue Oct 29, 2019 · 1 comment

Comments

@Prossi79
Copy link

Prossi79 commented Oct 29, 2019

Hello! Just working with your code on a time series analysis, to compute the Hurst exponent of a equity, e.g. Google.

Here is the code:

import matplotlib.pyplot as plt
from hurst import compute_Hc
from datetime import datetime
import pandas_datareader as web

series = web.DataReader("GOOG", "yahoo", datetime(2000,1,1), datetime(2013,1,1))

H, c, data = compute_Hc(series['Adj Close'], kind='price', simplified=True)

Output: H 0.82083 C 0.5268

Following this resource for the Google stock a Hurst of 0.50788 was calculated -> https://www.quantstart.com/articles/basics-of-statistical-mean-reversion-testing

In your script c is the equivalent to the Hurst Exponent being calculated in above link? Or are the two methods not comparable?

@geofffoster
Copy link

change simplified=False

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

No branches or pull requests

2 participants