EconBase
← Back to paper

A singular stochastic control approach for optimal pairs trading with proportional transaction costs

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

57,641 characters · 12 sections · 26 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

A singular stochastic control approach for optimal pairs trading with proportional transaction costs

\centerline{Department of Applied Mathematics and Statistics}

\centerline{State University of New York, Stony Brook, NY 11794, USA.}

\centerline{[email removed]}

{\bf Abstract}: Optimal trading strategies for pairs trading have been studied by models that try to find either optimal shares of stocks by assuming no transaction costs or optimal timing of trading fixed numbers of shares of stocks with transaction costs. To find optimal strategies which determine optimally both trade times and number of shares in pairs trading process, we use a singular stochastic control approach to study an optimal pairs trading problem with proportional transaction costs. Assuming a cointegrated relationship for a pair of stock log-prices, we consider a portfolio optimization problem which involves dynamic trading strategies with proportional transaction costs. We show that the value function of the control problem is the unique viscosity solution of a nonlinear quasi-variational inequality, which is equivalent to a free boundary problem for the singular stochastic control value function. We then develop a discrete time dynamic programming algorithm to compute the transaction regions, and show the convergence of the discretization scheme. We illustrate our approach with numerical examples and discuss the impact of different parameters on transaction regions. We study the out-of-sample performance in an empirical study that consists of six pairs of U.S. stocks selected from different industry sectors, and demonstrate the efficiency of the optimal strategy.

{\bf Keywords:} Free-boundary problem, pairs trading, stochastic control, trading strategies, transaction costs, transaction regions.

Introduction

Pairs trading is one of proprietary statistical arbitrage tools used by many hedge funds and investment banks. It is a short-term trading strategy that first identifies two stocks whose prices are associated in a long-run equilibrium and then trades on temporary deviations of stock prices from the equilibrium. Though paris trading is a simple market neutral strategy, it has been used and discussed extensively by industrial practitioners in the last several decades; see detailed discussion in Vidyamurthy2004, Whistler2004, Ehrman2006, laixing2008, and reference therein.

Besides its wide practice in financial industry, pairs trading also draws much attention from academic researchers. For instance, GatevEtAl2006 examined the risk and returns of pairs trading using daily data collected from the U.S. equity market and concluded that the strategy in general produces profit higher than transaction costs. To investigate the pairs trading strategy analytically, ElliottEtAl2005 modeled the spread of returns as a mean-reverting process and proposed a trading strategy based on the model. This motivates subsequent researchers to formulate pairs trading rules as stochastic control problems for an Ornstein-Uhlenbeck (OU) process and a correlated stock price process. In particular, MudchanatongsukEtAl2008 assumed the log-relationship between a pair of stock prices follows a mean-reverting process, and considered a self-financing portfolio strategy that only allows positions that were long in one stock and short in the other with equal dollar amounts. They then formulated a portfolio optimization based stochastic control problem and obtained the optimal solution to this control problem in closed form via the corresponding Hamilton-Jacobi-Bellman (HJB) equation. Relaxing the equal dollar constraint, TourinYan2013 extended MudchanatongsukEtAl2008's approach and study pairs trading strategies with arbitrary amounts in each stock without any transaction costs.

Instead of deriving the optimal weight of stocks in pairs trading, another line of study on pairs trading strategies fixes the number of traded shares for each stock during the entire trading process and considers only the optimal timing of trades in the presence of fixed or proportional transaction costs. Specifically, LeungLi2015 studies the optimal timing to open or close the position subject to fixed transaction costs and the effect of stop-loss level under the OU process by constructing the value function directly. ZhangZhang2008, SongZhang2013, and NgoPham2016 studied the optimal pairs trading rule that is based on optimal switching among two (buy and sell) or three (buy, sell, and flat) regimes with a fixed commission cost for each transaction, and solve the problem by finding viscosity solutions to the associated HJB equations (quasi-variational inequalities). LeiXu2015 studied the optimal pairs trading rule of entering and exiting the asset market in finite horizon with proportional transaction cost for two convergent assets. Note that, although transaction costs are considered in these strategies, since the number of traded shares of stocks are fixed during the entire trading period, these strategies are still far from traders' practical experience in reality.

To bridge the gap between choosing optimal weight of shares and deciding optimal trading times in pairs trading, we use a singular stochastic control approach to study an optimal pairs trading problem with proportional transaction costs which allows us choosing not only optimal weight, but also optimal trading times during the trading process. For convenience, we assume the same diffusion and Urnstein-Uhlenbeck processes for one stock and its spread with the other stock as those in MudchanatongsukEtAl2008. However, different from MudchanatongsukEtAl2008 who used a trading rule which requires to short one stock and long the other in equal dollar amounts, we consider a delta-neutral rule under which the ratio of traded shares for two stocks is fixed and this fixed ratio is determined by the cointegration relationship of two stocks. Hence when the number of shares of one stock is determined, based on the rule of delta neutral, the number of shares for the other stock is also determined. Besides the weight of shares need to be optimally chosen, we also assume a proportional transaction cost for each trade and hence the optimal times of trading also needs to be decided.

As the overall transaction cost based on the above assumption depends on both trading times and the numbers of shares in each trade, we compute the terminal utility of wealth over a fixed horizon and formulate the problem of choosing optimal trading times and the number of shares as a singular stochastic control problem. We derive the Hamilton-Jacobi-Bellman equations for this problem, and show that the value function of the problem is the unique viscosity solution of a quasi-variational inequality. We further argue that the quasi-variational inequality is equivalent to a free boundary problem so that the state space consisting of one stock price and its spread with the other stock can be naturally divided into three transaction regions: long the first stock and short the second, short the first and long the second, and no transaction. The implied transaction regions can help us determine not only optimal times of each transaction, but also the optimal number of shares in each transaction. To compute the boundaries of these transaction regions, we develop a numerical algorithm that is based on discrete time dynamic programming to solve the equation for the negative exponential utility function, and show that the numerical solution converges to the unique continuous-time solution of the problem.

To investigate the performance of the optimal trading strategies implied by the transaction regions, we carry out both simulation and empirical studies. Specifically, we study the time-varying transaction regions (or trading boundaries) for a specific set of model parameters, and investigate the impact of variations of model parameters on transaction regions and performance of the optimal strategy. For comparison purpose, we also consider a benchmark strategy which is based on the deviation of the spread from its long-term mean and is popular among practitioners. In both simulation studies and real data analysis, we show that the optimal trading strategy performs better than the benchmark strategy.

The rest of the paper is organized as follows. Section 2 first formulates the model and then derive the Hamilton-Jacobi-Bellman equations associated with the singular stochastic control problems. It shows the existence and uniqueness of the viscosity solution for the varational inequalities which are equvalent to the portfolio optimization problem, and reduces the problem into a free boundary problem. Section 2 also consider the optimal trading problem with exponential utility functions. In section 3, we discretize the free boundary problem and propose a disctete time dynamic programming algorithm. We also demonstrate that the solution of the discretized problem converges to the viscosity solution of the variational inequalities. Sections 4 and 5 provide simulation and empircal studies of the model and the optimal trading strategy, and compare its performance with a benchmark trading strategy. Some concluding remarks are given in Section 6.

A pairs trading problem with proportional transaction costs

Model specification

Consider a pair of two stocks $P$ and $Q$, and let $p(t)$ and $q(t)$ denote their prices at time $t$, respectively. We assume that the price of stock $P$ follows a geometric Brownian motion,

equation[equation omitted — 74 chars of source]

where $\mu$ and $\sigma$ are the drift and the volatility of stock $P$, and $B(t)$ is a standard Brownian motion defined on a filtered probability space and but specified later. Denote $x(t)$ the difference of the logarithms of the two stock prices, i.e.,

equation[equation omitted — 82 chars of source]

We assume that the spread follows an Ornstein-Uhlenbeck process

equation[equation omitted — 78 chars of source]

where $\kappa>0$ is the speed of mean reversion, and $\theta$ is the long-term equilibrium level to which the spread reverts. We assume that $(B(t), W(t))$ is a two-dimensional Brownian motion defined on a filtered probability space $(\Omega, {\cal F}_t, \mathbbm{P})$, and the instantaneous correlation coefficient between $B(t)$ and $W(t)$ is $\rho$, i.e.,

equation[equation omitted — 43 chars of source]

The above assumptions are same as those in MudchanatongsukEtAl2008. With these assumptions, we can express the dynamics of $q(t)$ as

equation[equation omitted — 164 chars of source]

In the presence of proportional transaction costs, the investor pays $0<\zeta_p, \zeta_q<1$ and $0<\eta_p, \eta_q<1$ of the dollar value transacted on purchase and sale of the underlying stocks $P$ and $Q$. Denote $L_p(t)$ and $M_p(t)$ two nondecreasing and non-anticipating processes and represent the cumulative number of shares of stock $P$ bought or sold, respectively, within the time interval $[0, t]$, $0\le t \le T$. Let $y_p(t)$ be the number of shares held in stock $P$, i.e., $y_p(t) = L_p(t) - M_p(t)$, and similarly, we define $L_q(t)$, $M_q(t)$, and $y_q(t) = L_q(t)-M_q(t)$ for stock $Q$. Denote $g(t)$ the dollar value of the investment in bond which pays a fixed risk-free rate of $r$. Then the investor's position in two stocks and the bond is driven by

equation[equation omitted — 103 chars of source]

and

equation[equation omitted — 124 chars of source]

where $a_i=1+\zeta_i$ and $b_i=1-\eta_i$ for $i=p, q$.

We then need to choose a rule to determine the number of shares of stocks $P$ and $Q$ bought or sold at time $t$. Note that, MudchanatongsukEtAl2008 assumed no transaction cost and considered the strategy that always shorts one stock and longs the other in equal dollar amount, i.e., $p(t) dL_p(t)+q(t) dM_q(t)=0$ or $p(t) dM_p(t) + q(t) dL_q(t)=0$ at time $t$. LeiXu2015 and NgoPham2016 considered a delta-neutral strategy that always long one share of a stock and short one share of the other stock, i.e., $dy_p(t)= - dy_q(t)=1$ or $dy_p(t)= - dy_q(t)=-1$ at time $t$. Here, we also consider a delta-neutral strategy that requires the total of positive and negative delta of two assets is zero, hence it suggests that the number of shares of stock $P$ bought (or sold) at time $t$ are same as the number of shares of stock $Q$ sold (or bought), i.e.,

equation[equation omitted — 85 chars of source]

Equation (ref) implies that $$dy_q(t) = -dy_p(t) $$

at any time $t$. Comparing to LeiXu2015 and NgoPham2016, we remove the constraint $dy_p(t)= - dy_q(t)=1$ or $-1$ and allow $y_p(t)= - y_q(t)$ to be a control variable. Using equations (ref) and (ref), the dynamics of $g(t)$ in equation (ref) can be simplified as

equation[equation omitted — 142 chars of source]

The process $(L_p(t), M_p(t))$ together with our delta-neutral strategy provides us an admissible trading strategy. For convenience, we denote ${\cal T}(g_0)$ the set of admissiable trading strategies that an investor starts at time zero with amount $g_0$ of the investment in bond and zero holdings in two stocks (i.e., $y_p(0)=y_q(0)=0$), which indicates that the numbers of shares held in stocks $P$ and $Q$ at time $t$ are $y_p(t)$ and $-y_p(t)$, respectively. For nonational convenience, we omit the subscript of $y_p(t)$ and denote $y_p(t)$ as $y(t)$ in our discussion. Then equations (ref), (ref), (ref), and (ref) compose the market model in the time interval $[0, T]$, which describes a stochastic process of $(p(t), x(t), y_p(t), g(t))$ in $\mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$.

Denote the terminal value of the pairs trading portfolio by $J(x(T), p(T), y(T))$. Note that, under our assumption, $y(T)$ indicates that the investor's positions in stocks $P$ and $Q$ are $y(T)$ and $-y(T)$, respectively, then the liquidated value of the portfolio is

equation[equation omitted — 144 chars of source]

where $$ A_+ (p, x) = ( b_p - a_q e^{x}) p, \qquad A_- (p, x) = ( a_p - b_q e^{x}) p. $$

Furthermore, if the investment in bond at terminal time $T$ is $g(T)$, the terminal wealth of the investor is given by $g(T) + J(p(T), x(T), y(T))$. Suppose that the investor's utility $U: \mathbbm{R} \longrightarrow \mathbbm{R}$ is a concave and increasing function with $U(0)=0$. We assume that the investor's goal is to maximize the expected utility of terminal wealth under the market model (ref), (ref), (ref), and (ref),

equation[equation omitted — 223 chars of source]

Furthermore, given trading strategies $(L_p, M_p)$, the total trading cost incurred over $[t, T]$ can be expressed as

eqnarray[eqnarray omitted — 197 chars of source]

and the total profit over $[t, T]$ is $-C(L_p, M_p; t, T)$.

The Hamilton-Jacobi-Bellman equations and free boundary problems

We now derive the Hamilton-Jacobi-Bellman (HJB) equations, associated with the stochastic control problems, for the utility maximization problem (ref). Consider a class of trading strategies such that $L_p(t)$ and $M_p(t)$ are absolutely continuous processes, given by $$ L_p(t) = \int_0^t l(u) du, \qquad M_p(t) = \int_0^t m(u) du, $$

where $l(u)$ and $m(u)$ are positive and uniformly bounded by $\xi< \infty$. Then (ref), (ref), (ref), and (ref) provides us a system of stochastic differential equations with controlled drift, and the Bellman equation for a value function denoted by $V^{\xi}$ is

equation*[equation* omitted — 162 chars of source]

for $(t, p, X, y, g) \in [0, T] \times \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$, in which the operators ${\cal L}$, ${\cal B}$, and ${\cal S}$ are defined as

equation*[equation* omitted — 388 chars of source]

$$ {\cal L}_{1,b} := \frac{\partial }{\partial y} - \big( a_p - b_q e^{x(t)} \big) p(t) \frac{\partial }{\partial g}, $$ $$ {\cal L}_{1,s} :=\frac{\partial }{\partial y} - \big( b_p - a_q e^{x(t)} \big) p(t) \frac{\partial }{\partial g}. $$

The optimal trading strategy is then determined by considering the following three possible cases:

enumerate• buying stock $P$ and sell stock $Q$ at the same rate $l(t)=\xi$ (i.e., $m(t)=0$) when \begin{equation} {\cal L}_{1,b} V^\xi \ge 0, \qquad {\cal L}_{1,s} V^\xi > 0; \end{equation} • selling stock $P$ and buy stock $Q$ at rate $m(t)=\xi$ (i.e., $l(t)=0$) when \begin{equation} {\cal L}_{1,b} V^\xi < 0, \qquad {\cal L}_{1,s} V^\xi \le 0; \end{equation} • doing nothing (i.e. $l(t)=m(t)=0$) when \begin{equation} {\cal L}_{1,b} V^\xi \le 0, \qquad {\cal L}_{1,s} V^\xi \ge 0. \end{equation}

Note that the case ${\cal L}_{1,b} V^\xi >0$ and ${\cal L}_{1,s} V^\xi <0$ can not occur, as all value functions are increasing functions of $g$.

The above argument shows that the optimization problem (ref) is a free boundary problem in which the optimal trading strategy is defined by the inequalities (i), (ii), and (iii) for a given value function. Besides, the state space $[0, T] \times \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$ is partitioned into {\it buy}, {\it sell}, and {\it no-transaction} regions for stock $P$, which are characterized by inequalities (ref), (ref), and (ref), respectively. For sufficiently large $\xi$, the state space remains divided into a {\it buy region} ${\cal B}$, a {\it sell region} ${\cal S}$, and a {\it no-transaction region} ${\cal N}$ for stock $P$, which are correspondingly the {\it sell region}, the {\it buy region}, and the {\it no transaction region} for stock $Q$ due to equation (ref). Obviously, the buy and sell regions for stock $P$ are disjoint, as it is not optimal to buy and sell the same stock at the same time. We denote the boundaries between the no-transaction region ${\cal N}$ and the buy and sell regions ${\cal B}$ and ${\cal S}$ as $\partial {\cal B}$ and $\partial {\cal S}$, respectively.

Let $\xi \rightarrow \infty$, the class of admissible trading strategies becomes ${\cal T}(g_0)$. We can guess that the state space is still divided into three regions, a region of buying $P$ and selling $Q$, a region of selling $P$ and buying $Q$, and a no-transaction region. Then the optimal trading strategy requires an immediate move to the boundaries of buy or sell regions, if the state is in the buy region ${\cal B}$ or the sell region ${\cal S}$. Actually we can obtain equations that each of the value functions should satisfy as follows.

(i) In region ${\cal B}$ of buying $P$ and selling $Q$, the value function remains constant along the path of the state, dictated by the optimal trading strategy, and therefore, for $\delta y \ge 0$

equation[equation omitted — 112 chars of source]

where $\delta y$ is the number of shares of stock $P$ bought and stock $Q$ sold by the investor. $\delta y$ can be any positive value up to the number required to take the state to $\partial {\cal B}$, so letting $\delta y \rightarrow 0$ in (ref) yields

equation[equation omitted — 54 chars of source]

(ii) Similarly, in region ${\cal S}$ of selling $P$ and buying $Q$, the value function obeys the following equation for $\delta y \ge 0$

equation[equation omitted — 111 chars of source]

where $\delta y$ is the number of shares of stock $P$ sold and stock $Q$ bought by the investor. $\delta y$ can be any positive value up to the numer required to take the state to $\partial {\cal S}$, so letting $\delta y \rightarrow 0$ in (ref) yields

equation[equation omitted — 54 chars of source]

(iii) In the no-transaction region, the value function obeys the same set of equations obtained for the class of absolutely continuous trading strategies, and therefore the value function is given by

equation[equation omitted — 54 chars of source]

and the pair of inequalities, shown above in (ref), also hold. Note that, due to the continuity of the value function, if it is known in the no-transaction region, it can be determined in both the buy and sell regions by (ref) and (ref), respectively.

In the buy region ${\cal B}$, ${\cal L}_{1,s} V <0$, and, in the sell region ${\cal S}$, ${\cal L}_{1,b} V > 0$. Also, from the two pairs of inequailities (ref) and (ref), we may conjecture that ${\cal L}_{1,o} V$ in (ref) is negative in both the buy region ${\cal B}$ and the sell region ${\cal S}$. Therefore, the above set of equations can be summarized as the following fully nonlinear partially differential equations (PDE):

equation[equation omitted — 107 chars of source]

for $(t, p, X, y, g) \in [0, T] \times \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$. Note that the above discussion also yields the following free boundary problem for the singular stochastic control value function:

equation[equation omitted — 269 chars of source]

We next show that the value function given by (ref) is a constrained viscosity solution of the variational inequality (ref) on $[0, T] \times \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$, and it is the unique bounded constrained viscosity solution of (ref). The proof is given in the appendix.

{\bf Theorem 1}. The value function $V(t, p, x, y, g)$ is a constrained viscosity solution of (ref) on $[0, T] \times \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$.

{\bf Theorem 2}. Let $u$ be a bounded upper semicontinuous viscosity subsolution of (ref), and $v$ a bounded from below lower semicontinuous viscosity supersolution of (ref), such that $u(T, {\bf x}) \le v(T, {\bf x})$ for all ${\bf x} \in \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$. Then $u \le v$ on $[0, T] \times \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$.

Optimal trading with exponential utility functions

We next assume that the investor has the negative exponential utility function

equation[equation omitted — 60 chars of source]

where $\gamma$ is the constant absoluate risk aversion (CARA) parameter such that $-U''(z)\big/U'(z) = \gamma$. For equation (ref), this utility function can reduce much of computational effort and is easy to interpret. Note that for the utility function (ref), the definition of the value function (ref) can be expressed as

equation[equation omitted — 109 chars of source]

where $H(t, p, x, y)$ is a convex nonincreasing continuous function in $y$ and defined by

eqnarray*[eqnarray* omitted — 194 chars of source]

Plug (ref) into (ref), and define the following operators for $H(t, p, x, y)$ on $[0, T] \times \mathbbm{R}^+ \times \mathbbm{R} \times \mathbbm{R}$, $$ {\cal L}_{2,o} H = \frac{\partial H}{\partial t} + \kappa (\theta-x) \frac{\partial H}{\partial x} + \mu p \frac{\partial H}{\partial p} + \frac{1}{2} \nu^2 \frac{\partial^2 H}{\partial x^2} + \rho \nu \sigma p \frac{\partial^2 H}{\partial p \partial x} + \frac{1}{2} \sigma^2 p^2 \frac{\partial^2 H}{\partial p^2}, $$ $$ {\cal L}_{2,b} H = \frac{\partial H}{\partial y} + \gamma e^{r(T-t)} A_-(p,x) H, $$ $$ {\cal L}_{2,s} H = \frac{\partial H}{\partial y} + \gamma e^{r(T-t)} A_+(p,x) H. $$

Then (ref) is transformed into the following PDE for $H(t, p, x, y)$

equation[equation omitted — 107 chars of source]

with the following boundary conditions $$ H(T, p, x, y) = \exp \big\{ -\gamma J(p, x, y) \big\}. $$

Correspondingly, the free boundary problem (ref) becomes

equation[equation omitted — 300 chars of source]

in which $Y_b(t, p, x)$ and $Y_s(t, p, x)$ are the buy and sell boundaries for stock $P$, respectively. Note that the function $H(t, p, x, y)$ is evaluated in the four-dimensional space $[0, T] \times \mathbbm{R} \times \mathbbm{R} \times \mathbbm{R}$. Furthermore, this suggests that while $(t, u_t, w_t)$ is inside the no-transaction region, the dynamics of $h(t, u, w, y)$ is driven by a two-dimensional standard Brownian motions $\{ z_t, t \ge 0 \}$ and $\{ w_t, t\ge 0 \}$ with correlation $\rho$. In the buy and sell regions, it follows from (ref) that

eqnarray*[eqnarray* omitted — 256 chars of source]

Discretization and a numerical algorithm

The solution of the PDE (ref) or (ref) can be obtained by turning the stochastic differential equations (ref), (ref), (ref), and (ref) into Markov chains and then applying the discrete time dynamic programming algorithm. The discrete state is $\mathbbm{X}=(\chi, \mathbbm{p}, \mathbbm{x}, \vartheta, \mathbbm{g})$, whose elements denote time, price of stock $P$, spread, number of shares of stock $P$, and amount in the bank in a discrete space. The value function, denoted by $\mathbbm{V}$, are given a value at the final time by using the boundary conditions for the continuous value functions over the discrete subspace $(\mathbbm{p}, \mathbbm{x}, \vartheta, \mathbbm{g})$, and then they are estimated by proceeding backward in time by using the discrete time algorithm. As in the continuous time case, this algorithm is the same for both value functions and is derived below for a value function denoted by $\mathbbm{V}^{\delta}(\chi, \mathbbm{p}, \mathbbm{x}, \vartheta, \mathbbm{g})$, where $\rho$ is a discretization parameter, which depends on the discrete time interval $t_\delta$. If $t_\delta$ and the resolution of the $\vartheta$-axis $\vartheta_\delta$ are sent to zero, then the above discrete value function converges to a viscosity subsolution and a viscosity supersolution of the PDE (ref). Therefore, all the discrete value functions converge to their continuous counterparts; this is due to the uniqueness of the viscosity solution.

Consider an evenly spaced partition of the time interval $[0, T]$: $\chi = \{ \delta, 2\delta, \dots, n\delta \}$, where $\delta = T/n$, and two evenly spaced partitions of the space intervals $\mathbbm{z}= \{ 0, \pm \sqrt{\delta}, \pm 2 \sqrt{\delta}, \dots, \}$ and $\mathbbm{w} = \{ 0, \pm \sqrt{\delta}, \pm 2\sqrt{\delta}, \dots, \}$. The grids $\mathbbm{p}$ is defined by $\mathbbm{z}$ via the following transformation,

equation[equation omitted — 134 chars of source]

Note that the SDE (ref) implies that the aymptotic distribution of $X(t)$ is Normal$(\theta, \nu^2/(2\kappa))$, we define grid $\mathbbm{x}$ by

equation[equation omitted — 100 chars of source]

Denote $\chi_i = i\delta$ for $i=1, \dots, n-1$. The dynamics (ref) and (ref) of $P(t)$ and $X(t)$ implies the following transition density for $(\mathbbm{p}(\chi_i), \mathbbm{x}({\chi_i}) )$,

equation[equation omitted — 442 chars of source]

We also note that the discrete time equation for the amount in the bank $\mathbbm{g}(\chi)$ is $$ \mathbbm{g}(\chi_{i+1}) = \mathbbm{g}(\chi_i) \exp ( r \delta). $$

Given the grid defined above, the discrete time dynamic programming principle is invoked, and the following discretization scheme is proposed for PDE (ref):

equation[equation omitted — 749 chars of source]

where $\xi >0$ is a real constant and $i=0, \dots, n-1$. This scheme is based on the principle that the investor's policy is the choice of the optimum transaction. We next show that, as the discretization parameter $\delta \rightarrow 0$, the solution $\mathbbm{V}^\delta$ of (ref) converges to the value function $V$, or, equivalently, to the unique constrained viscosity solution of (ref).

{\bf Theorem 3}. The solution $\mathbbm{V}^\delta$ of (ref) converges locally uniformly as $\delta \rightarrow 0$ to the unique continuous constrained viscosity solution of (ref).

For the exponential utility function $U(z) = 1-\exp( -\gamma z)$, the value function $V$ can be expressed as (ref), its discretization scheme is given by $$ \mathbbm{V}^\delta(\chi_i, \mathbbm{p}(\chi_i), \mathbbm{x}(\chi_i), \vartheta, \mathbbm{g}(\chi_i) ) = 1- \exp \Big( -\gamma \mathbbm{g}(\chi_i) e^{r (T-\chi_i)} \Big) \mathbbm{H}^\delta(\chi_i, \mathbbm{p}(\chi_i), \mathbbm{x}(\chi_i), \vartheta). $$

Then the discretization scheme (ref) can be reduced to

equation[equation omitted — 596 chars of source]

where $$ F_b(\mathbbm{p}(\chi_i), \mathbbm{x}(\chi_i), \xi) = \exp \big\{ \gamma \xi A_- (\mathbbm{p}(\chi_i), \mathbbm{x}(\chi_i)) e^{r(T-\chi_i)} \big \}, $$ $$ F_s(\mathbbm{p}(\chi_i), \mathbbm{x}(\chi_i), \xi) = \exp \big\{ -\gamma \xi A_+ (\mathbbm{p}(\chi_i), \mathbbm{x}(\chi_i)) e^{r(T-\chi_i)} \big \}. $$

Simulation studies

Buy and sell regions

We use the numerical algorithm proposed in Section \hangindent 12pt{num.alg} to studies the buy and sell boundaries of the pairs trading strategy. Our study focuses on two aspects of the problem. The first is the property of buy and sell boundaries (or no transaction regions) for a given set of model parameters, and the other is the impact of different model parameters on the shape of buy and sell boundaries. Without loss of the generality, we assume the time horizon $T=1$ and $p(0) = 1$ in all our simulation studies.

We first consider a baseline scenario. The parameter values in the baseline scenario are $\mu=0.2, \sigma=0.4, \theta = 0.1, \kappa=1, \nu=0.15, \rho=0.5, r=0.01, \gamma=5$ and $\zeta_p=\zeta_q=\xi_p=\xi_q = 0.0005$. For convenience, we label the setting of the baseline parameter values as Scenario 1 or (S1). We discretize the state space $(t, p, x, y, g)$ and use the developed Markov chain approximation to solve the discretized optimization problem. Figure \hangindent 12pt{fig1.bound01} shows the buy and sell surfaces of (S1) at time $t=0.05, 0.35, 0.65$, and $0.95$. To better read the figure, we also show in Figures \hangindent 12pt{fig2.bound01} and \hangindent 12pt{fig3.bound01} the buy and sell boundaries of (S1) at prices $p=0.845, 1.095, 1.400, 2.108$, and $x = 0.023, 0.092, 0.157, 0.266$, respectively. These points are chosen such that they correspond to the 24%, 48%, 72%, and 96% quantiles of the distribution of $p(T)$ and asymptotic distribution of $x(t)$, respectively. We find the following from these figures. First, at a given time and a given price level, the no transaction region becomes narrower when the spread gets larger, and the no transaction region moves from the negative to the positive when the spread turns from the negative to the positive. For example, at $t=0.05$ and $p(t) = 0.845$, the no transaction region changes from $[-9.4, -8.0]$ at $x(t)=0.023$ to $[-4.6, -3.4]$ at $x(t) = 0.092$, $[-0.7, 0.2]$ at $x(t) = 0.157$, and $[3.2, 3.7]$ at $x(t)=0.266$. Second, at a given time and a given spread level, the no transaction region becomes narrower when the price $p(t)$ gets larger, and the no transaction region moves up when the price becomes larger. For instance, at $t=0.05$ and $x(t)=0.023$, the no transaction region changes from $[-9.4, -8.0]$ at $p(t) = 0.845$ to $[-6.8, -5.6]$ at $p(t)=1.095$, $[-4.9, -3.9]$ at $p(t) = 1.400$, and $[-2.7, -2.0]$ at $p(t)=2.108$. Note that, the movement of the no transaction region with respect to price change but with a fixed spread level is relatively smaller than that with respect to spread change but with a fixed price level. Third, when time ellapses from 0 to 1, the no transaction region moves upward. For instance, at the fixed price-spread level $(p(t), x(t)) = (1.095, 0.092)$, the no transaction intervals at $t=0.05, 0.35, 0.65$ and $0.95$ are $[-2.6, -1.6]$, $[-2.1, -1.2]$, $[-1.5, -0.7]$, and $[-0.8, -0.2]$, respectively.

figure[figure omitted — 199 chars of source]
figure[figure omitted — 284 chars of source]
figure[figure omitted — 285 chars of source]

We then discuss the impact of different parameter values on the buy and sell boundaries (or no transaction regions). Besides the parameter values in (S1), we now consider other 18 sets of parameter values, labeled as Scenarios 2-19. In each of Scenarios 2-19, all parameters values are same as those in (S1) except one parameter is changed as the specification; see Table \hangindent 12pt{table_para} that summarizes parameter values in all 19 scenarios. For example, Scenario 2 uses parameter values $\mu=0.1$ and assume all other parameters $\sigma, \theta, \kappa, \nu, \rho, r, \gamma$ and $\zeta_p=\zeta_q=\xi_p=\xi_q$ have same values as those in (S1). We discretize the state space $(t, p, x, y, g)$, and use the developed Markov chain approximation to solve the discretized optimization problem for Scenarios 2-19.

table[table omitted — 814 chars of source]

To compare the buy and sell boundaries (or no transaction regions) among different scenarios, we plot the buy and sell boundaries over time at four fixed points $(p^{(1)}, x^{(1)}) = (0.9, 0.09)$, $(p^{(2)}, x^{(2)}) =(0.9, 0.12)$, $(p^{(3)}, x^{(3)}) =(1.5, 0.09)$, and $(p^{(4)}, x^{(4)}) =(1.5, 0.12)$, respectively. Figures \hangindent 12pt{fig4.mu}-\hangindent 12pt{fig4.xi} demonstrate variations of the buy and sell boundaries over time for different values of $\mu$, $\sigma$, $\theta$, $\kappa$, $\nu$, $\rho$, $r$, $\gamma$, $\zeta_p (=\zeta_q=\xi_p=\xi_q)$, respectively. In each figure, we plot the buy and sell boundaries for $(p^{(i)}, x^{(i)})$, $i=1, 2, 3, 4$ on the top left, top right, bottom left, and bottom right, respectively, we also use the solid (dashed, dotted) lines to represent the baseline value (the smaller value, the larger value) of the parameter under comparison. Figure \hangindent 12pt{fig4.mu} suggests that when $\mu$ increases, the buy and sell boundaries move downward at all four points. Figure \hangindent 12pt{fig4.sigma} indicates that when $\sigma$ increases, the buy and sell boundaries move upward at $(p^{(1)}, x^{(1)})$ and $(p^{(2)}, x^{(2)})$, but move downward at $(p^{(3)}, x^{(3)})$ and $(p^{(4)}, x^{(4)})$. Figure \hangindent 12pt{fig4.theta} shows that, when $\theta$ increases, the buy and sell boundaries move downward at all four points. Figure \hangindent 12pt{fig4.kappa} indicates that, when $\kappa$ increases, the buy and sell boundaries move downward, and the magnitude of such movement is larger at $(p^{(1)}, x^{(1)})$ than the other three points. Figure \hangindent 12pt{fig4.nu} shows that, when $\nu$ increases, the buy and sell boundaries move upward at $(p^{(i)}, x^{(i)})$, $i=1,2,3$, but move downward at $(p^{(4)}, x^{(4)})$. Figure \hangindent 12pt{fig4.rho} suggests that, when the correlation $\rho$ changes from the negative to the positive, the buy and sell boundaries move downwards at $(p^{(1)}, x^{(1)})$ and $(p^{(2)}, x^{(2)})$, but move upward at $(p^{(3)}, x^{(3)})$ and $(p^{(4)}, x^{(4)})$. Figure \hangindent 12pt{fig4.r} indicates that variations of interest rate $r$ have little impact on the buy and sell boundaries. Figure \hangindent 12pt{fig4.gamma} shows that, when the risk aversion parameter $\gamma$ increases, the buy and sell boundaries move upward at $(p^{(i)}, x^{(i)})$, $i=1,2,3$, but move downward at $(p^{(4)}, x^{(4)})$. Figure \hangindent 12pt{fig4.xi} suggests that, when the transaction cost increases, the center of the no transaction region seems not change, but the region gets wider.

figure[figure omitted — 257 chars of source]
figure[figure omitted — 266 chars of source]
figure[figure omitted — 268 chars of source]
figure[figure omitted — 269 chars of source]
figure[figure omitted — 265 chars of source]
figure[figure omitted — 265 chars of source]
figure[figure omitted — 260 chars of source]
figure[figure omitted — 265 chars of source]
figure[figure omitted — 299 chars of source]

Performance of the strategy

We also perform simulation studies to investigate the performance of the optimal trading strategy. For comparision purpose, we also consider a benchmark strategy which is analogous to the relative-value arbitrage strategy used in GatevEtAl2006 and based on standard deviation of the spread. Specifically, the strategy opens a position when the spread exceeds twice of the standard deviation of the spread process, and closes the position when either price converges or the maturity is reached. As the benchmark strategy doesn't specify the number of shares of stocks that should be bought or sold, we assume that the number of shares of stocks traded each time is one.

We simulate the price process $p_t$ and the spread process $x_t$ to compare the performance of the benchmark strategy and our strategy in scenarios (S1)-(S19). Assume that $T=1$, and we discretize the time interval $(0, 1]$ as $\{ 0.01, 0.02, \dots, 0.99, 1\}$, so that we have 100 trading periods. For each scenario, we simulate 1000 paths of $\{ (p_t, x_t) | t=0, 0.01, \dots, 0.99, 1, p_0=1\}$, and for each simulated path $(p_t, x_t)$, we implement the benchmark strategy and the optimal strategy at $t=0.01, 0.02, \dots, 0.99$ and close the position at $T=1$. Let $i=b$, $o$ represent the benchmark and the optimal strategies, respectively. For each realized trading strategies, denote $N^{(i)}$ as the number of trades (i.e., buy and sell) among the 100 trading periods and $PL^{(i)}= -C^{(i)}(L_p, M_p; 0,1)$ the total profit made during the trading process. Note that the benchmark strategy trades only one share of stock each time while the number of shares of stocks in the optimal strategy are “optimally" chosen based on the buy and sell regions, we define $PS^{(i)}$ as the the average profit (or loss) generated from the maximum number of shares of stocks during the trading process. That is, $PS^{(i)} := -C^{(i)}(L_p, M_p; 0,1)/ \max_{t} |Y_t^{(i)}|$, where $Y_t^{(i)}$ is the number of shares of stock $P$ at $t=0.01, 0.02, \dots, 0.99$.

Table \hangindent 12pt{table_comp} summarizes the mean and standard error of $N^{(i)}$, $PL^{(i)}$, and $PS^{(i)}$ ($i=o, b$) for 1000 paths in each scenario. We note that the total numbers of trades $N^{(o)}$ in the optimal strategy range from 45.736 to 55.821 for (S1)-(S17), and increases (or decreases) significantly when the transaction costs decreases (or increases) in (S18) and (S19). In comparison to this, the total numbers of trades $N^{(b)}$ in the benchmark strategy are much smaller, essentially, between 1 and 2. This suggests the benchmark strategy is much more conservative than the optimal strategy. For the realized profit over the trading period, $PL^{(o)}$ is much larger than $PL^{(b)}$ as the optimal strategy can choose to buy or sell the “optimal" number of shares of stock pairs, while the benchmark strategy only buy or sell one share of stock pair. $PS^{(o)}$ and $PS^{(b)}$ remove the impact of number of shares of traded stocks, and provide the average earning per traded stock, and we notice that $PS^{(o)}$ still significantly higher than $PS^{(b)}$.

table[table omitted — 2,142 chars of source]

Real data studies

We test our model with real market data in this section. We present the sample and explain our methodology first, and then show the results and discussion.

A key step of implementing pairs trading strategy is to select two stocks for pairs trading. GatevEtAl2006 illustrate how this can be done by using stock price data. An alternative to this approach is to use fundamentals analysis to select two stocks that have almost the same risk factor exposures; see Vidyamurthy2004. In this study, we consider a hybrid of these two approaches. Specifically, we restrict two stocks $P$ and $Q$ to belong to the same industry sector. Table \hangindent 12pt{table_stocks} lists six pairs of stocks selected from four different sectors. For each pair of stocks $P$ and $Q$, we compute the spread by regressing log price of stock $Q$ on the log price of stock $P$, and the fitted values of the regression is considered as the “transformed" price of $P$. Figure \hangindent 12pt{fig5.6stocks} shows six pairs of the original prices of $Q$ and transformed prices of $P$ over time.

table[table omitted — 654 chars of source]
figure[figure omitted — 190 chars of source]

We then apply the optimal strategy and the benchmark strategy in Section 4.2 to test the out-of-the-sample performance. Specifically, we use the past three years of the historical data of each pair to estimate the model parameter, and run unit-root test to conclude if the spread $x_t$ is a stationary process. If $x_t$ is not stationary, we do not implement any strategies. Otherwise, we implement both the optimal strategy and the benchmark strategy. Note that the optimal strategy can optimally choose the number of shares of stocks in each trade, while we still trade one unit of stock in the benchmark strategy. Table \hangindent 12pt{table_res} shows the number of trades $N^{(i)}$, the accumulated profit (in U.S. dollars) at maturity $PL^{(i)}$, and the average profit per traded share $PS^{(i)}$ over two testing periods, for $i=o$ (the optimal strategy) and $i=b$ (the benchmark strategy). Table \hangindent 12pt{table_res} suggests that the benchmark strategy is much more conservative than the optimal strategy. Besides, the average profits per traded share $PS^{(o)}$ of the optimal strategy are much larger than that of the benchmark strategy except for the stock pair $(KO, PEP)$.

table[table omitted — 920 chars of source]

Concluding remark

The problem of optimal pairs trading has been studied by many academic researchers and financial practitioners. Existing models and methods try to find either the optimal shares of stocks by assuming no transaction costs, or the optimal timing of trading fixed number of shares of stocks with transaction costs. To find optimal pairs trading strategies which determine optimally both the trade time and the number of shares during the trading process, we investigate an optimal pairs trading problem with proportional transaction costs. Using an approach that is based on maximization of the expected utility of terminal wealth, we transform the problem into a singular stochastic control problem and argue that the value function of the problem is unique viscosity solution of a nonlinear quasi-variational inequality. We further show that the viscosity solution is equivalent to a free boundary problem for the singular stochastic control value function. To solve the singular stochastic control problem associated with utility maximization and compute the value function and transaction regions, we develop a dynamic programming based numerial algorithm to compute the solution. In simulation studies, we illustrate the numerical algorithm and investigate the impact of model parameters on the optimal trading strategies (or the transaction regions). We also demonstrate the out-of-sample performance of the optimal strategy via an empirical study which consists of six pairs of U.S. stocks from different industry sectors.

There are several directions in which our approach needs further investigation. First, our approach can be easily extended for nonexponential utility functions. In such a case, the optimization problem involves five (instead of four) variables, the numerial algorithm in our paper needs to be modified to adapt for five variables. Second, our approach can be extended to solve the optimal cointegration trading which involves $n$ stocks with $m$ cointegration relationship. Third, many empirical studies suggest that stock price processes can be better approximated by incorporating jumps. Using the framework and algorithms developed in XingEtAl2017, the method developed here can be extended to the case that price processes follow geometric jump-diffusion processes. In such a case, the value function of the corresponding variational inequalities involve integro-differential equations, which can be solved by extending our numerical algorithm.

Acknowledgement

The author's research is supported by National Science Foundation DMS-1612501.