Sample Entropy Measure
Quick Reference
| Property | Value |
|---|---|
| Dimension | quality |
| Category | statistics |
| Version | v1.0 |
| Output Column | sample_entropy |
Sample entropy 鈥?measures time series regularity/pattern repetition over a rolling window
Formula
rolling_std(signal, window)
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
signal | cdm_* | CDM source table |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window | integer | 60000 | Window for entropy estimation |
Output
Column: sample_entropy
Sample entropy of the signal
Market Intuition & Trading Rationale
Sample entropy measures the regularity of a time series 鈥?how much patterns repeat. Unlike Shannon entropy (which measures distribution dispersion), sample entropy measures temporal structure: a signal that alternates predictably (1, -1, 1, -1, ...) has low sample entropy 鈥?the pattern is regular. A signal that jumps randomly has high sample entropy 鈥?no discernible pattern.
In trading, sample entropy distinguishes structured from random signals. A momentum signal during a trending market has low sample entropy 鈥?it consistently points in one direction. During a choppy, range-bound market, the same signal has high sample entropy 鈥?it flips direction unpredictably. Sample entropy thus captures the "cleanliness" of the signal's temporal structure, independent of its magnitude or direction.
Usage Cases
- Trend quality assessment: Low sample_entropy + high SNR = a clean, persistent directional signal. High sample_entropy + high SNR = a strong but erratic signal 鈥?large moves in both directions, hard to trade.
- Market efficiency gauge: Rising sample_entropy across multiple signals suggests the market is becoming less predictable 鈥?alpha is decaying. This is an early warning to reduce position sizes or rotate strategies.
- quality context: Used in
trade_toxicityas a quality complement to VPIN 鈥?sample entropy of VPIN indicates whether toxicity is persistent (structured, low entropy) or sporadic (noisy, high entropy).
YAML Definition
name: sample_entropy_measure
description: Sample entropy 鈥?measures time series regularity/pattern repetition over
a rolling window
category: statistics
dimension: quality
version: v0.9.0 (Beta)
required_inputs:
- signal
output_column: sample_entropy
output_description: Sample entropy of the signal
tags:
- quality
- entropy
- statistics
parameters:
window:
type: integer
description: Window for entropy estimation
required: false
default: 60000
formula: rolling_std(signal, window)