Skip to main content
Components are reusable functions that return observable pipelines or runtime behavior blocks. In Quantform, components help you split complex strategies into small, testable pieces that you can compose together.

Why components

  • Keep strategy files focused on orchestration
  • Reuse logic across multiple strategies
  • Isolate adapter-specific details behind clean functions
  • Make testing simpler by validating component outputs in isolation

1) Create a component

A component usually:
  1. Accepts inputs (symbol, timeframe, thresholds)
  2. Calls one or more connectors/adapters
  3. Returns a normalized stream

2) Use a component inside strategy behavior

3) Combine components from multiple venues

This pattern is useful when you want one strategy signal from many data sources.
Then consume watchFundingPremium() in behavior and attach execution logic when premium crosses your threshold.

Component design tips

  • Normalize shapes early ({ timestamp, symbol, venue, value })
  • Keep side effects near strategy behavior (tap, execution calls)
  • Prefer small, composable components over one giant pipeline
  • Use execution mode checks when behavior should differ in replay/paper/live

Next: Strategy lifecycle

Learn where components fit in before, behavior, and after execution stages.