tsfracdiff


Nametsfracdiff JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/adamvvu/tsfracdiff
SummaryEfficient and easy to use fractional differentiation transformations for stationarizing time series data.
upload_time2023-02-10 11:52:09
maintainer
docs_urlNone
authorAdam Wu
requires_python>=3.7
licenseMIT License Copyright (c) [2022] [adamvvu] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build](https://img.shields.io/github/actions/workflow/status/adamvvu/tsfracdiff/tsfracdiff_tests.yml?style=for-the-badge)](https://github.com/adamvvu/tsfracdiff/actions/workflows/tsfracdiff_tests.yml)
[![PyPi](https://img.shields.io/pypi/v/tsfracdiff?style=for-the-badge)](https://pypi.org/project/tsfracdiff/)
[![Downloads](https://img.shields.io/pypi/dm/tsfracdiff?style=for-the-badge)](https://pypi.org/project/tsfracdiff/)
[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](https://github.com/adamvvu/tsfracdiff/blob/master/LICENSE)

Efficient and easy to use fractional differentiation transformations for
stationarizing time series data in Python.

------------------------------------------------------------------------

## **tsfracdiff**

Data with high persistence, serial correlation, and non-stationarity
pose significant challenges when used directly as predictive signals in
many machine learning and statistical models. A common approach is to
take the first difference as a stationarity transformation, but this
wipes out much of the information available in the data. For datasets
where there is a low signal-to-noise ratio such as financial market
data, this effect can be particularly severe. Hosking (1981) introduces
fractional (non-integer) differentiation for its flexibility in modeling
short-term and long-term time series dynamics, and López de Prado (2018)
proposes the use of fractional differentiation as a feature
transformation for financial machine learning applications. This library
is an extension of their ideas, with some modifications for efficiency
and robustness.

[Documentation](https://adamvvu.github.io/tsfracdiff/docs/)

## Getting Started

### Installation

`pip install tsfracdiff`

#### Dependencies:

    # Required
    python3 # Python 3.7+
    numpy
    pandas
    arch

    # Suggested
    joblib

### Usage

``` python
# A pandas.DataFrame/np.array with potentially non-stationary time series
df 

# Automatic stationary transformation with minimal information loss
from tsfracdiff import FractionalDifferentiator
fracDiff = FractionalDifferentiator()
df = fracDiff.FitTransform(df)
```

For a more in-depth example, see this
[notebook](https://adamvvu.github.io/tsfracdiff/examples/Example.html).

## References

Hosking, J. R. M. (1981). Fractional Differencing. Biometrika, 68(1),
165--176. <https://doi.org/10.2307/2335817>

López de Prado, Marcos (2018). Advances in Financial Machine Learning.
John Wiley & Sons, Inc.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/adamvvu/tsfracdiff",
    "name": "tsfracdiff",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Adam Wu",
    "author_email": "adamwu1@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/fa/7c/e52f246b1f7ac0c641b454233a4f50cf3bdec99a2d6fb3577078ec588430/tsfracdiff-1.0.4.tar.gz",
    "platform": null,
    "description": "[![Build](https://img.shields.io/github/actions/workflow/status/adamvvu/tsfracdiff/tsfracdiff_tests.yml?style=for-the-badge)](https://github.com/adamvvu/tsfracdiff/actions/workflows/tsfracdiff_tests.yml)\r\n[![PyPi](https://img.shields.io/pypi/v/tsfracdiff?style=for-the-badge)](https://pypi.org/project/tsfracdiff/)\r\n[![Downloads](https://img.shields.io/pypi/dm/tsfracdiff?style=for-the-badge)](https://pypi.org/project/tsfracdiff/)\r\n[![License](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](https://github.com/adamvvu/tsfracdiff/blob/master/LICENSE)\r\n\r\nEfficient and easy to use fractional differentiation transformations for\r\nstationarizing time series data in Python.\r\n\r\n------------------------------------------------------------------------\r\n\r\n## **tsfracdiff**\r\n\r\nData with high persistence, serial correlation, and non-stationarity\r\npose significant challenges when used directly as predictive signals in\r\nmany machine learning and statistical models. A common approach is to\r\ntake the first difference as a stationarity transformation, but this\r\nwipes out much of the information available in the data. For datasets\r\nwhere there is a low signal-to-noise ratio such as financial market\r\ndata, this effect can be particularly severe. Hosking (1981) introduces\r\nfractional (non-integer) differentiation for its flexibility in modeling\r\nshort-term and long-term time series dynamics, and L\u00f3pez de Prado (2018)\r\nproposes the use of fractional differentiation as a feature\r\ntransformation for financial machine learning applications. This library\r\nis an extension of their ideas, with some modifications for efficiency\r\nand robustness.\r\n\r\n[Documentation](https://adamvvu.github.io/tsfracdiff/docs/)\r\n\r\n## Getting Started\r\n\r\n### Installation\r\n\r\n`pip install tsfracdiff`\r\n\r\n#### Dependencies:\r\n\r\n    # Required\r\n    python3 # Python 3.7+\r\n    numpy\r\n    pandas\r\n    arch\r\n\r\n    # Suggested\r\n    joblib\r\n\r\n### Usage\r\n\r\n``` python\r\n# A pandas.DataFrame/np.array with potentially non-stationary time series\r\ndf \r\n\r\n# Automatic stationary transformation with minimal information loss\r\nfrom tsfracdiff import FractionalDifferentiator\r\nfracDiff = FractionalDifferentiator()\r\ndf = fracDiff.FitTransform(df)\r\n```\r\n\r\nFor a more in-depth example, see this\r\n[notebook](https://adamvvu.github.io/tsfracdiff/examples/Example.html).\r\n\r\n## References\r\n\r\nHosking, J. R. M. (1981). Fractional Differencing. Biometrika, 68(1),\r\n165--176. <https://doi.org/10.2307/2335817>\r\n\r\nL\u00f3pez de Prado, Marcos (2018). Advances in Financial Machine Learning.\r\nJohn Wiley & Sons, Inc.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) [2022] [adamvvu]  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Efficient and easy to use fractional differentiation transformations for stationarizing time series data.",
    "version": "1.0.4",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9644c1c13c9ed2eb202fcf576a9820e39fdaa5c5fbb5d21e90014bed97f1fe05",
                "md5": "42068ae7bcb3132c036b45af7a920215",
                "sha256": "501c54ec8c84178593e1fd78ce48c209ebfe2f1707f0c457bbb3aa5986274a0b"
            },
            "downloads": -1,
            "filename": "tsfracdiff-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "42068ae7bcb3132c036b45af7a920215",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8794,
            "upload_time": "2023-02-10T11:52:07",
            "upload_time_iso_8601": "2023-02-10T11:52:07.783969Z",
            "url": "https://files.pythonhosted.org/packages/96/44/c1c13c9ed2eb202fcf576a9820e39fdaa5c5fbb5d21e90014bed97f1fe05/tsfracdiff-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa7ce52f246b1f7ac0c641b454233a4f50cf3bdec99a2d6fb3577078ec588430",
                "md5": "5aef82e084d9e86b0a99a1783d01f2ff",
                "sha256": "bd0264fdfa3dadc8fefa4b98889cb1109e3c507de764d6b028a1e07044ab7073"
            },
            "downloads": -1,
            "filename": "tsfracdiff-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "5aef82e084d9e86b0a99a1783d01f2ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 10393,
            "upload_time": "2023-02-10T11:52:09",
            "upload_time_iso_8601": "2023-02-10T11:52:09.391970Z",
            "url": "https://files.pythonhosted.org/packages/fa/7c/e52f246b1f7ac0c641b454233a4f50cf3bdec99a2d6fb3577078ec588430/tsfracdiff-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-10 11:52:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "adamvvu",
    "github_project": "tsfracdiff",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "tsfracdiff"
}
        
Elapsed time: 0.44511s