momentum

A trivial mini-package for computing the running univariate 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
For multivariate covariance updating, maybe see precise.
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.
Usage: running recency-weighted mean, var
from momentum import rvar_init, rvar_update
from pprint import pprint
m = rvar_init(rho=0.01,n=15)
for x in [5,3,2.4,1.0,5.0]:
m = rvar_update(m,x)
pprint(m)
This will switch from running variance to a weighted variance after 15 data points.
Metadata
Release files for momentum 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| momentum-0.2.7.tar.gz | 5.8 kB | Without provenance | Details for momentum-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| momentum-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for momentum-0.2.7-py3-none-any.whl |
Total release size: 12.8 kB
Release files / momentum-0.2.7.tar.gz
| Download URL | momentum-0.2.7.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbb3610e3d002d4ec817b9b65117d6314a3d22fe29acb289e12842e5cfe05fa6
|
|
BLAKE2b-256 checksum How to use checksums |
9d7c1f52beeb73b440ecd2cdccf1898e8dbc0e796af158a890e95ddfa585f49f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / momentum-0.2.7-py3-none-any.whl
| Download URL | momentum-0.2.7-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6a86b8f44ce8df3d71bd41f0be27a1ff6b0493e0cf491c8389ffb1fd5f528b3
|
|
BLAKE2b-256 checksum How to use checksums |
5332df99de866fe249d36288bd1993866274ee16c889fec100e335ebd3460598
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for momentum 0.2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.