Discussing the article: "Entropy Pooling and Scenario Budgets for Expected-Shortfall Sizing"

Check out the new article: Entropy Pooling and Scenario Budgets for Expected-Shortfall Sizing.

Rolling lookback windows implicitly fix a probability vector over past bars. We implement entropy pooling in MQL5 to keep all historical scenarios, reweight them by conditioning on today's volatility under an effective‑scenarios budget, and add views on volatility, tails and correlation. A walk‑forward test, a chart indicator and an ES‑based sizing EA demonstrate how to calibrate risk forecasts and position size to the current regime.

Every risk number an Expert Advisor computes from history rests on an unstated choice: which past bars count, and by how much. A 250-bar volatility or historical VaR gives the last 250 bars equal weight and everything older exactly zero. That is a probability vector over the history, chosen by the length of an array rather than by anyone deciding it.

The choice has measurable costs. Later in this article an Expert Advisor holds a five-pair currency basket at a daily expected-shortfall budget of 1% of equity. Sized by a 250-bar window, it entered March 2020 at 1.70 times equity in gross notional, because the window still described the calm of 2019, and on 10 March the book lost 2.85% in a day. The window also cannot take in information the history lacks, such as an expected rise in USDJPY volatility before a central bank meeting.

Entropy pooling, introduced by Attilio Meucci in Fully Flexible Views: Theory and Practice, addresses both problems. Keep every historical scenario as it happened and change only the probability attached to each, choosing the new probabilities as close as possible to a prior, in relative entropy, subject to whatever you want to be true: that today's volatility regime applies, that USDJPY volatility is 50% higher, that a Swiss franc shock has at least a 1% chance. The entropy here is the relative entropy between two probability vectors over the same scenarios, used as a distance, not the randomness of a price series.

We build the method in pure MQL5: a five-file library, a demonstration script, a set of checks against closed-form results, a walk-forward test of the forecasts, an indicator that draws the conditioned risk on a chart, and the sizing Expert Advisor.

Author: Muhammad Minhas Qamar