Discussing the article: "Machine Learning Under Constraint (Part 4): The Stop-Loss Ceiling Meets the Optimal Trading Rule Search"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Machine Learning Under Constraint (Part 4): The Stop-Loss Ceiling Meets the Optimal Trading Rule Search.
Position sizing is only one part of keeping a trading strategy within a prop firm's risk limits. Even when the size of each position is properly constrained, its stop-loss distance can still expose the account to excessive losses, particularly when several positions are open simultaneously. This raises a separate question: given a daily loss limit and a maximum number of concurrent positions, how wide can any individual stop-loss be without allowing a simultaneous worst-case outcome to breach that limit?
The prop_firm_sl_ceiling function, consolidated into afml.prop_firm in Part 1, addresses precisely this question. While Part 3 completed the three modifiers in PropFirmAwareSizer.size() (budget, phase-progress, and news), all of which constrain how large a position can be, this article focuses on how wide its stop-loss is allowed to sit.
That limit becomes particularly important when optimizing trading rules. Part 15 of the companion MetaTrader 5 Machine Learning Blueprint series introduced the AFML Chapter 13 optimal trading rule (OTR) framework, which fits an Ornstein-Uhlenbeck process to a strategy's trades and searches a mesh of profit-taking and stop-loss pairs for the combination that maximizes simulated Sharpe. That article explains the framework in full, so it will not be re-derived here. Instead, we address the question it leaves open: what happens to the optimization when the stop-loss axis of the search mesh is no longer free, but subject to a hard risk ceiling?
Author: Patrick Murimi Njoroge