Entropy Features for Tick-Level Market Regime Analysis
Summary
The article explains how four entropy measures—Shannon, Plug-In, Lempel-Ziv, and Kontoyiannis—can describe the distribution and ordering of price-direction changes within a bar. It turns bid movements into a three-symbol sequence, then computes each measure to capture different aspects of uncertainty and sequence complexity. Shannon entropy reflects symbol frequencies, while the other estimators incorporate patterns across multiple observations or repeated subsequences.
The implementation addresses practical constraints in a trading platform: tick history may be limited to a broker-maintained cache, overlapping word counts use a compact base-3 hash, and a configurable look-back bounds the most expensive estimator. Bars with too few available observations receive a missing-value sentinel. The article reports exact agreement with a Python reference on synthetic tests, including corrections to the estimators. It gives no live trading or profitability evidence, and limited historical tick availability restricts use to cached periods and recent data. The measures are presented as features for analysis, not standalone trading signals.
Key ideas
- Shannon entropy measures the frequency balance of upward, unchanged, and downward price moves, but does not capture their order.
- Plug-In, Lempel-Ziv, and Kontoyiannis estimators add information about repeated patterns and sequential structure.
- Bid changes are encoded as a three-symbol sequence before calculating the entropy measures.
- A broker's limited tick-history cache can leave older bars without enough observations for estimates.
- Hash-based word counting and a bounded look-back make the calculations more practical within the platform.
- Synthetic comparisons show agreement with a Python reference, but do not establish live trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.