rtta


Namertta JSON
Version 0.0.11 PyPI version JSON
download
home_pagehttps://github.com/adamdeprince/rtta
SummaryLow Latency incremental Technical Analysis
upload_time2024-01-30 01:35:44
maintainer
docs_urlNone
authorAdam DePrince
requires_python>=3.4
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            RTTA
======================

Purpose
-------

The purpose of this package is to implement a very low latency
incremental technical analysis toolkit.  Most technical analysis
tool-kits work in a "batch mode" where you hand them a blob of data and
in a pandas series and they return a series with the computed data.
Incremental updates for these require O(n) work.  There is one tool,
[talipp](https://pypi.org/project/talipp/) that is designed to support
incremental updates, but it is implemented in pure python and is a
little more than an order of magnitude slower than rtta.  On a 5995WX
talipp's exponential moving average requires 465ns; rtta's requires
36ns.  A bare python function call requires 35ns, so we're about as
fast as fast can be.

Installation
------------


```bash
pip install rtta
```

Usage
-----

Each operator has a paramater fillna.  If set to false, nan values
will be returned until the operation is "populated".  If set to true,
best guesses will be returned until the operation is populated.

So for example, our simple moving average `SMAIndicator` works sort of like this:

```python
>>> import rtta.trend as trend
>>> sma = trend.SMAIndicator(window=4, fillna=True)
>>> sma.update(1)
1
>>> sma.update(2)
1.5
>>> sma.update(3)
2
>>> sma.update(2)
2
>>> sma.update(2)
2.25 <- The 1 fell off the end of the sliding window
```

Performance
-----------

|Indicator | Latency |
|----------|---------|
| SMA      | 36ns    |
| EMA      | 36ns    |
| MACD     | 55ns    |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/adamdeprince/rtta",
    "name": "rtta",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.4",
    "maintainer_email": "",
    "keywords": "",
    "author": "Adam DePrince",
    "author_email": "adam.deprince@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/87/05/7b817cfe34b4c155f75b450e3654d3d83e46a5583bd1c04cf2bcc5766109/rtta-0.0.11.tar.gz",
    "platform": null,
    "description": "RTTA\n======================\n\nPurpose\n-------\n\nThe purpose of this package is to implement a very low latency\nincremental technical analysis toolkit.  Most technical analysis\ntool-kits work in a \"batch mode\" where you hand them a blob of data and\nin a pandas series and they return a series with the computed data.\nIncremental updates for these require O(n) work.  There is one tool,\n[talipp](https://pypi.org/project/talipp/) that is designed to support\nincremental updates, but it is implemented in pure python and is a\nlittle more than an order of magnitude slower than rtta.  On a 5995WX\ntalipp's exponential moving average requires 465ns; rtta's requires\n36ns.  A bare python function call requires 35ns, so we're about as\nfast as fast can be.\n\nInstallation\n------------\n\n\n```bash\npip install rtta\n```\n\nUsage\n-----\n\nEach operator has a paramater fillna.  If set to false, nan values\nwill be returned until the operation is \"populated\".  If set to true,\nbest guesses will be returned until the operation is populated.\n\nSo for example, our simple moving average `SMAIndicator` works sort of like this:\n\n```python\n>>> import rtta.trend as trend\n>>> sma = trend.SMAIndicator(window=4, fillna=True)\n>>> sma.update(1)\n1\n>>> sma.update(2)\n1.5\n>>> sma.update(3)\n2\n>>> sma.update(2)\n2\n>>> sma.update(2)\n2.25 <- The 1 fell off the end of the sliding window\n```\n\nPerformance\n-----------\n\n|Indicator | Latency |\n|----------|---------|\n| SMA      | 36ns    |\n| EMA      | 36ns    |\n| MACD     | 55ns    |\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Low Latency incremental Technical Analysis",
    "version": "0.0.11",
    "project_urls": {
        "Homepage": "https://github.com/adamdeprince/rtta"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "404c9148e39949e564fa8708165a4be2baebd7bbfc3453b3e7c999d4efbdcd2c",
                "md5": "62386917385f52b3ef3fc4fbdcaa0b2e",
                "sha256": "e9d702d138c9f66417ce2d47f62071eeee20f5f4981692b25403185c2f7081aa"
            },
            "downloads": -1,
            "filename": "rtta-0.0.11-cp311-cp311-macosx_12_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "62386917385f52b3ef3fc4fbdcaa0b2e",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.4",
            "size": 231148,
            "upload_time": "2024-01-30T01:35:42",
            "upload_time_iso_8601": "2024-01-30T01:35:42.038335Z",
            "url": "https://files.pythonhosted.org/packages/40/4c/9148e39949e564fa8708165a4be2baebd7bbfc3453b3e7c999d4efbdcd2c/rtta-0.0.11-cp311-cp311-macosx_12_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87057b817cfe34b4c155f75b450e3654d3d83e46a5583bd1c04cf2bcc5766109",
                "md5": "f29203f90c24d25c4e1b923b6807cd86",
                "sha256": "3ba2b75caabe3fbb38f13bd6e2e232d8ee2dec34dc1ef3e3abe61b3a0c3f6403"
            },
            "downloads": -1,
            "filename": "rtta-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "f29203f90c24d25c4e1b923b6807cd86",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.4",
            "size": 294895,
            "upload_time": "2024-01-30T01:35:44",
            "upload_time_iso_8601": "2024-01-30T01:35:44.164827Z",
            "url": "https://files.pythonhosted.org/packages/87/05/7b817cfe34b4c155f75b450e3654d3d83e46a5583bd1c04cf2bcc5766109/rtta-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 01:35:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adamdeprince",
    "github_project": "rtta",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "rtta"
}
        
Elapsed time: 0.35783s