Discussing the article: "Creating a Probabilistic Market-Neutral Trading Robot Based on a Return Distribution"

 

Check out the new article: Creating a Probabilistic Market-Neutral Trading Robot Based on a Return Distribution.

A market-neutral trading strategy based on the empirical return distribution offers an alternative to traditional technical analysis methods, replacing price direction forecasting with the statistical placement of orders at levels the price is likely to reach. This article provides a detailed analysis of the mathematical framework for calculating percentiles, algorithms for weighting position sizes based on the probability of an order being triggered, and mechanisms for adapting to changing market conditions through grid expiration. A complete implementation in MQL5 is provided.

Return is the percentage change in price over a fixed period. If the price was 1.0850 and rose to 1.0900, the return is equal to (1.0900 - 1.0850) / 1.0850 = 0.0046, or 0.46%. If you take all the historical returns from past periods and build a histogram, you get a return distribution. For currency pairs, this distribution is typically close to a normal distribution, with the center of the distribution around zero and heavy tails.

For example, here is a histogram of the return distribution for EURUSD on the hourly timeframe over 11 years, starting in January 2014:

And here is the cumulative distribution, where we can already see the notorious “fat tails” of the distribution—as one of the reasons for the asymmetry of profit and risk, as well as one of the reasons why forecasting the market as a whole is difficult: extreme movements occur much more frequently than a normal distribution predicts. If returns followed a classic bell-shaped Gaussian curve, the probability of a move of more than 1% in 10 hours would be negligible, but actual data show that such events occur regularly.


Author: Yevgeniy Koshtenko