Skip to main content

Signal To Noise Ratio

Quick Reference

PropertyValue
Dimensionquality
Categorystatistics
Versionv1.0
Output Columnsnr

Signal-to-noise ratio: rolling_mean(signal) / rolling_std(signal) 鈥?measures signal quality

Formula

rolling_mean(signal, window) / rolling_std(signal, window)

CDM Inputs

ColumnCDM TableDescription
signalcdm_*CDM source table

Parameters

ParameterTypeDefaultDescription
windowinteger60000Rolling window for mean and std estimation

Output

Column: snr

Ratio of signal mean to signal standard deviation

Market Intuition & Trading Rationale

SNR (Signal-to-Noise Ratio) measures signal quality as rolling_mean(signal) / rolling_std(signal) 鈥?the ratio of average signal level to signal variability. A high SNR means the signal is stable relative to its magnitude (reliable). A low SNR means the signal is dominated by noise (unreliable). SNR approaching zero means the signal mean is near zero relative to its fluctuation 鈥?the signal has no predictive content.

This is the single most important quality metric in the framework. A signal with SNR > 2 is considered "clean" 鈥?its mean is twice its standard deviation, indicating consistent directional bias. SNR between 0.5鈥? indicates a noisy but potentially useful signal. SNR < 0.5 suggests the signal is mostly noise and should be downweighted or excluded. The window parameter controls the estimation horizon 鈥?longer windows produce more stable SNR estimates but adapt more slowly to regime changes.

Usage Cases

  • Signal quality ranking: Rank features within a feature set by SNR. Prioritize high-SNR signals for position sizing; downweight or disable low-SNR signals. This is the primary use in order_flow_imbalance and intraday_momentum packs.
  • Regime-conditional quality: Compute SNR separately for different market regimes (high vol vs low vol, trending vs ranging). A signal may have excellent SNR in trending markets but near-zero SNR in ranging markets 鈥?use regime-conditional SNR to dynamically enable/disable features.
  • Feature selection: SNR is a simple, interpretable filter for ML feature selection. Drop features with SNR below a threshold before training 鈥?they add noise without signal.

YAML Definition

name: signal_to_noise_ratio
description: 'Signal-to-noise ratio: rolling_mean(signal) / rolling_std(signal) 鈥? measures signal quality'
category: statistics
dimension: quality
version: v0.9.0 (Beta)
required_inputs:
- signal
output_column: snr
output_description: Ratio of signal mean to signal standard deviation
tags:
- quality
- snr
- statistics
parameters:
window:
type: integer
description: Rolling window for mean and std estimation
required: false
default: 60000
formula: rolling_mean(signal, window) / rolling_std(signal, window)