hurst-exponent


Namehurst-exponent JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/anabugaenko/hurst_exponent
SummaryHurst exponent estimator
upload_time2023-10-03 09:20:23
maintainer
docs_urlNone
authorAnastasia Bugeenko
requires_python>=3.9,<4.0
licenseMIT
keywords hurst autocorrelation time-series fractals
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Hurst Estimator

Estimate the Hurst exponent of a random variable using robust statistical methods. Our package provides methods to compute the Hurst exponent (a statistical measure of long-term memory) using the standard deviation of sums and a generalized method through the structure function. 

## Features:

  - Support for both standard and generalized Hurst exponent calculations.
  - Goodness of fit metrics.
  - Interpretation of Hurst exponent values.
  - Ability to plot and visualize fit results.
  - Bootstrap functionality for additional statistics.
  - Compute linear and nonlinear autocorrelation functions (ACF)
  - Test suite test suite is meant to validate the functionality of Hurst exponent estimators.
  - Other hurst estimation methods will be supported in the near future.

This repository is actively being developed and any tickets will be addressed in order of importance. Feel free to raise an issue if you find a problem.

## Installation 

To get started;

`pip install hurst_exponent`


### Dependencies
Ensure the following dependencies are installed before utilizing the package.

  - numpy
  - pandas
  - powerlaw_function
  - stochastic

## Basic Usage 

This tells you everything you need to know for the simplest, typical, use cases:
  
~~~python
from hurst_exponent import standard_hurst, generalized_hurst

# Define your time series data
series = [...]

# Estimate Hurst Exponent using standard method
hurst_std, fit_std = standard_hurst(series)

# Estimate Hurst Exponent using generalized method
hurst_gen, fit_gen = generalized_hurst(series)

# Print results
print(f"Standard Hurst Exponent: {hurst_std}")
print(f"Generalized Hurst Exponent: {hurst_gen}")
~~~

## Documentation

### Main Functions
  ~~~python
  standard_hurst(series: np.array, ...):
  ~~~
  Compute the Hurst exponent using the standard deviation of sums.

  ~~~python
  generalized_hurst(series: np.array, ...):
  ~~~
  Computes the generalized Hurst exponent using the structure function method.


### Utils
~~~python
  bootstrap(estimator: Callable, ...):
~~~
  
  Generates bootstrap samples.

### Hurst Estimators Test Suite

Our Hurst Estimators Test Suite ensures the robustness and accuracy of the  standard_hurst and generalized_hurst estimators in the context of time series analysis.

#### Highlights:

Tests various hyperparameter combinations for both the generalized and standard Hurst estimators.

  ##### Estimators;
  
    - Simulation: Uses Geometric Brownian Motion (GBM) to simulate data for testing, representing a standard model for stock price movements with a known Hurst of 0.5.

    - Bootstrapping: Repeated sampling is employed to create a distribution of Hurst estimates for statistical validation.

  ##### Core Tests;

    - Unbiasedness: Checks if the estimator accurately identifies a random walk in GBM data.
    - Validity: Ensures estimates fall within the [0, 1] range.
    - Confidence Intervals: Validates that the 95% CI aligns with bounds cited in major literature.
  
To delve into the specifics, review the test suite source code.

# License
This project is licensed under the MIT License. See the LICENSE.md file for details.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/anabugaenko/hurst_exponent",
    "name": "hurst-exponent",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "hurst,autocorrelation,time-series,fractals",
    "author": "Anastasia Bugeenko",
    "author_email": "anabugaenko@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6a/60/c8bce1962c6708b5bdc0936458390f2ef13e4a9a872564d568502f8f79da/hurst_exponent-0.1.1.tar.gz",
    "platform": null,
    "description": "# Hurst Estimator\n\nEstimate the Hurst exponent of a random variable using robust statistical methods. Our package provides methods to compute the Hurst exponent (a statistical measure of long-term memory) using the standard deviation of sums and a generalized method through the structure function. \n\n## Features:\n\n  - Support for both standard and generalized Hurst exponent calculations.\n  - Goodness of fit metrics.\n  - Interpretation of Hurst exponent values.\n  - Ability to plot and visualize fit results.\n  - Bootstrap functionality for additional statistics.\n  - Compute linear and nonlinear autocorrelation functions (ACF)\n  - Test suite test suite is meant to validate the functionality of Hurst exponent estimators.\n  - Other hurst estimation methods will be supported in the near future.\n\nThis repository is actively being developed and any tickets will be addressed in order of importance. Feel free to raise an issue if you find a problem.\n\n## Installation \n\nTo get started;\n\n`pip install hurst_exponent`\n\n\n### Dependencies\nEnsure the following dependencies are installed before utilizing the package.\n\n  - numpy\n  - pandas\n  - powerlaw_function\n  - stochastic\n\n## Basic Usage \n\nThis tells you everything you need to know for the simplest, typical, use cases:\n  \n~~~python\nfrom hurst_exponent import standard_hurst, generalized_hurst\n\n# Define your time series data\nseries = [...]\n\n# Estimate Hurst Exponent using standard method\nhurst_std, fit_std = standard_hurst(series)\n\n# Estimate Hurst Exponent using generalized method\nhurst_gen, fit_gen = generalized_hurst(series)\n\n# Print results\nprint(f\"Standard Hurst Exponent: {hurst_std}\")\nprint(f\"Generalized Hurst Exponent: {hurst_gen}\")\n~~~\n\n## Documentation\n\n### Main Functions\n  ~~~python\n  standard_hurst(series: np.array, ...):\n  ~~~\n  Compute the Hurst exponent using the standard deviation of sums.\n\n  ~~~python\n  generalized_hurst(series: np.array, ...):\n  ~~~\n  Computes the generalized Hurst exponent using the structure function method.\n\n\n### Utils\n~~~python\n  bootstrap(estimator: Callable, ...):\n~~~\n  \n  Generates bootstrap samples.\n\n### Hurst Estimators Test Suite\n\nOur Hurst Estimators Test Suite ensures the robustness and accuracy of the  standard_hurst and generalized_hurst estimators in the context of time series analysis.\n\n#### Highlights:\n\nTests various hyperparameter combinations for both the generalized and standard Hurst estimators.\n\n  ##### Estimators;\n  \n    - Simulation: Uses Geometric Brownian Motion (GBM) to simulate data for testing, representing a standard model for stock price movements with a known Hurst of 0.5.\n\n    - Bootstrapping: Repeated sampling is employed to create a distribution of Hurst estimates for statistical validation.\n\n  ##### Core Tests;\n\n    - Unbiasedness: Checks if the estimator accurately identifies a random walk in GBM data.\n    - Validity: Ensures estimates fall within the [0, 1] range.\n    - Confidence Intervals: Validates that the 95% CI aligns with bounds cited in major literature.\n  \nTo delve into the specifics, review the test suite source code.\n\n# License\nThis project is licensed under the MIT License. See the LICENSE.md file for details.\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Hurst exponent estimator",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/anabugaenko/hurst_exponent",
        "Repository": "https://github.com/anabugaenko/hurst_exponent"
    },
    "split_keywords": [
        "hurst",
        "autocorrelation",
        "time-series",
        "fractals"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1817b26cb6453904cea31c6d4d0e3ed6244cad2a89ec4619599ab2788cbe1231",
                "md5": "ed35f5a9c7c96c68eb9f26ec3cdd1f9f",
                "sha256": "482238ee4e631ab765b6773f0b6633dbb9d78d0268a0256cf1c4888dceb447cf"
            },
            "downloads": -1,
            "filename": "hurst_exponent-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ed35f5a9c7c96c68eb9f26ec3cdd1f9f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 8387,
            "upload_time": "2023-10-03T09:20:21",
            "upload_time_iso_8601": "2023-10-03T09:20:21.677337Z",
            "url": "https://files.pythonhosted.org/packages/18/17/b26cb6453904cea31c6d4d0e3ed6244cad2a89ec4619599ab2788cbe1231/hurst_exponent-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a60c8bce1962c6708b5bdc0936458390f2ef13e4a9a872564d568502f8f79da",
                "md5": "a75adc3ff952374ab1ba394cb94591dd",
                "sha256": "38e678401df0ae9b18dcd559a0bb8a5be9753e0bf7fdaf961d473dfe500c5330"
            },
            "downloads": -1,
            "filename": "hurst_exponent-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a75adc3ff952374ab1ba394cb94591dd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 7156,
            "upload_time": "2023-10-03T09:20:23",
            "upload_time_iso_8601": "2023-10-03T09:20:23.696260Z",
            "url": "https://files.pythonhosted.org/packages/6a/60/c8bce1962c6708b5bdc0936458390f2ef13e4a9a872564d568502f8f79da/hurst_exponent-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-03 09:20:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "anabugaenko",
    "github_project": "hurst_exponent",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "hurst-exponent"
}
        
Elapsed time: 2.58117s