The Derived Time Stop

Exiting a Swing Trade under Drift Uncertainty and a Deadline

Working Paper · Stochastic Optimal Control

11-JUN-2026 · 33 pages · WP-2026-80309110

Download PDF

A swing trade is a hypothesis with a deadline. The trader enters a setup believing it may carry an edge, the price then either drifts the way the setup promised or it does not, and the setup expires at a known date. We model the drift as one of two constants, unknown to the trader, and ask when the position should be closed and what the usual rules of thumb cost against the answer.

The trader’s belief that the edge is real is a filtered diffusion and an explicit function of time and return. Holding on is worth the expected drift under that belief, accumulated until exit, and the problem becomes a finite-horizon optimal stopping problem in the belief alone, with two parameters in information units: the break-even belief $\theta$ and the deadline $S$. Two partial differential equations answer it. A Hamilton–Jacobi–Bellman equation, in the form of a variational inequality solved backward from the deadline, gives the value of holding on, and its free boundary is the exit rule, which says where the trader should get out. A pair of Fokker–Planck equations, one for a real edge and one for no edge, solved forward from entry with that boundary as an absorbing wall, gives the law of the exit time, which says when trades are actually cut. The HJB boundary rises continuously to $\theta$ exactly at the deadline, so patience is largest at entry and vanishes at expiry.

The boundary is universal. In log-odds it is $\operatorname{logit}\theta+g(S-s)$ for a single function $g$ of the time left, the same for every break-even belief, because the value of any exit rule is a combination of two expected holding times that do not depend on $\theta$. The function is tabulated once: $g(u)/\sqrt{u}$ stays between $-0.63$ and $-0.58$ for time left $u$ between $0.01$ and $4$. On the return chart the boundary is a stop line that tightens as the deadline nears whenever the average of the two drifts is non-negative, and can first loosen when it is negative.

The Fokker–Planck densities show that the rule cuts $13.8$ per cent of real edges and $44.7$ per cent of dead trades before the deadline, most of them late, and that a trade cut at time $s$ had a real edge with probability exactly the boundary $b(s)$. A time stop that ignores the price is worth exactly $(p_0-\theta)$ per unit of time held and can never beat holding to the deadline. The trader’s conditional stop, which exits at a fixed day unless the trade has worked, cuts $31.0$ per cent of real edges at half the deadline, gives up between $3.3$ and $20.6$ per cent of the attainable value across the parameters studied, and is worse than simply holding in thirty of the forty-five cases computed. Every number is computed by finite differences for both equations and checked against closed forms, a no-look and a one-look bound, and a million-path simulation.

🔒
Research Files
Password required to access