Discussing the article: "Machine Learning Under Constraint (Part 3): De-Risking Near the Profit Target and the News-Window Rule"

Check out the new article: Machine Learning Under Constraint (Part 3): De-Risking Near the Profit Target and the News-Window Rule.

Position sizing that ignores proximity to a profit target or the timing of high-impact news exposes banked progress to reversal risk and misstates simulated profit near funded-stage news releases. We implement derisking_factor, a piecewise-linear size reduction keyed to phase progress with a floor set by minimum-trading-days status, and news_window_factor, a phase-gated step function applying FundedNext's news reward-share haircut in a configurable window around correlated events. Both return bounded multipliers combined multiplicatively with the sizer's other modifiers.

Part 1 generalized the prop-firm rules a sizer enforces into an explicit PropFirmRuleSet, and gave PropFirmAccountState a current_balance that accumulates correctly across an entire challenge — every trading day's realized P&L and fees, banked forward through every reset_daily() call. Part 2 built the modifier that reads the downside half of that state: WParamCalibrator takes risk_budget_pct, the fraction of the loss budget still remaining, and flattens the sizing sigmoid as it is consumed.

This article completes PropFirmAwareSizer.size()'s modifier chain with two further modifiers. derisking_factor reads phase_progress (how much of the profit target has already been reached) and reduces position size as that target approaches, protecting accumulated progress rather than remaining capital. risk_budget_pct and phase_progress are distinct quantities, though not statistically independent: both are computed from the same balance and P&L path, and they can move together or apart. An account can be flush with loss budget while also close to finishing its challenge. news_window_factor reads neither state. It reads the clock and a calendar of event times, under a rule specific to the funded stage of a challenge rather than the evaluation stage. It is a sizing heuristic layered on that rule, not an implementation of the rule's profit accounting, and the calendar's own accuracy matters more than the function's small size would suggest.


Author: Patrick Murimi Njoroge