ON OPTIMAL THRESHOLDS FOR PAIRS TRADING IN A ONE-DIMENSIONAL DIFFUSION MODEL

Abstract 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.


Introduction
In pairs trading, we focus on two securities whose spread of (log) prices is modelled as a mean-reverting stochastic process. When the spread widens, we make the higher security short and the cheaper one long. When the spread reverts to its mean, we clear the positions and make a profit. For a comprehensive review of studies on pairs trading, we can refer to Krauss [11] and the references therein, where various schemes of pairs trading are well categorized and explained. As for the formation period, that is, the period to find and identify the comovements of a pair of security price processes, the distance approach and the cointegration approach are introduced as two major ones. As for the trading period after a suitable pair of securities is selected in the formation period, several trading rules have been studied in the pairs trading literature. Among these, the so-called threshold rules are widely employed to trigger trading signals in constructing pairs trading strategies, and a one-dimensional Ornstein-Uhlenbeck (OU) process is popularly used as a simple tractable model for the mean-reverting stochastic spread process. Zeng and Lee [14] studied a static optimization problem for determining "optimal" preset thresholds, where a series expansion formula for the expected value of a certain first passage time of an OU process is utilized (see Remark 2.7 in Section 2). A related study of the OU process model by Bertram [1] influenced Zeng and Lee's work. In the present paper, we present a unified approach to Zeng and Lee's problem for determining optimal thresholds for pairs trading with a general ergodic one-dimensional diffusion model for the stochastic spread process. Our resultsare summarized as follows.
(a) We present a general class of one-dimensional diffusion models (see Assumptions 2.1-4.2) which have symmetric stationary distributions. The class contains various tractable models: not only the OU process having a Gaussian stationary distribution, but also the Pearson diffusion process having a t-stationary distribution [7,13], and the Jacobi diffusion process having a β-stationary distribution [7,10]. (b) For the class of one-dimensional diffusion models stated in (a) above, -an explicit, analytic formula for the expected value of a certain first passage time is derived (see Theorem 3.1 for details), and -the static optimization problem for selecting the thresholds of pairs trading is solved, where the long-time averaged profit is used as the criterion function; a simple equation for the optimal thresholds, which involves a one-dimensional integral, is explicitly described (see Theorem 4.5 for details).
These analytically tractable results for general non-Gaussian models seem to be important, as the drawbacks of applying a Gaussian OU process model to non-Gaussian financial data have been pointed out by Bertram [1] and Krauss [11].
As evidence of the non-Gaussian nature of real financial time series data, we observe daily Nikkei 225 (Nikkei stock average) and TOPIX (Tokyo stock price index) data from the Japanese stock market from 1 June 2011 to 30 December 2020. Figure 1 shows price movements, Figure 2 shows log-price movements, Figure 3 shows the regression residual, log(Nikkei 225) − 1.144 × log(TOPIX) − 1.502 (the spread of log-prices), and Figure 4 shows the quantile-quantile plot (see Chambers et al. [3]) of the residual data, which seem to be non-Gaussian (with sample kurtosis 3.412061).

Model set-up
Consider two security price processes (P t ) t≥0 and (Q t ) t≥0 in a continuous-time economy. We may regard P and Q as discounted price processes for simplicity. Suppose that fir some constants β, λ ∈ R, follows a one-dimensional diffusion process. Concretely, X = (X t ) t≥0 satisfies the stochastic differential equation (SDE) on a filtered probability space (Ω, F , P, (F t ) t≥0 ) endowed with the F t -Brownian motion is the state space. Here, µ, σ : E → R are continuous functions and σ(x) 2 > 0 for all x ∈ E. Associated with X, we define the scale function and the speed measure on E by For the basic roles of the scale function and the speed measure in one-dimensional diffusion theory, we can refer to the works of Durret [4,Chapter 6] and Karatzas and Shreve [9, Section 5.5], for example. We make the following assumptions.  ASSUMPTION 2.2. The boundaries of the state space are −l = r > 0. In the SDE (2.2), µ is an odd function and σ 2 is an even function, so, µ(x) = −µ(−x) and σ(x) 2 = σ(−x) 2 for all x ∈ E. REMARK 2.3. Assumption 2.1 implies that X is recurrent and has the invariant probability measure, given bym Hence, X is ergodic, and its stationary distribution is given by (2.3). Moreover, we see that lim t→∞ P x (X t < y) =m((l, y)) for all x, y ∈ E, (2.4)  where P x (·) = P(· | X 0 = x). This relation is seen in Karatzas and Shreve [9], which is an extension of a result obtained by Pollack and Siegmund [12]. On the other hand, Assumption 2.2 implies the symmetry of the stationary distributionm on E. Further, it implies that s and s ′′ are odd functions and s ′ is an even function.
Here are some examples which satisfy Assumptions 2.1 and 2.2. EXAMPLE 2.4 (Ornstein-Uhlenbeck process). Let σ ∈ R ++ be constant, let µ(x) = −κσ 2 x with κ ∈ R ++ := (0, ∞), and let E = R. The associated process is written as In this case, we see that and the stationary distribution is a centred Gaussian distribution.   δ + x 2 with κ, γ, δ ∈ R ++ , and let E = R. The associated process is written as In this case, we see that and the stationary distribution is a scaled t-distribution.
The associated process is written as In this case, we see that and the stationary distribution is a centred and scaled beta distribution. REMARK 2.7. Forman and Sørensen [7] studied the parametrized one-dimensional diffusion process with θ > 0, µ, a, b, c ∈ R, which contains the above three examples, and shows the feasibility of explicit statistical inference of parameters.

Expected value formula for first passage time
For y ∈ E, denote the first hitting time by where we make the interpretation inf ∅ = +∞, with ∅ being the empty set. Using the , we obtain the following theorem.
For the OU process given in Example 2.4, Zeng and Lee [14] derived the series expansion formula where we use the notation for the gamma function. Using Theorem 3.1 for Example 2.4, we have the following different analytic representation: where we define the Green function by Letting b ↑ r and using Assumption 2.1 yields where we use the property that s is an odd function, that is, This assertion follows by combining equation (3.2) with x = α, a = β, and , by letting a ↓ l and using Assumption 2.1. Note that formula (3.4) appeared in Karatzas and Shreve [9]. Also, Bertram [1] has derived this formula for the OU process given in Example 2.4.

Optimal thresholds for pairs trading
In this section, we apply Theorem 3.1 to compute optimal thresholds for pairs trading. Consider the situation where the stochastic spread process X = (X t ) t≥0 (2.1) is governed by the one-dimensional SDE (2.2), and that Assumptions 2.1 and 2.2 are satisfied. First, we note that the SDE (2.2) has a weak solution, which is unique in the sense of probability law (for the definition of the uniqueness of the solution of SDE in the sense of probability law, see [9,Chapter 5]). For the proof, we refer to Karatzas and Shreve [9], where the case E = R was treated, which can be straightforwardly modified to apply to our situation with E ⊂ R. Next, we note that where the superscript (x) denotes the starting position of the process X, that is, 0 ∈ E, which follows from the uniqueness of the solution of SDE (2.2) and Assumption 2.2. Now, inspired by Zeng and Lee [14], we consider the following trading strategy. Let a > 0 and b ∈ [−a, a] be two preset thresholds, which determine the trading signals. We set T 0 = 0, and, for n ∈ N, determine the starting time S n and the completion time T n of the nth trading cycle by S n = inf{t > T n−1 ||X t | = a}, T n = inf{t > S n |X t = sgn(X S n )b}, respectively. The nth trading cycle consists of the following two steps. The profit of the nth trading cycle is (approximately) given by where sgn(x) denotes the sign of x ∈ R, and c > 0 is the total transaction cost in the trading cycle. Here, recall that are independent, identically distributed random variables, which are deduced from the time-homogeneity of X and the strong Markov property (the strong Markov property of the solution of the Markovian SDE can be found in Karatzas and Shreve [9, Chapter 5]). We then define which is a renewal process. The cumulative profit obtained from the completed trading until time t is and the long-time averaged profit is where we use the strong law of large numbers result in renewal theory [2,Chapter 10]. To determine the optimal threshold levels, we are interested in the maximization problem where and the objective function can be expressed as by Theorem 3.1. To solve the problem expressed by (4.2)-(4.4), we impose the following conditions.   We obtain the following theorem concerning the solution of the maximization problem (4.2). .
PROOF. Let We see that Then we check the following.  (a, b) = f (a, a − c) = 0 on {(a, b) Hence, we deduce that the maximum of f (a, b) on A − exists, and that the maximizer(s) Here, we see that where the latter follows from g(a) ≤f (a) → 0 as a ↑ r as we have seen. We next compute the derivative as Here, note that g ′ (c/2) = 1/s(c/2) > 0 for c > 0 and that h ′ (a) = −(a − c/2)s ′′ (a) < 0 for a > c/2. So, combining these observations with (4.6), we deduce that there exists a unique a * ∈ (c/2, r) such that h(a * ) = 0 = g ′ (a * ), and we have that g ′ (a) > 0 for a ∈ (c/2, a * ) and g ′ (a) < 0 for a ∈ (a * , r). Therefore, recalling (4.5), we conclude that REMARK 4.6. The resulting trading strategy with the optimal thresholds (a * , −a * ) is called the new optimal rule (NOR) by Zeng and Lee [14].
Step (B) of this strategy has no waiting time, which is different from that of the conventional trading rule with thresholds 0 = b < a. Thus, one trading cycle of the NOR is described as follows.
(A) When X t 1 = a * (respectively, X t 1 = −a * ), set a one dollar short (respectively, long) position of security P and a β dollar long (respectively, short) position of security Q. Keep these positions as long as X t > −a * (respectively, X t < a * ). (B) When X t 2 = −a * (respectively, X t 2 = a * ) ( t 2 > t 1 ), clear the positions and make a profit. Restart immediately with step (A).

Asymptotic arbitrage
Pairs trading is sometimes explored in the context of so-called "statistical arbitrage", as it is sometimes executed algorithmically at high frequency. In this section, we consider the asymptotic arbitrage property of the threshold strategy, which is a weak form of arbitrage in the long run. Let us consider the threshold strategy described in Section 4. The cumulative gain of the (self-financing) threshold strategy until time t is given by where we regard P and Q as discounted price processes to cancel the interest rate effect. Here, we make the interpretation that for example. As we have seen in Section 4, we can approximate the cumulative gain which implies that the cumulative gain is always nonnegative and constant, until the new (N t + 1)th trading cycle starts at time S N t +1 after the previous N t th trading cycle completes. On the other hand, note that, on {S N t +1 ≤ t < T N t +1 }, which implies the cumulative gain can be negative, and hence the threshold strategy becomes risky until the new (N t + 1)th trading cycle completes after starting at time S N t +1 .
We recall the notion of asymptotic arbitrage in the long run, which was introduced by Föllmer and Schachermayer [6]. DEFINITION 5.2 (Asymptotic arbitrage). The cumulative gain process (G t ) t≥0 realizes a strong asymptotic arbitrage (SAA) in the long run if it satisfies the following conditions: (AA1) G 0 = 0; (AA2) for any ǫ > 0 sufficiently small, there exists T > 0 such that Let us impose the following condition.
We then obtain the following result. PROOF. First, recall the relation Further, we see that for any x ∈ E, where we use Assumption 5.3 and relation (2.4). Combining (5.2), (5.3) and the law of large numbers for the renewal process (N t ) t≥0 , we deduce that So, for any δ > 0, follows from Markov's inequality. Further, for any δ, ǫ > 0 sufficiently small, there exists T * > 0 such that Hence, for T ≥ max(T * , ({L(a, b) − δ}ǫ) −1 ), and an SAA is realized.
REMARK 5.5 (Statistical arbitrage). Hogan et al. [8] used the following definition. If the cumulative gain process (G t ) t≥0 satisfies the following four conditions, then we say that a statistical arbitrage (SA) opportunity exists: We conjecture that an SA does not exist in the cumulative gain process (5.1) of the threshold strategy. Indeed, (SA4) seems to be violated, if we recall the central limit theorem for the renewal process (N t ) t≥0 discussed in Section 7.

Numerical experiment
In this section, using two examples of the stochastic spread processes, that is, Examples 2.4 and 2.5, we show some numerical experiments. Recall that the OU process (2.5) has the stationary distribution the centered normal distribution with variance 1/2κ, and that Pearson diffusion process (2.6) has the stationary distribution, which is a scaled t-distribution; concretely, we have Hence, the limiting variance and kurtosis are given by respectively, where V[(·)] denotes the variance and K[(·)] denotes the kurtosis.
For the optimization problem studied in Section 4, we consider the following numerical experiment for Pearson diffusion model (2.6).
(i) Set δ = (0.2) 2 , γ = 1, and choose several values of κ, which control the limiting variance and kurtosis (6.1) of the t-stationary distribution. (ii) For each parameter set, numerically compute the optimal threshold value a * P and the optimal long-time averaged profit L * P = L P (a * P , −a * P ), given in Theorem 4.5, where L P (a, b) is given by (4.4) for the Pearson diffusion model with c = 0.01.
Further, as a comparison, we consider the following numerical experiment for the OU process model (2.5).
(iii)Set the limiting variance 1/2κ OU of the OU process equal to the limiting variance V ∞ = δ/(2κ − 1) of the Pearson diffusion process, to solve for the parameter value κ OU : Set σ = 0.2. (iv) For each corresponding parameter set, numerically compute the optimal threshold value a * OU and the optimal long-time averaged profit L * OU = L OU (a * OU , −a * OU ), given in Theorem 4.5, where L OU (a, b) is given by (4.4) for the OU model with c = 0.01.
(v) Compute L mis = L P (a * OU , −a * OU ), which is interpreted as the long-time expected profit for a "misspecified" agent who observes the limiting variance and "misapplies" OU model (2.5) instead of Pearson model (2.6). Also, compute the loss rate, From the result ( Table 1) we see that L * P > L * OU always holds though a model misspecification in the profit is rather small (as we see in the loss rate, Loss). Also, we see that higher mean-reversion (with larger κ and κ OU ) yields higher optimized profits.

Concluding remarks
The long-time maximization of profit for pairs trading with thresholds, discussed in Section 4, is an idealized problem, based on the law of large numbers in the long run: To consider a suitable "mean-variance" optimization of profit is an interesting and important challenge as the fluctuation from the mean value seems to have a considerable effect in realistic situations with a finite time horizon. One such mean-variance optimization is to consider the criterion function is the long-time limit of the mean-value of profit, which was analysed in Section 4. Note that is the long-time limit of the variance of profit, and α > 0 is the risk-aversion parameter. The limiting variance (7.1) is obtained from the central limit theorem for the scaled and centred renewal process (see Borovkov [2,Chapter 10] can be computed by using Kac's moment formula [5], where we use the Green function (3.1), combined with the expected value formula (3.2). Although we have an analytic representation of V(a, b) in closed form, the maximization of MV(a, b) does not seem to be straightforward, so this is left as a future research topic. For a different but related optimization for determining thresholds to trigger trading signals, we refer the reader to the Sharpe ratio maximization problem, discussed by Bertram [1].