Skip to main content

Time series models as pure functions, hyper-optimized by all the popular packages

Project description

momentum

Running mean, variance, kurtosis and skew

  • No dependencies ... not even numpy.
  • No classes ... unless you want them.
  • State is a dict, for trivial serialization.
  • Tested against scipy, creme, statistics
  • Includes population variance

Install

%pip install momentum

Usage: running mean, var

from momentum import var_init, var_update
from pprint import pprint

m = var_init()
for x in [5,3,2.4,1.0,5.0]:
    m = var_update(m,x)
pprint(m)

Usage: running mean, var, kurtosis and skew

from momentum import kurtosis_init, kurtosis_update

m = kurtosis_init()
for x in [5,3,2.4,1.0,5.0]:
    m = kurtosis_update(m,x)
pprint(m)

File an issue if you need more help using this.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

momentum-0.0.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

momentum-0.0.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file momentum-0.0.3.tar.gz.

File metadata

  • Download URL: momentum-0.0.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for momentum-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3e91a324d9b70d356a0a76486d4315cefa83a5ce24ae7f2b00906e691d37b62d
MD5 5a2cfbad0d5cb7844ed56acff8f8b209
BLAKE2b-256 d7942de46c7321364c5cbfab57b9d1f35d41dfa8a5d2ae2316270393faec9b29

See more details on using hashes here.

File details

Details for the file momentum-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: momentum-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for momentum-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0e2238d950574922efed28c2c63bf1cbe427abf1a874fc6ba20ad91f1c92071a
MD5 1f8ceec95451223a13da1cbe0d0abdbe
BLAKE2b-256 16550290a8a70ded34c08a9228a8015f391a0fd6e6e170433efb83e31caeb9a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page