Skip to main content

Overview

This page documents 11 operators (role: various).

Quick Reference


ZScore

Z-Score normalization across symbols. Standardizes values by removing the cross-sectional mean and scaling by the cross-sectional standard deviation. Formula: z_i = (x_i - mean(x)) / max(std(x), min_std) Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

MinMaxScale

Min-Max scaling to a specified feature range. Linearly rescales values so the minimum maps to the lower bound and the maximum maps to the upper bound of the target range. When all valid values are identical, returns the midpoint of the range. Formula: scaled_i = (x_i - min(x)) / (max(x) - min(x)) * (range_max - range_min) + range_min Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

Rank

Cross-sectional rank transform to [0, 1]. Assigns each symbol a rank based on its value relative to other symbols, then normalizes ranks to the [0, 1] interval. Uses ordinal ranking via double argsort. Formula: rank_i = argsort(argsort(x))[i] / (N - 1), where N is the number of valid symbols. Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

Percentile

Cross-sectional percentile rank scaled to 0-100. Computes the percentage of valid symbols whose value is less than or equal to each symbol’s value. Produces a score in the range [0, 100]. Formula: percentile_i = (count(x <= x_i) / N) * 100, where N is the number of valid symbols. Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

L1Norm

L1 normalization so absolute values sum to one. Divides each value by the sum of absolute values across all valid symbols, producing weights that satisfy sum(|w_i|) = 1. Optionally clamps negative values to zero before normalizing (long-only mode). Formula: w_i = x_i / sum(|x|) Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

L2Norm

L2 normalization to unit Euclidean norm. Divides each value by the L2 (Euclidean) norm of the valid values, producing a vector with unit length. Formula: w_i = x_i / sqrt(sum(x^2)) Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

Softmax

Softmax normalization with configurable temperature. Applies the softmax function to produce a probability distribution over symbols. A lower temperature sharpens the distribution (more weight on the largest values); a higher temperature flattens it. Uses the numerically stable form with max subtraction. Formula: w_i = exp((x_i - max(x)) / T) / sum(exp((x - max(x)) / T)) Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

Clip

Clip values to a specified lower and upper bound. Constrains each value to lie within [lower, upper]. Values below the lower bound are set to the lower bound; values above the upper bound are set to the upper bound. Either bound may be None to leave that side unconstrained. Formula: result_i = max(lower, min(x_i, upper)) Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

Winsorize

Winsorize outliers by clamping to standard-deviation bounds. Computes the cross-sectional mean and standard deviation, then clips values to [mean - kstd, mean + kstd]. This limits the influence of extreme outliers while preserving the relative ordering of non-outlier values. Formula: result_i = clip(x_i, mean(x) - kstd(x), mean(x) + kstd(x)) Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

Demean

Cross-sectional demeaning by subtracting the mean across symbols. Centers the signal around zero by subtracting the cross-sectional mean of all valid values. This removes the common level so that only relative differences between symbols remain. Formula: result_i = x_i - mean(x) Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

RollingStd

Rolling standard deviation per symbol over a lookback window. Computes the sample standard deviation (ddof=1) of the last window observations for each symbol along the time axis. Requires at least 2 data points in the time dimension. Formula: std_i = sqrt(sum((x_t,i - mean_i)^2) / (T - 1)) for t in [now - window, now] Role: UNKNOWN | Ephemeral: No

Parameters

Usage

Source Code

Full compute() implementation — no hidden logic.
Source: apps/trading/operators/transform/scalers.py

Operator Protocol

How operators implement the compute() interface

StatefulGraph

How operators compose into a DAG