cotmetrics
Turn raw COT (Commitments of Traders) data into positioning metrics and trading
signals — the positioning index, concentration / clustering / position-size,
reversal signals, and the CotIndexer that assembles per-instrument weekly panels.
Split out of cot-analyzer so the metrics layer installs without the Dash/Plotly
dashboard stack. Reads prices/COT from the shared cotdata store.
Install (workspace, editable)
pip install -e ../cotdata -e .[options,scheduler,dev]
export COTDATA_STORE=~/code/cotdata_store # shared data store
export COTMETRICS_CACHE=~/.cache/cotmetrics # derived per-instrument parquet cache
Use
import cotmetrics # flat metric fns
from cotmetrics.indexer import cotIndexer, boot_options_update
from cotmetrics.signals import append_trading_signals
cotmetrics.calculate_cot_index(...)
import cotmetrics is side-effect-free. Constructing the indexer
(from cotmetrics.indexer import cotIndexer) loads the store; the daily options
fetch runs only when you call boot_options_update() explicitly.
Config / paths
| env | meaning | default |
|---|---|---|
COTDATA_STORE |
shared price/COT store (from cotdata) | required |
COTMETRICS_CACHE |
derived per-instrument parquet cache | ~/.cache/cotmetrics |
COTMETRICS_PARAMS |
instrument/params config | packaged sample params.yaml |
COTMETRICS_DATA |
legacy raw_cot_data.parquet + real_test_data exports | <cache>/../cotmetrics_data |
The packaged params.yaml is a small generic sample (a handful of well-known
symbols, untuned 52-week lookbacks) so cotmetrics runs out of the box. For a real
instrument universe and any tuned parameters, set COTMETRICS_PARAMS to your own
config file.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cotmetrics-0.1.0.tar.gz.
File metadata
- Download URL: cotmetrics-0.1.0.tar.gz
- Upload date:
- Size: 128.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04c0965bb69b6d55c420de9ed150a556e91a00c67e59d422dc19e4568aebe98b
|
|
| MD5 |
63e8508fbed9c095dae87862a6302d3d
|
|
| BLAKE2b-256 |
2f7873bc1cbcebb85e7eccedc646919f0d8de327a702411d72e549d37dc473c2
|
Provenance
The following attestation bundles were made for cotmetrics-0.1.0.tar.gz:
Publisher:
release.yml on mspinola/cotmetrics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cotmetrics-0.1.0.tar.gz -
Subject digest:
04c0965bb69b6d55c420de9ed150a556e91a00c67e59d422dc19e4568aebe98b - Sigstore transparency entry: 2227309619
- Sigstore integration time:
-
Permalink:
mspinola/cotmetrics@b59b634062fb4ad6bbcb9f5835f56c9e385a4eb1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mspinola
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b59b634062fb4ad6bbcb9f5835f56c9e385a4eb1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cotmetrics-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cotmetrics-0.1.0-py3-none-any.whl
- Upload date:
- Size: 105.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af307cb0358a355631eb33710a5398d152ffa63542914b7b7619a47ccf52475a
|
|
| MD5 |
b31a7abba9c9d7de56ff8b0feabf2d68
|
|
| BLAKE2b-256 |
0da4a7428e37baf794b82a9b0f7074f5cad7e03580ec2a8b9365545d2b00f529
|
Provenance
The following attestation bundles were made for cotmetrics-0.1.0-py3-none-any.whl:
Publisher:
release.yml on mspinola/cotmetrics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cotmetrics-0.1.0-py3-none-any.whl -
Subject digest:
af307cb0358a355631eb33710a5398d152ffa63542914b7b7619a47ccf52475a - Sigstore transparency entry: 2227309990
- Sigstore integration time:
-
Permalink:
mspinola/cotmetrics@b59b634062fb4ad6bbcb9f5835f56c9e385a4eb1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mspinola
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b59b634062fb4ad6bbcb9f5835f56c9e385a4eb1 -
Trigger Event:
push
-
Statement type: