Skip to main content

srfm-core

The SRFM bar transforms from srfm-lab, as a small package you can drop into a pandas, vectorbt or freqtrade workflow. NumPy and pandas only.

Function What it gives you per bar
beta(close, cf=0.001) abs(dC) / C_prev / cf. Below 1 is a TIMELIKE (ordered) bar, 1 or more is SPACELIKE.
bh_mass(close, cf, bh_form=1.5, bh_collapse=1.0, timelike_decay=0.95, spacelike_decay=0.7, ctl_min=5) DataFrame bh_mass, bh_active, bh_dir, ctl: a decaying accumulator of ordered momentum and whether a "well" is active.
geodesic(close, atr, window=20) DataFrame geo_dev, geo_slope, causal_frac: rolling log-linear fit and the share of lags with a TIMELIKE interval.
hawking_z(close, period=20) DataFrame hawking_z, hawking_t: Bollinger z and LARSA's z * (z - z_prev) proxy.
add_srfm_columns(df) All of the above added to an OHLCV frame as srfm_* columns (made for freqtrade populate_indicators).
import srfm_core as sc

df = sc.add_srfm_columns(ohlcv)            # srfm_bh_mass, srfm_bh_active, ...
bh = sc.bh_mass(ohlcv["close"], cf=0.002)  # tune cf to your bar size

vectorbt (optional, pip install "srfm-core[vbt]"):

from srfm_core.vbt import BHMass
bh = BHMass.run(close, cf=[0.001, 0.002])  # parameter grids work

Streaming classes (MinkowskiClassifier, BlackHoleDetector, GeodesicAnalyzer, GravitationalLens, HawkingMonitor) keep the update() bar-by-bar API from srfm-lab.

Every LARSA constant is a documented parameter with LARSA's value as the default. The batch functions are checked against golden/golden_vectors.json, generated from srfm-lab's untouched lib/srfm_core.py; the Rust crate srfm-core is checked against the same file.

These are feature transforms, not a strategy. Nothing here claims a trading edge.

Docs: https://github.com/Mattbusel/srfm-core/tree/main/docs. License: MIT.

Metadata

Release files for srfm-core 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for srfm-core 0.1.1
File Size Uploaded Provenance Actions
srfm_core-0.1.1.tar.gz 17.2 kB With provenance Details for srfm_core-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for srfm-core 0.1.1
File Interpreter ABI Platform Actions
srfm_core-0.1.1-py3-none-any.whl Python 3 none any Details for srfm_core-0.1.1-py3-none-any.whl

Total release size: 32.6 kB

Release files / srfm_core-0.1.1.tar.gz

Download URL srfm_core-0.1.1.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b003b2425472af52111f18d52878423fbec6812580503e20cab692032aff6a44
BLAKE2b-256 checksum
How to use checksums
6b5cfeabc59799edb7e219a8030b8581c1de5ef64fcd9975064414692d923274
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / srfm_core-0.1.1-py3-none-any.whl

Download URL srfm_core-0.1.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46f86f31b863ea9d33375e1750e8a144adf2b3adfd47fa2926d52051a41841e8
BLAKE2b-256 checksum
How to use checksums
d095b80ddd3d3bfbbab1d0f27d660caa67bd8c47f7bf850d4f3ce6434a28ae9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for srfm-core 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for srfm_core-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page