We study the static maximization of long-term averaged profit, when optimal preset thresholds are determined to describe a pairs trading strategy in a general one-dimensional ergodic diffusion model of a stochastic spread process. An explicit formula for the expected value of a certain first passage time is given, which is used to derive a simple equation for determining the optimal thresholds. Asymptotic arbitrage in the long run of the threshold strategy is observed.