Skip to content
All library documents

Optimizing Mean-Reversion Exit Levels with Heat Potentials

Article Stratmill research code

Summary

This document explains a method for selecting profit-taking and stop-loss boundaries for a mean-reversion strategy modeled with an Ornstein–Uhlenbeck process. A position is closed when it reaches either boundary or when its maximum holding horizon expires. The method rescales the process to a steady-state form and uses heat potentials to estimate the strategy’s Sharpe ratio as a function of the exit levels.

The numerical procedure builds a grid, solves helper Volterra equations, approximates integrals with the trapezoidal rule, and evaluates the Sharpe ratio. It then searches over profit and loss thresholds to maximize that estimate. The documentation describes an implementation workflow that fits an OU model, optimizes levels, and converts them back to the original scale, alongside a simulated-data example. It gives no empirical trading results or evidence that the optimized thresholds will remain effective out of sample; outcomes depend on the fitted process, chosen horizon, and modeling assumptions.

Key ideas

  • The strategy models mean-reverting price behavior with an Ornstein–Uhlenbeck process.
  • Trades exit at a profit boundary, a stop-loss boundary, or a maximum duration.
  • Heat potentials and numerical integration are used to estimate Sharpe ratios for candidate exit levels.
  • The profit and loss thresholds are selected by maximizing the estimated Sharpe ratio.
  • The method depends on the fitted model and supplies no out-of-sample performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.