SV · Statistical indicators
Shannon entropy in markets
Also called: market entropy, permutation entropy, information entropy
Shannon entropy measures how uncertain a distribution of outcomes is; applied to returns or price patterns, it gauges how disordered a market is.
Definition
Shannon entropy, from Claude Shannon's 1948 information theory, measures the average uncertainty of a random variable. A distribution concentrated on one outcome has zero entropy; a uniform distribution over many outcomes has the maximum.
In markets it is applied to the distribution of discretized returns, or to the frequency of ordinal patterns in a price series, to describe whether recent behavior looks structured or close to random.
Intuition
When a market trends cleanly, the same few patterns repeat and entropy falls. When it chops randomly, every pattern is about equally likely and entropy approaches its maximum.
Entropy says nothing about direction; it describes how much structure there is. Traders use it as a filter, for example to avoid trend logic when entropy is near its maximum.
How it's calculated
For outcomes with probabilities p1 … pN:
H = − Σi=1..N pi · log pi Hnorm = H / log N
Normalizing by log N puts the value between 0 (fully ordered) and 1 (uniform).
Two common ways to turn prices into outcomes:
- Binned returns: sort returns in a rolling window into N bins and use bin frequencies as pi. Results depend on bin count and edges.
- Permutation entropy (Bandt and Pompe, 2002): for each run of m consecutive prices, record the rank order pattern, one of m! possibilities, and compute the entropy of pattern frequencies, normalized by log m!. It is robust to outliers and needs no binning.
Example: with four equally likely return bins, H = log 4 and normalized entropy is 1. If one bin holds 70% of observations and the others 10% each, H ≈ 0.94 nats against a maximum of about 1.39, a normalized value of about 0.68.
How to read it
Read entropy relative to its own history for the asset and window: a drop from its usual range signals more structured behavior than normal, a rise signals more noise. Because the measure is directionless, combine it with a separate trend or momentum reading.
Short windows give noisy estimates, especially with many bins or large pattern lengths, because many outcomes are observed only a few times.
Common mistakes
- Comparing entropies computed with different bin counts, pattern lengths or windows.
- Using too many bins for the window length, which biases entropy downwards.
- Reading low entropy as a bullish or bearish signal; it only says behavior is more regular.
- Confusing Shannon entropy of one series with transfer entropy, which measures information flow between two series.
In Saqrid
SV's 100 built-in proprietary formulas include entropy tools, alongside Hurst, momentum, expected-move and probability-cone formulas.
Open SV.
