Skip to main content

Shannon Entropy Market Analysis: Measuring Price-Action Diversity

An exploratory study of Shannon entropy, price action diversity, and realized volatility in intraday market data

March 6, 2026 — Phase 2: Revised Methodology

This project explores whether Shannon entropy can describe the diversity of short-term price movements in market data.

Each price change is classified as one of three actions: up (buy), down (sell), or flat (hold). Shannon entropy then measures how evenly those actions are distributed across a rolling window.

The earlier pooled results have been withdrawn. They mixed SPY, QQQ, AAPL, and TSLA quotes in a single file, used a fixed polling rotation, and relied on an undocumented volatility definition. The current work replaces that approach with per symbol data, explicit timestamps, log-return volatility, and statistical controls.

What Entropy Measures

Entropy does not measure trader psychology directly. It measures the distribution of observed price action categories over a window.

  • High entropy means up, down, and flat movements are relatively balanced.
  • Low entropy means the window is dominated by one action type.
  • Zero entropy means every observed action is the same.

For three action categories, the theoretical maximum is:

log₂(3) = 1.585 bits

This maximum occurs only when buy, hold, and sell actions occur with equal frequency.

Entropy is calculated as:

H = -Σ pᵢ log₂(pᵢ)

where pᵢ is the proportion of each action type in the window.

What Volatility Measures

Volatility is calculated as the sample standard deviation of consecutive log returns over non overlapping windows.

This is a conventional realized volatility measure. It is not based on price levels, trading volume, or an undocumented volatility proxy.

Because entropy and volatility are both derived from the same return series, some relationship between them is expected mechanically. A permutation test is used to estimate how much of any observed correlation could arise by chance.

What This Tests

The central question is:

Does Shannon entropy of price-move actions tend to move with realized short-term volatility?

This is an exploratory measurement question, not a claim about market crashes, trader herding, or future price direction.

The framework may reveal an association in a particular sample, but it does not establish causation or predictive power.

Current Status

The previous results are no longer valid and should not be quoted:

  • Live pooled result: r = -0.193
  • Simulation result: r = -0.601

These values came from a legacy pooled multi-symbol dataset and are superseded by the revised methodology.

The revised pipeline uses:

  • Per-symbol CSV files
  • Randomized symbol polling with jitter
  • Local polling time and provider quote timestamps
  • Log-return-based volatility
  • Block-bootstrap confidence intervals
  • Permutation-null bands and p-values
  • Low- and high-volatility regime analysis

Synthetic Validation

The entropy implementation has been validated against known action distributions.

WindowActionsEntropy (bits)Note
1[0, 0, 1, 2, 2, 0, 1]1.5573 hold, 2 buy, 2 sell
2[0, 0, 0, 0, 0, 0, 0]0.000All hold
3[0, 1, 2, 0, 1, 2, 0]1.5573 hold, 2 buy, 2 sell
4[0, 1, 2, 0, 1, 2]1.585Uniform distribution; theoretical maximum

These checks confirm that the implementation handles uniform, non-uniform, and degenerate distributions correctly.

What the Next Run Will Report

For each symbol, the revised analysis will report:

  • Pearson correlation between entropy and realized volatility
  • 95% block-bootstrap confidence interval
  • Permutation-null band and p-value
  • Correlation within low- and high-volatility regimes
  • Entropy and volatility distributions
  • Time-series visualizations

No results will be reported until the revised per symbol pipeline has collected enough clean live data.

Limitations

  • Entropy and volatility are calculated from the same underlying returns, so some correlation is expected by construction.
  • A result from one symbol or one market period cannot establish a general relationship.
  • The framework does not yet demonstrate out-of-sample robustness.
  • It does not yet demonstrate predictive performance, crash detection, or trading value.
  • Live quote feeds can contain stale or irregular updates, which is why timestamps and raw responses are retained.

Next Steps

The next phase is a 1–2 week live collection period during US market hours, covering both normal and higher-volatility conditions.

Future work may include:

  • Testing multiple symbols and longer time horizons
  • Varying entropy and volatility window lengths
  • Comparing entropy with conventional volatility measures
  • Evaluating whether entropy adds information beyond existing features
  • Exploring regime classification only after establishing a reliable baseline

Reflection

The original idea was that behavioral diversity might relate to market stress. That remains an interesting hypothesis, but the evidence needed to support it must come from a cleaner, per-symbol, statistically controlled analysis.

For now, this project is best understood as a measurement framework: it turns price movements into action categories, measures their diversity with Shannon entropy, and tests whether that measure relates to realized volatility.

This is ongoing research. The earlier pooled results have been withdrawn, and the current focus is on rebuilding the analysis with per-symbol data, clearer volatility definitions, and proper statistical controls.