Skip to main content

What Is an Operator?

An operator is a stateless function that receives data, computes something, and returns a result. Every computation in ClyptQ — from a simple moving average to an LLM-powered sentiment score — is an operator.
Three rules:
  1. TaggedArray in, TaggedArray out — All inputs are TaggedArrays buffered by RollingBuffers. Output is always a TaggedArray.
  2. Stateless — No mutable state between ticks. The StatefulGraph manages all state.
  3. Declare inputs upfront — Each input is declared via Input(source, timeframe, lookback) at graph registration time.

14 Operator Roles

Every operator declares a role that describes its purpose:

How Operators Compose

Operators connect into a DAG (Directed Acyclic Graph) inside a StatefulGraph. Each operator’s output becomes another operator’s input:
The graph automatically determines execution order via topological sort — every operator’s inputs are ready before it runs.

Creating Custom Operators

Inherit from BaseOperator, set a role, implement compute():
Any Python library works inside compute() — NumPy, PyTorch, XGBoost, scikit-learn, HuggingFace, scipy.

Ephemeral Operators

Operators that call external APIs (LLM, web search) are marked ephemeral = True. They:
  • Cannot reproduce outputs for the same historical input
  • Skip backtest validation
  • Only run in paper/live mode
See Semantic Operators for details.

Next Steps

Operator Protocol

Detailed protocol: roles, self-referencing, ML/DL integration, ComputeContext

Browse Operators

Complete catalog across 14 roles