Skip to content
All library documents

Using Shannon Entropy to Filter Algorithmic Trading

Article MQL5 code base

Summary

The document presents a market randomness measure based on Shannon entropy as a filter for automated strategies. It describes estimating the distribution of log returns over a rolling window, then calculating entropy from the probabilities of discrete return or price velocity states. High entropy is interpreted as weak predictability, while lower entropy is treated as a possible sign of structure that could support trend following or mean reversion.

The proposed use is to compare the indicator with its historical baseline and allow strategies to trade when entropy falls below it. The document offers a conceptual rationale but no backtest, performance figures, or evidence that the threshold identifies profitable periods. Its claims that high entropy means perfect efficiency and low entropy means exploitable inefficiency are stronger than the material establishes; entropy alone does not show that a strategy has an edge after trading costs. The description also omits implementation details such as window length, bin selection, and threshold calibration.

Key ideas

  • Shannon entropy can summarize the distribution of returns across discrete market states.
  • The document interprets high entropy as greater randomness and lower entropy as more structure.
  • It proposes using an entropy decline relative to a historical baseline to gate automated strategies.
  • No empirical results are provided to show that the filter improves trading performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.