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.0

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.0
File Size Uploaded Provenance Actions
srfm_core-0.1.0.tar.gz 17.2 kB With provenance Details for srfm_core-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 32.6 kB

Release files / srfm_core-0.1.0.tar.gz

Download URL srfm_core-0.1.0.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
564c60ec6b462d5a263bdba858e9ca4929d33784dd40d9dceb49d7afe068864e
BLAKE2b-256 checksum
How to use checksums
db79af3568eb382d273e50d64e28429541dfb9eaa7fc78cc6c5df0e72cc27045
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.0-py3-none-any.whl

Download URL srfm_core-0.1.0-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b701ae38550a7a6bbb47b62e2c74543e044e2367e0dbcca92610702c756a4a7
BLAKE2b-256 checksum
How to use checksums
7317806df9bb668b8d550111c5b19cdc752e72f544e9b6ded4bb6c2b271e59d1
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.0

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.0.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.0 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