Discussion of article "Measuring Indicator Information"

 

New article Measuring Indicator Information has been published:

Machine learning has become a popular method for strategy development. Whilst there has been more emphasis on maximizing profitability and prediction accuracy , the importance of processing the data used to build predictive models has not received a lot of attention. In this article we consider using the concept of entropy to evaluate the appropriateness of indicators to be used in predictive model building as documented in the book Testing and Tuning Market Trading Systems by Timothy Masters.

As an example we examine some statistical properties of two indicators analyzed above.

William's Percent Range

The distribution of Williams's percent range reveals how almost all the values are spread across the entire range, apart from being multi modal the distribution is fairly uniform. Such a distribution is ideal and is reflected in the entropy value.

Market Facilitation Index
This is in contrast to the Market Facilitation Index distribution which has a  long tail. Such an indicator would be problematic for most learning algorithms and requires transformation of the values. Transforming the values should lead to an improvement in indicator's relative entropy.

Author: Francis Dube

 
MetaQuotes:

An article Measuring the informativeness of an indicator has been published:

Author: Francis Dube

So why so many letters? So has the author identified any worthwhile indicator? I mean, has he found something for dough? The point is simple - is there a tool for money with a high probability of profit? Or is it all the same, like roulette, either it will or it won't.
Millions of users, millions of strategists, years and years of trading, and the market has not yet collapsed from the new Klondiker. As they did not bring worthy options, so they do not bring, like themselves-self pick. Did the author dig up the grail or is it an academic science and the author does not vouch for the depo growth? Heh
 
The article is super! This kind of genre is exactly what is missing on MQl5. Thanks
 

Thank you for raising this topic.

Please comment on the somewhat contradictory information, quoting two parts of the article:

"

To apply the entropy equation to continuous variables, we must discretise the indicator values. This is done by dividing the range of values into intervals of equal size, and then counting the number of values falling within each interval. Using this method, the original set enumerating the maximum range of all indicator values is replaced by subsets, each representing selected intervals.

...

Intervals - the number of intervals to be sampled. The author of TTMTS specifies 20 intervals for a sample size of several thousand, with 2 being a hard minimum value. I have added my own approach to a suitable value by implementing the ability to vary the number of intervals relative to the sample size, specifically 51 for every 1000 samples. This option is available if the user enters any value less than 2. So by setting Interval to any number less than 2 the number of intervals used will vary depending on the number of bars being analysed.

"

Question, is this about the same thing? If yes, why is the number of separators of the indicator value range dependent on the number of bars? What is the logic here? So far, I can assume that it is useful only for indicators that have any accumulative component.

If not, what is the number of range dividers equal to?


The article lacks a table that would clearly show the benefit of transforming indicator values.

 
MetaQuotes:

New article Measuring Indicator Information has been published:

Author: Francis Dube

Hello Francis

Can you please elaborate how to test a Custom Indicator for EntrophyAnalysis.

I am trying to use as below:

input ENUM_TIMEFRAMES Timeframe=PERIOD_H1;

input ENUM_INDICATOR  IndicatorType=IND_CUSTOM;

input string   CustomIndicatorName="Indicators\\NKGold\\Regression\\iNonLinRegress.ex5";

input bool     UseDefaults=true;

input string   IndicatorParameterTypes="int,CENUM_APPLIED_PRICE";

input string   IndicatorParameterValues="34,priceHA_WEIGHTED";

and get error as below

2025.03.26 19:53:11.282 EntropyIndicatorAnalysis (XAUUSD,H1) custom indicator 'Indicators\NKGold\Regression\iNonLinRegress.ex5' cannot load [4802]

2025.03.26 19:53:11.282 EntropyIndicatorAnalysis (XAUUSD,H1) Invalid indicator handle, error code: 4802


 
Ivbmw #:
Why so many letters? Has the author identified a valid indicator? In other words, has he found something for the money? The question is simple: is there a tool for making money with a high probability of profit? Or is it all the same, like roulette: either it works or it doesn't.
Millions of users, millions of strategists, years and years of trading, and the market still hasn't collapsed because of the new Klondiker. Since they haven't brought any valid options, they also, like themselves, don't bring any self picks. Has the author unearthed the Holy Grail or is this academic science and the author does not vouch for depo growth? Heh

The article doesn't claim to have discovered a Holy Grail that will print banknotes for sure. Its aim is more modest: to show how to measure the wealth of information that an indicator brings to a learning model.

  • A high entropy score only means that the variable is non-trivial (it varies sufficiently for the algorithm to learn). It does not guarantee direction, timing or winning money-management.

  • Even a highly informative indicator may prove to be non-predictive if the market is already efficient over the chosen horizon, if transaction costs absorb the signal or if the model is poorly designed.

  • In practice, a number of building blocks are stacked up: selection of indicators with good entropy, strict out-of-sample tests, risk management, robust execution and real-time monitoring. It is only by combining all these steps that we hope to achieve a small edge, and this must be constantly re-checked as the market adapts.

  • The author provides an academic diagnostic tool. It does not guarantee success. Everyone is free to use it to refine their features or, on the contrary, to realise that a favourite indicator adds nothing new.

In short, entropy is a thermometer, not an elixir. It helps you to spot dead or under-exploited variables quickly. It is not a substitute for strategy or risk control.

 
Aleksey Vyazmikin range of values into intervals of equal size and then count the number of values in each interval. Using this method, the initial set listing the maximum range of all indicator values is replaced by subsets representing each of the selected intervals.

...

Intervals - the number of intervals to be sampled. The author of TTMTS specifies 20 intervals for a sample of several thousand people, 2 being an absolute minimum. I have added my own approach to an appropriate value by implementing the ability to vary the number of intervals in relation to the sample size, specifically 51 for 1000 samples. This option is available if the user enters a value less than 2. Thus, by setting Interval to a number less than 2, the number of intervals used will vary according to the number of bars analysed.

"

Question: is this the same thing? If so, why does the number of separators in the range of indicator values depend on the number of bars? What is the logic behind this? So far, I can only assume that this is useful for indicators that have an accumulative component.

If this is not the case, what does the number of divisors in the range correspond to?


The article lacks a table that would clearly show the benefit of transforming indicator values.

To estimate the entropy of a continuous variable, we divide its range of values into equal intervals and count the observations in each interval. The script lets you choose the number ofintervals. If you enter < 2 (or leave the default value), the script triggers its own heuristic: 51 intervals per 1,000 observations, i.e. a number proportional to the sample size. If you enter a value > 2, it uses it as is, so these are not two competing methods. One describes the concept, the other explains how the code chooses the parameter when you don't set it yourself.


When you have too few intervals, you artificially glue the values together. Entropy is underestimated (bias). When you have too many intervals for a small sample, there are a lot of empty bins or bins with 1 observation. The entropy is very noisy (variance). Several automatic rules exist for histograms: Sturges, square root, Freedman-Diaconis, Scott, etc). They all have the same idea: increase resolution when you have more data, because you can then estimate finer probabilities without blowing up the variance.


For 1,000 bars, 51 intervals => 20 points per bin if the distribution were uniform. This ratio (between 15 and 30 obs / class) is a classic compromise that the author has taken from the literature. This has nothing to do with whether or not an indicator is accumulative. The logic is purely statistical. The finesse of the grid is adapted to the amount of information available.


The higher the number of vertical bars in the histogram :
  • the more visible the fine distribution of the indicator,

  • the more detail (peaks and troughs) the entropy calculation can capture,

  • but the more data is needed for these frequencies to be stable.


It's true that the article would have benefited from showing, for example, the entropy of the same indicator before and after the transformations. But the demonstration is easy to do yourself. Just tick ApplyTransform=true in the script and read the double output: before / after. The code has deliberately left this part interactive so that everyone can test their own assets and horizons.

 
niouininon #:
The more vertical bars in the histogram:
  • the more noticeable is the subtlety of the distribution of the index,

  • the more detail (peaks and troughs) the entropy calculation can capture,

  • but the more data are needed to make these frequencies stable.

As I understand it, visualisation of indicator scores in a sample through a histogram has nothing to do with the author's data transformation methods. Am I correct?

I am more interested in the question of the training effect of these transformations. I can assume it for neural networks, but not for tree methods.

 
Aleksey Vyazmikin #:

If I understand correctly, the visualisation of indicator scores in a sample using a histogram has nothing to do with the author's data transformation methods. Am I right?

I'm more interested in the question of the knock-on effect of these transformations. I can assume this for neural networks, but not for tree methods.

The histogram drawn by the script is simply a visual diagnostic tool. It shows how the values of an indicator are distributed in the sample, before or after transformation. The functions sqrt, log, tanh, etc. act on the data. The histogram simply displays the result. The two stages are therefore independent. First, the series is transformed (or not), then its histogram is drawn to see if the entropy has changed.

Transforming an indicator that has become rather monotonous (log, sqrt) often does not change the score. On the other hand, non-monotonic transformations (tanh which saturates) change the order of certain points. This means that certain transformations better prepare the ground for creating non-linear interactions.

 
niouininon #:

The histogram built by the script is simply a visual diagnostic tool. It shows how the indicator values are distributed in the sample before or after transformation. The functions sqrt, log, tanh, etc. affect the data. The histogram simply displays the result. Thus, the two steps are independent. First, the series is transformed (or not), then its histogram is plotted to see if the entropy has changed.

Ok, so I've got the point right now. I was originally thinking of something else.

niouininon #:

Transforming an exponent that has become fairly monotonic (log, sqrt) often doesn't change the result. On the other hand, non-monotonic transformations (tanh, saturates) change the order of certain points. This means that certain transformations better prepare the ground for creating nonlinear interactions.

How does this change the order of points? Can you give an example of such a transformation. So far I understood the saying to mean that there were ABC points with eigenvalues in ascending order, and after the transformation the order in ascending order became, alternatively, BAC.

 
Aleksey Vyazmikin #:

Okay, I get the idea now. I was originally thinking of something else.

How does it change the order of the points? Can you give an example of such a transformation? So far I've understood that there are points ABC with eigenvalues in ascending order, and that after the transformation the ascending order has become, alternately, BAC.

The functions in the script (root, log, tanh, etc.) are all monotonically increasing. They all retain the order of the points. My previous sentence was ambiguous. The order only changes from ABC to BAC if a non-monotonic transformation is used. For example, unless I'm mistaken, the function f(x)=∣x-50∣ is not monotonic because it folds the axis around x= 50. Therefore, the order becomes BAC. In his introduction the author of the article points us to the book"Testing and Tuning Market Trading Systems (TTMTS) by Timothy Masters". As far as I'm concerned, I plan to get my hands on it because, like you, I still have a few questions. What's more, I'm not very familiar with learning models or neural networks. Apparently, it's fairly easy to find on online sales sites. Its content should be of great help to us because the article, however interesting it may be, is undoubtedly incomplete and/or in any case rather synthetic.