API Reference¶
Reference documentation for the public SignalFlow API. Every symbol below is
re-exported from the top-level signalflow package, so it can be imported
directly:
Modules¶
- Data -
Dataset, thedataloader, and market data sources - Transform & Features - feature transforms, pipelines, and selection
- Target - labeling specs and sample selection
- Models - forecast models and validator combinators
- Detector - signal detectors
- Engine - execution engine, brokers, orders, and fills
- Strategy - rules-based strategies and decision rules
- Flow & Live - the
Flowobject, runs, and live feeds - Experiment - experiments, scorecards, and statistics
- CLI - command-line interface
- Technical Analysis (ta) - indicators from signalflow-ta
Enums and registry¶
The package also exposes shared enums and the component registry:
signalflow.registry ¶
Central component registry - the backbone of serialization.
Every core class registers under a name; that name is what flow.yaml
serializes, sf list enumerates, and plugin packages inject into. Construction
from config is registry.create(ComponentType.TRANSFORM, "revert_confluence",
**params)-shaped. Seven types instead of the old 21.
The design (lazy autodiscovery, dataclass-field schema introspection) is the proven one from the previous framework, trimmed to the current type set.
ComponentInfo
dataclass
¶
ComponentInfo(cls: type[Any], role: str = '', docstring: str = '', summary: str = '', module: str = '')
Metadata about a registered component (class + extracted docs + role).
Registry
dataclass
¶
Maps ComponentType -> name -> ComponentInfo with lazy autodiscovery.
create ¶
Instantiate the registered class for name with kwargs.
get ¶
Return the registered class for name; raise UnknownComponentError if absent.
Source code in src/signalflow/registry.py
get_info ¶
Return the ComponentInfo (class, role, docs) for name.
Source code in src/signalflow/registry.py
get_schema ¶
Introspected config schema for name: class, role, and dataclass parameters.
Source code in src/signalflow/registry.py
list ¶
register ¶
register(component_type: ComponentType, name: str, cls: type[Any], *, role: str = '', override: bool = False) -> None
Register cls under name for component_type; raise unless override
when the name is taken.
Source code in src/signalflow/registry.py
snapshot ¶
Every registered name grouped by component type: {type: [names]}.
signalflow.ComponentType ¶
Bases: StrEnum
The registry component types.
signalflow.Signal ¶
Bases: StrEnum
Discrete detector output.
signalflow.RunMode ¶
Bases: StrEnum
Execution mode of a Run (backtest, paper, live, or quicktest triage).
signalflow.Provenance ¶
Bases: StrEnum
How forecast columns in a frame were produced (full vs out-of-fold).
signalflow.Side ¶
Bases: StrEnum
Order side.
signalflow.IntentKind ¶
Bases: StrEnum
What a strategy proposes for a pair (a proposal, not an order).