High Dimensional Statistical Arbitrage With Factor Models and Stochastic Control
High Dimensional Statistical Arbitrage With Factor Models and Stochastic Control
High Dimensional Statistical Arbitrage With Factor Models and Stochastic Control
Jorge Guijarro-Ordonez
To cite this article: Jorge Guijarro-Ordonez (2019) High-dimensional Statistical Arbitrage with
Factor Models and Stochastic Control, Applied Mathematical Finance, 26:4, 328-358, DOI:
10.1080/1350486X.2019.1702067
Article views: 71
1. Introduction
Modelling of pairs trading based on stochastic control has been an active research
topic in mathematical finance for the last few years. After the papers by Jurek and
Yang (2007) and Mudchanatongsuk, Primbs, and Wong (2008), an increasing
number of models have been proposed in this framework (see, for example, Chiu
and Wong (2011), Tourin and Yan (2013), and Liu and Timmermann (2013)), in
which generally they assume that some statistically designed relation between the
prices of two assets is a mean-reverting stochastic process and find a dynamic
optimal allocation in continuous time in some version of the classical Merton
framework. More recently, a number of papers have also studied the optimal
entry and exit points when trading a couple of cointegrated assets, such as Leung
and Li (2015), Lei and Xu (2015), Ngo and Pham (2016), and Kitapbayev and Leung
(2018).
In the high-dimensional case, however, relatively little model-based research has
been conducted. Cartea and Jaimungal (2016) and Lintilhac and Tourin (2016)
investigate a multidimensional generalization of the model in Tourin and Yan
(2013) and apply stochastic control to solve a Merton-like problem in continuous
2. The model
2.1. Set-up and assumptions
In the remainder of this paper, we will consider the following general framework.
We will assume that an investor observes the returns of a large number N of risky
assets and, like in classical portfolio theory based on stochastic control, she must
decide how to dynamically allocate her wealth by investing in them or in a riskless
asset with constant interest rate r so that the expected utility of her wealth at a finite
terminal time T is maximized. However, unlike the classical framework and the
existing literature, to do so she will execute a statistical arbitrage strategy based on
a factor model, in which instead of trading depending on the state of the original
returns she will trade depending on the behaviour of the residuals, which will be the
trading signals. For example, in the case of two assets, this is equivalent to classical
pairs trading, in which the investor may perform a simple linear regression on the
returns of two historically correlated securities and, depending on how far the
oscillation of the residual is from its historical average, she decides if there is
a mispricing and opens and closes long and short positions in the original assets
332 J. GUIJARRO-ORDONEZ
in a market-neutral way. In this paper, we will study the generalization of this to the
high-dimensional case of an arbitrary number of assets, in which we substitute the
simple linear regression by a statistical factor model and we study the optimal
allocations under the framework of stochastic control, assuming a mean-reverting
stochastic model for the behaviour of the residuals.
More precisely, we make the following three general assumptions on how the investor
will generate these residuals and what dynamics they will have:
(1) Assumption 1: The investor has computed a factor model for the returns of the
risky assets, which will hold during the investment (finite) horizon and is given by
dRt ¼ ΛdFt þ dXt ; (2:1)
for some rescaling Λ ~ of Λ. (In fact, the only thing we need about this assumption is
that (2.2) holds for some matrix Λ, ~ which allows for a bigger class of factor models
than classical PCA).
(3) Assumption 3: The process Xt given by the cumulative residuals is mean-reverting.
In particular, for analytic tractability, we assume that it is a matrix N-dimensional
Ornstein-Uhlenbeck process satisfying the following stochastic differential equation
with known parameters
dXt ¼ Aðμ Xt Þdt þ σdBt ;
making Λ ¼ 0, we have the situation in which the returns themselves are globally
mean-reverting following a matrix Ornstein-Uhlenbeck process, which has also
been studied empirically and analytically using stochastic control techniques in the
context of optimal execution in Cartea, Gan, and Jaimungal (2018), and in the
context of statistical arbitrage in Cartea and Jaimungal (2016) in the particular
case in which A has rank one.
2.2. Making the model tractable for stochastic control and imposing
market-neutrality
Unlike the classical literature on portfolio choice based on stochastic control,
choosing as control variables the amount of capital that the agent invests in each
of the N risky assets of the previous framework might make the optimal allocation
problem intractable. Indeed, since we only have information about the dynamics of
the residuals (and not directly about the returns like in the classical framework),
these residuals are not independent, and the factors themselves depend on the
returns, the classical approach would lead to complicated interdependencies.
Moreover, since the investor is executing a statistical arbitrage strategy, we would
need to incorporate additional market-neutrality constraints so that the returns of
the strategy do not depend on the model factors, but just on the idiosyncratic
component of the model given by the residuals. This would complicate the problem
further and might require numerical optimization methods as done in Papanicolaou
and Yeo (2017) and Boyd et al. (2017).
In this paper, on the contrary, we deal with both problems simultaneously and we
solve them analytically by following a new approach. This is based on the following
proposition, which shows that, by using the N risky assets at our disposal, it is actually
possible to construct analytically N market-neutral portfolios whose returns only depend
on one coordinate of X, which greatly simplifies the complexity of the problem and makes
it analytically tractable:
Proof. The mathematical construction of the market-neutral portfolios under the given
assumptions is surprinsingly straightforward and involves just a linear projection.
Indeed, (2.1) implies that
X
dRti ¼ Λij dFtj þ dXti ;
j
X
dFtj ¼ ~ jk dRtk :
Λ
k
P
Combining the two previous equations we find that, for cik :¼ j Λ ~ jk Λij ,
!
X X X
dRti ¼ ~ jk Λij dRtk þ dXti ¼
Λ cik dRtk þ dXti :
k j k
(i.e., we invest ci1 dollars in the first asset, ci2 dollars in the second one, and so on),
we automatically obtain an instantaneous return of dXti , which is market neutral and
depends only on the ith coordinate of the process Xt . Further, from the above equations it
is also obvious that for any real number πit , πit ~pi will
Palso be market-neutral and yielding
a return of πit dXti , and the same applies to ~
i π it pi , which will have a return
P
of i πit dXti ¼ πt dXt .
Finally, regarding the last part of the statement just observe that the total amount of
capital invested in the strategy πt ¼ ðπit Þ1iN at time t is simply
X X
ðπit ~pi Þ 1 ¼ πit ð~pi 1Þ ¼ πt p
i i
Remark 2.1. Note in particular that, if Λ or Λ~ are sparse matrices, then most of the cik in
the above construction will be 0, so the investor will be investing in a few number of
assets in each market-neutral portfolio and this could significantly reduce his transaction
costs while rebalancing his positions. In particular, Pelger and Xiong (2018) discuss a way
of obtaining this kind of sparse factor model.
The key consequence of the above proposition is that, if we choose as control variables
the amount of capital πt that we wish to invest in these N market-neutral portfolios
(instead of directly in the original assets) at time t, the dynamics of the problem get
remarkably simpler, they only depend separately on the coordinates of X, and we have
market-neutrality by construction. This solves simultaneously the two problems we
discussed before and allows us to connect stochastic control and the factor model in
a simple way, and it is therefore the approach which we will adopt in the remainder of
this paper.
Note also that, under these new control variables, all the information about the factor
model and in particular about its loadings matrix is now encoded in the vector p, which
will play an important role in the remaining sections. Moreover, some statements about
the strategies must be rewritten in terms of it within this new framework. For instance, in
the new setting, a strategy ðπt Þ0tT is dollar-neutral at t if p πt ¼ 0, since as we
mentioned before p πt is the total capital spent at time t.
APPLIED MATHEMATICAL FINANCE 335
subject to
dWt ¼ ðπt0 Aðμ Xt Þ þ ðWt πt0 pÞrÞdt þ πt0 σdBt
the vector p of the equations above and which will play an important role in the
following sections), and we consider the general case of an arbitrary number of
assets with a market-neutral restriction. Furthermore, the model will be extended in
section 4 to incorporate other important features of statistical arbitrage strategies,
like dollar neutrality restrictions and transaction costs, and we will analyse the
impact of the factor model on these extensions.
Quite surprisingly, the previous problems admit interpretable closed-form solu-
tions – which is computationally useful in this high-dimensional setting, and which
allows us to understand the influence of the model parameters and especially of the
factor model – in the cases in which the utility is exponential or of a Markowitz-
inspired mean-variance type (but not for other usual choices of utility functions, like
the HARA family). This is what we will show in the following two sections, first for
the simple setup of (2.4) and (2.5) in section 3, and then extending the model in
section 4 to incorporate soft constraints on the investor’s portfolio and quadratic
transaction costs.
Theorem 3.1. Under an exponential utility (so uðwÞ ¼ eγw for some γ > 0) and the
technical condition described in our verification theorem (Proposition 3.2 below), the
optimal portfolio to have at time t according to (2.4) is explicitly computable and given by
!
0 1 Aðμ Xt Þ pr A0 ðσσ 0 Þ1 ðT tÞ2
πt ¼ ðσσ Þ þ ðAðμ Xt Þ prÞðT tÞ Apr :
γerðTtÞ γerðTtÞ 2
The result follows from the following two propositions, whose proof is given in
Appendix A.1 using classical stochastic control techniques:
Proposition 3.1 (Solving the PDE). The value function H associated to (2.4) and (2.5)
when uðwÞ ¼ eγw is explicitly computable and admits the probabilistic representation
Hðt; x; wÞ ¼ expðγðwerðTtÞ þ hðt; xÞÞÞ where
APPLIED MATHEMATICAL FINANCE 337
"ð #
T
1 0 0 1
hðt; xÞ ¼ Et;x ðAðμ Ys Þ prÞ ðσσ Þ ðAðμ Ys Þ prÞ ds
t 2γ
and dYt ¼ rpdt þ σdBt for a new Brownian motion B under a new probability law P .
The associated optimal control in feedback form is then
DH
π ¼ ðσσ 0 Þ1 (3:1)
@ww H
where DH ¼ ðAðμ xÞ prÞ@w H þ σσ 0 Ñxw H.
Proposition 3.2 (Verification). The strategy given in Theorem 3.1. is indeed optimal if
where Λ0 ðsÞ and Λ1 ðsÞ are the diagonal matrices containing, respectively, the eigenvalues of
Ω1=2 ðC0 þ C00 ÞΩ1=2 ðsÞ and Ω1=2 C1 C10 Ω1=2 ðsÞ, for
C0 ðsÞ ¼ A0 ðσσ 0 Þ1 AðIN þ AðT sÞÞ; C1 ðsÞ ¼ A0 ðσσ 0 Þ1 ðIN þ AðT sÞÞσ
ðs
0
ΩðsÞ ¼ eAðsuÞ σσ 0 eA ðsuÞ du:
0
the risky assets the further their residuals are from their historical mean μ and in
a way proportional to the historical mean reversion speed given by A, like in
classical pairs trading. Moreover, all the remaining terms depend jointly on the
factor model and the interest rate through the term pr, which reflects the cost of
the leverage associated with imposing market-neutrality through the loadings of
the factor model. In particular, note that, the bigger the loadings of the factor
model are (and hence the bigger p is), the more we will need to invest to achieve
market neutrality (again like in pairs trading with a big beta) and the bigger our
leverage will be, and this will affect the optimal strategy depending on the interest
rate r.
Finally, regarding the technical optimality conditions, intuitively they arise from the
fact that Hðt; Xt ; Wt Þ, the value function evaluated at the wealth process Wt correspond-
ing to the optimal strategy, may blow up because of the exponential function coming
from the exponential utility. In particular, since Wt ends up being an Ito process
depending quadratically on Xt and Xt is Gaussian, the term expðγWt erðTtÞ Þ is related
to the moment generating function of a chi-squared distribution, which blows up far
away from 0. Thus, these technical conditions are just ensuring that the corresponding
functions are integrable. Interestingly, this does not depend on the risk-aversion para-
meter γ, the interest rate r, or the factor model used (captured by p), but just on the
parameters of X and the terminal time T.
Theorem 3.2. If γðtÞ is continuous and positive on ½0; T, the problem in (2.4) with the
following mean-variance objective function
" ðT #
γðsÞ d
Hðt; x; wÞ ¼ sup Et;x;w WT Vars ðWτ Þjτ¼s ds
π2At;T t 2 dτ
In particular, for γðtÞ ¼ γe2rðTtÞ , the above optimal policy is the same as the first term of
the corresponding one in Theorem 3.1.
This unexpected connection between the mean-variance and the exponential utility
cases may in fact be explained heuristically. Indeed, supposing that r ¼ 0 for the sake of
APPLIED MATHEMATICAL FINANCE 339
4. Two extensions
In this final theoretical section of the paper, we complete the picture described in the
previous two sections by considering two important and new extensions within the
context of statistical arbitrage with a factor model. In the first subsection, we show
how to incorporate in the above strategies soft constraints frequently imposed by
arbitrageurs with the example of dollar-neutrality, whereas in the second one we
introduce market frictions in the form of quadratic transaction costs. In both cases,
we obtain again closed-form analytic solutions which are interpretable, convenient
from a computational perspective in our high-dimensional setting, and which shed
further light on the influence of the factor model and its connection with market
neutrality.
many additional soft constraints in the two frameworks of section 3 without increasing
significantly the difficulty of the problems, by just adding a carefully chosen penalty term
to the corresponding objective function.
As an illustration of this, we give in the next corollary the corresponding optimal
strategies when a dollar-neutrality restriction is softly enforced. To do so, recall that,
within the framework of section 2 that imposed market-neutrality within the factor
model, a strategy πt is dollar neutral if p πt ¼ 0, which means that the total amount
of capital invested at time t is 0. Hence, we can softly enforce dollar neutrality by
replacing the wealth process of Theorems 3.1 and 3.2 by the penalized wealth process
defined by dW ~ t :¼ dWt αðtÞðπt pÞ2 =2dt for a certain general time-dependent penalty
function αðtÞ. This penalizes non dollar-neutrality (i.e., πt pÞ0) at each time and is
quadratic to simplify the optimization process.
The proof follows exactly the same lines as in the previous two cases and is obtained
from them by small modifications, so we will omit it for the sake of brevity.
Corollary 4.1. Suppose that dollar neutrality is softly enforced by replacing the wealth
process of Theorems 3.1 and 3.2 by the penalized wealth process defined by
dW~ t :¼ dWt αðtÞðπt pÞ2 =2dt. Then
(1) The problem with mean-variance utility has optimal portfolio at t given by
(2) The problem with exponential utility has optimal portfolio at t given by
both with terminal conditions bðTÞ ¼ cðTÞ ¼ 0 and where MðtÞ ¼ ðγσσ 0
erðTtÞ þ αðtÞpp0 Þ1 .
The resulting optimal policies have therefore the same structure as the two previous
strategies of section 3, but now the additional term αðtÞpp0 has been introduced in the
inverse to enforce the dollar-neutrality condition. This again depends on the factor
model via p and is related to how extreme the capital positions will be because of the
market-neutrality restriction, which depends directly on the loadings matrix and hence
on p. Note in particular that, the bigger the loadings of the factor model are, the bigger
αðtÞpp0 will be and hence the bigger the impact of the dollar neutrality restriction
will be.
APPLIED MATHEMATICAL FINANCE 341
in which as we mentioned the new control variable is I; t; x; w; π are now state variables;
and A is the set of all F -adapted predictable processes It such that the corresponding
SDEs have a unique (strong) solution for any initial data and both It and the resulting πt
given by dπt ¼ It dt are again in L2 ðΩ ½0; TÞ. Thus, the investor aims to maximize her
terminal wealth but penalizing at each instant both for the risk of her strategy (measured
by the volatility of her wealth process) and for the price impact caused by her actions
(reflected in the quadratic transaction costs).
In this new setting, it is again possible to find explicitly the optimal strategy that the
investor should follow, which is described in detail in the next theorem:
Theorem 4.1. If γðtÞ 0 (i.e., non-negative volatility aversion) and is continuous, the
optimal strategy in the above problem ‘tracks’ a moving aim portfolio Aimðt; Xt Þ with
a tracking speed of RateðtÞ, according to the following ODE describing the evolution of the
optimal trading intensity It ¼ dπt =dt
It ¼ Aimðt; Xt Þ þ RateðtÞπt ;
where RateðtÞ is a N N negative-definite matrix tending to 0 when t ! T 4, and
Aimðt; Xt Þ admits the probabilistic representation
ðT
Aimðt; xÞ ¼ f ðsÞEt;x ½FrictionlessðsÞds
t
where FrictionlessðsÞ is the optimal portfolio at time s in the frictionless case of section 3.2.
and f ðsÞ is a certain averaging function given in Proposition 4.3 below.
342 J. GUIJARRO-ORDONEZ
Remark 4.1. If in particular the investor has constant volatility aversion (so γðtÞ ¼ γ), the
matrix Riccati ODE is explicitly solvable and
The result follows from the following sequence of three propositions, which are
proved in Appendix A.3:
Proposition 4.1 (Conjectured solution). The solution of the HJB equation associated to
the problem is Hðt; x; w; πÞ ¼ erðTtÞ w þ 12 π0 aðtÞπ þ π0 bðt; xÞ þ dðt; xÞ if there exist a
N N symmetric matrix aðtÞ, a N-dimensional vector bðt; xÞ and a scalar function
dðt; xÞ satisfying
(1) The matrix Riccati ODE
@t a γðtÞσσ 0 þ aC1 a ¼ 0 (4:2)
with terminal condition aðTÞ ¼ 0.
(2) The vector-valued and the scalar linear parabolic PDEs
1
ð@t þ LX Þd þ b0 C1 b ¼ 0 (4:4)
2
with terminal conditions bðT; xÞ ¼ dðT; xÞ ¼ 0 and where LX is the infinitesimal
generator of X, acting coordinatewise.
The hypothesized optimal trading intensity at ðt; x; w; πÞ is then I ¼ C1 ðaðtÞπ þ bðt; xÞÞ.
(2) Moreover, under this condition the parabolic PDEs (4.3) and (4.4) have an unique
solution satisfying a polynomial growth condition in x, and this solution admits the
probabilistic representation
"ð ð s #
T
bðt; xÞ ¼ Et;x : exp a0 ðuÞC1 du : erðTsÞ ðAðμ Xs Þ rpÞds (4:5)
t t
"ð #
T
1 0
dðt; xÞ ¼ Et;x bðt; Xs Þ C1 bðt; Xs Þds (4:6)
2 t
Proposition 4.3 (Verification). Under the assumptions of the previous proposition, the
trading intensity given in Theorem 4.1 is indeed optimal with the choices
The interpretation of the above strategy (which is again explicit and hence easily
implementable in practice) is again intuitive and complementary to the infinite-horizon
model of Garleanu and Pedersen: in the presence of temporary quadratic transactions
costs, the investor trades with a certain decreasing rate RateðtÞ towards an aim portfolio
Aimðt; Xt Þ depending on the time and the mean-reversion state of the signals Xt . This
aim portfolio is given by a weighted average of the future optimal strategies in the
frictionless case, reflecting the fact that now trading is not free and thus to enter
a trade the investor must weight the future outcomes derived from the strategy.
Moreover, as shown in the above remark, the trading rate is bounded by 1 because of
the properties of tanh , depends on t unlike the infinite-horizon case, and is naturally
decreasing in the transaction cost parameter λ (or in general in C) and increasing in the
volatility aversion parameter γ.
Finally, regarding the influence of the factor model and the imposition of market
neutrality in this new setting, note that RateðtÞ is insensitive to it (since it only depends
on the risk aversion parameter γ, the volatility of the residual process σσ 0 , and the
transaction cost matrix C) and in Aimðt; xÞ it only appears through the term
Et;x ½FrictionlessðsÞ and hence only when considering the future optimal strategies in
the frictionless case, which has been described in section 3. Likewise, the residual process
Xs only affects the strategy through this same term and hence, as seen in section 3 when
studying these frictionless cases, only through the distance between this residual and its
historical mean, like in classical pairs trading.
344 J. GUIJARRO-ORDONEZ
A is diagonal with entries drawn i.i.d from a normal distribution of mean 0.5 and standard
deviation 0:1, and the coefficients of σ are drawn i.i.d from a uniform distribution in
½0:3; 0:3, except for the diagonal elements which are drawn from a uniform distribution
in ½0; 0:5. Furthermore, p ¼ 1 for the first simulations, and we will also perturb it later to
study different factor model regimes and the impact of imposing market neutrality. We
also fix a finite horizon of T ¼ 20 and a temporal grid 0 ¼ t0 < t1 < . . . tL ¼ T obtained by
discretizing ½0; T with constant Δt ¼ T=L ¼ 20=400 ¼ 0:5.
From a financial perspective, the above choice of parameters means that the 100
coordinates of X are correlated and mean-revert with similar speeds (given by the
eigenvalues of A) to an equilibrium of 0, describing an average number of approximately
10 oscillation cycles of ups and downs before the terminal time (given by the product of T
and the average mean-reversion speed). The choice of p ¼ 1 arises when the asset returns
themselves are mean-reverting and may be modelled directly by X so we can take Λ ¼ 0
in our factor model, while the perturbations of p will imply departing from this assump-
tion to factor models with heavier loadings, in which imposing market neutrality leads to
more leveraged positions. As an illustration, the reader may look at sample paths of the
first four coordinates of such a process X in Figure 1.
We then sample M ¼ 1; 000 paths of X on this grid exactly with standard Monte Carlo
techniques by using the fact that, since
ð tþΔt
AΔt AΔt
XtþΔt ¼ e Xt þ ðI e Þμ þ eAðΔtþtsÞ σdBs ;
t
and execute the following strategies6 at the corresponding times tl ‘s, with W0 ¼ π0 ¼ 0
and πt constant between consecutive times:
We finally present the simulated path of a sample wealth process ðWt Þt2½0;T , the
simulated path of the first coordinate of a sample allocation process ðπt Þt2½0;T , and the
histogram for the terminal wealth WT for each of the above cases in the following four
subsections, along with a final analysis:
346 J. GUIJARRO-ORDONEZ
(a) (b)
(c) (d)
(e) (f)
Figure 2. Results for the exponential utility.
APPLIED MATHEMATICAL FINANCE 347
Figure 5. Results for the three strategies above with different p‘s, when r ¼ 0:02; α ¼ 0; γ ¼ 1; λ ¼ 1.
(1) The most profitable strategy is the one derived from the exponential utility (Figure
2(e–f)) with the lowest risk-aversion parameter γ, even in the most adverse
scenarios of the histogram and both with and without zero interest rates.
350 J. GUIJARRO-ORDONEZ
Moreover, even for bigger values of γ this strategy significantly performs better
under any regime of r and α than the mean-variance strategy (Figure 3(g–i)).
(2) We observe the following outcomes when changing one of the parameters for each
of the three strategies (Figures 3–4(g–i), and 2(e–f)):
● Increasing the value of the risk-aversion parameter γ produces a concentration
of the density of WT around smaller values, i.e., the expected wealth decreases
and so does the dispersion around it.
● Increasing the dollar-neutrality penalty α has this same negative effect, but
makes little difference unless the increments in α are considerable.
● Increasing the value of the interest-rate r has an overall positive effect, which is
more pronounced in the mean-variance case (since as we mentioned at the end
of section 2.2 the investor is then bolder than the exponential agent).
● Increasing the transaction cost parameter λ decreases the expected terminal
wealth, but surprisingly it also skews its distribution producing a considerable
right-tail (whereas all the other distributions are essentially symmetric).
These outcomes have a natural interpretation: since the model is perfectly specified
and the parameters are known, the derived strategies will always produce benefits
by construction, and they will be bigger the fewer additional constraints we impose
(such as risk-aversion, dollar-neutrality, and transaction costs) and the more we
can take advantage of previous success (by increasing r). This situation, however,
might not apply under parameter misspecification, where the additional constrains
would help the investor mitigate the model risk.
(1) In the three strategies, after an initial period of ups and downs and similarity
between the different strategies, there is a tendency towards stabilization because
of the asymptotic properties of the Ornstein-Uhlenbeck process, and of differ-
entiation depending on the parametric choices.
(2) This phenomenon is especially pronounced with the exponential utility and with
bigger values of r (Figure 2(a,b)) since it takes more aggressive positions, reflecting
the fact that sometimes the agent will invest more money than what she will make
at that moment (and sometimes even having temporary negative wealth and
borrowing aggressively) to continue executing the strategy.
(1) The positions become more extreme when decreasing γ, α and λ (i.e., the risk-
aversion parameter, the non-dollar-neutrality penalty and the transaction cost
APPLIED MATHEMATICAL FINANCE 351
parameter) and when increasing r (the interest rate). The greatest overall impact is
produced by γ and λ and then r, especially in the mean-variance case for the same
reasons as before.
(2) The exponential-utility strategy takes much more extreme positions than the
mean-variance strategies, which in this idealized setting of perfect estimation
partially explains why the exponential agent obtains a greater wealth at the
terminal time.
(3) The cycles in the positions π1t match the oscillations of X1t depicted in Figure 1(d)
theoretically in the corresponding equations.
(1) As the parameter p gets bigger, the market neutral portfolios of section 2 become
more extreme and the adopted positions πt also become more aggressive, espe-
cially in the exponential-utility case (Figure 5(d–f)).
(2) Since the strategy is more aggressive but we have perfect calibration and estima-
tion, with bigger p the mean-variance and especially the exponential strategy
become more profitable. However, the wealth process also has more ups and
downs (Figure 5(a–c)), the standard deviation of the terminal wealth increases
considerably (Figure 5(g,h)), especially in the mean-variance case, and with the
biggest p there are also heavy losses when transaction costs are incorporated
(Figure 5(c–i)). The strategies are therefore riskier, but a relatively large value of
p is needed to appreciate its effect.
(3) Lastly, note that the influence of p on the strategies also depends most of the time
on the value of r, since they normally appear combined as a factor of rp in the
equations describing the strategies. In particular, when r ¼ 0 there is no theore-
tical effect associated to p (apart from possible model risk and high leverage in
a real-world setting) unless the dollar-neutrality parameter αðtÞÞ0.
of soft constraints on the admissible portfolios (like dollar-neutrality) and the presence
of temporary quadratic transaction costs. Finally, we have run some high-dimensional
Monte Carlo simulations to explore the behaviour of the previous strategies, and
analysed their qualitative aspects and their sensitivity to the relevant parameters and
the underlying factor model.
There are four natural extensions to our work, on which we are conducting research at
the moment and which we intend to publish in separate papers. First, one could
investigate a more realistic version of the problem in which, rather than in continuous
time, the investor may only trade more realistically at an increasing sequence of optimally
chosen stopping times, generalizing in multiple directions the literature initiated by the
influential work of Leung and Li (2015) and developing robust and efficient numerical
methods. Second, it would be interesting to study more realistic modelizations of market
frictions, illiquidity, and transaction costs, or to develop a model considering issues of
parameter misspecification. Third, on a more empirical side and as we mentioned at the
start of section 5, one should consider in this setting the problems of construction of the
factor models, high-dimensional parameter estimation, and risk control, along with (out-
of-sample) experiments with real market data under the strategies developed in this
paper. Fourth and finally, one could study a more data-driven version of the problem,
where the fixed stochastic model is replaced by new tools from reinforcement learning.
Notes
1. Here we have decided to write the factor model in a somewhat unusual differential,
continuous-time form in terms of the cumulative residuals and returns because of nota-
tional simplicity for this section of the paper. In practice, however, the factor model will be
estimated in discrete time, by replacing the differentials by the corresponding discrete
increments (so, for instance, dRt should be replaced by the daily, hourly, etc., asset returns,
dFt would be just the corresponding daily, hourly, etc., factors returns, and so forth). In any
case we will only use this notation and framework in this section of the paper, and the reader
may look at Avellaneda and Lee (2010) for essentially the same continuous/discrete time
framework and some estimation techniques. Note also that the constant loadings assump-
tion is realistic in short time horizons.
2. See Lettau and Pelger (2018) and Pelger and Xiong (2018) for some new versions of high-
dimensional PCA that might be particularly interesting for this problem.
3. The assumption that C is symmetric is without loss of generality, since if the transaction
~ t for a non-symmetric C,
costs are given by It0 CI ~ then one can see that by considering the
~ ~ ~
symmetric part of C (given by C :¼ ðC þ C Þ=2) we have that It0 CI
0 ~ t ¼ I 0 CIt .
t
4. and given by the solution of a matrix Riccati ODE specified in the Porposition 4.2 below.
5. Recall that the time-ordered exponential of a time-dependent matrix AðsÞ is defined
ð t
QP
as : exp AðsÞdsÞ :¼ limjjPjj#0 ni¼1 expðAðti ÞΔti , where P :¼ fu ¼ t0 ; t1 ; . . . ; tn ¼ tg
u
is a partition of ½u; t, Δti :¼ ti ti1 , and the product is ordered increasingly in time.
ð t ð t
If AðsÞ is a scalar, then obviously : exp AðsÞds :¼ exp AðsÞds .
u u
6. We have just simulated some simple cases of the previously discussed strategies for space
limitation reasons, but of course, it would also be possible to include further constraints (like
a leverage restriction, for instance) or time-varying hyperparameters with no additional
effort, by just using the previously derived formulae. It would be interesting as well to
APPLIED MATHEMATICAL FINANCE 353
execute the strategies with some perturbations of the real parameters to simulate possible
microstructural noise and imperfect estimation.
Acknowledgments
The author would like to thank George Papanicolaou for suggesting the topic of the previous
research and for many insightful discussions about the problem and the presentation of the results,
and the editor and an anonymous reviewer for their very helpful suggestions to improve the
quality of the paper.
Disclosure statement
No potential conflict of interest was reported by the author.
ORCID
Jorge Guijarro-Ordonez http://orcid.org/0000-0002-6453-6563
References
Almgren, R., and N. Chriss. 2001. “Optimal Execution of Portfolio Transactions.” Journal of Risk 3:
5–40. doi:10.21314/JOR.2001.041.
Avellaneda, M., and J. H. Lee. 2010. “Statistical Arbitrage in the US Equities Market.” Quantitative
Finance 10 (7): 761–782. doi:10.1080/14697680903124632.
Benth, F. E., and K. H. Karlsen. 2005. “A Note on Merton’s Portfolio Selection Problem for the
Schwartz Mean-reversion Model.” Stochastic Analysis and Applications 23 (4): 687–704.
doi:10.1081/SAP-200064457.
Bertsimas, D., and A. Lo. 1998. “Optimal Control of Execution Costs.” Journal of Financial
Markets 1: 1–50. doi:10.1016/S1386-4181(97)00012-8.
Bismuth, A., O. Guéant, and J. Pu. 2019. “Portfolio Choice, Portfolio Liquidation, and Portfolio
Transition under Drift Uncertainty.” Mathematics and Financial Economics 13 (4): 661–719.
doi:10.1007/s11579-019-00241-1.
Boyd, S., E. Busseti, S. Diamond, R. Kahn, K. Koh, P. Nystrup, and J. Speth. 2017. “Multiperiod
Trading via Convex Optimization.” Foundations and Trends in Optimization 3 (1): 1–76.
doi:10.1561/2400000023.
Brendle, S. 2006. “Portfolio Selection under Incomplete Information.” Stochastic Processes and
Their Applications 116 (5): 701–723. doi:10.1016/j.spa.2005.11.010.
Cartea, Á., L. Gan, and S. Jaimungal. 2018. “Trading Cointegrated Assets with Price Impact.”
Mathematical Finance. Forthcoming.
Cartea, Á., and S. Jaimungal. 2016. “Algorithmic Trading of Co-integrated Assets.”
International Journal of Theoretical and Applied Finance 19 (06): 165038. doi:10.1142/
S0219024916500382.
Cartea, Á., S. Jaimungal, and J. Peñalva. 2015. Algorithmic and High Frequency Trading.
Cambridge: Cambridge University Press.
Chiu, M. C., and H. Y. Wong. 2011. “Mean-variance Portfolio Selection of Cointegrated Assets.”
Journal of Economic Dynamics and Control 35: 1369–1385. doi:10.1016/j.jedc.2011.04.003.
Duffie, D., D. Filipovic, and W. Schachermayer. 2003. “Affine Processes and Applications in
Finance.” The Annals of Applied Probability 13 (3): 984–1053. doi:10.1214/aoap/1060202833.
Fouque, J.-P., A. Papanicolaou, and R. Sircar. 2015. “Filtering and Portfolio Optimization with
Stochastic Unobserved Drift in Asset Returns.” Communications in Mathematical Sciences 13
(4): 935–953. doi:10.4310/CMS.2015.v13.n4.a5.
354 J. GUIJARRO-ORDONEZ
Garleanu, N., and L. H. Pedersen. 2013. “Dynamic Trading with Predictable Returns and
Transaction Costs.” The Journal of Finance 68 (6): 23092340. doi:10.1111/jofi.12080.
Garleanu, N., and L. H. Pedersen. 2016. “Dynamic Portfolio Choice with Frictions.” Journal of
Economic Theory 164: 487–516. doi:10.1016/j.jet.2016.06.001.
Guyon, J., and P. H. Labordère. 2013. Nonlinear Option Pricing. Boca Raton: Chapman and Hall/
CRC.
Jurek, J. W., and H. Yang 2007. “Dynamic Portfolio Selection in Arbitrage.” Working Paper,
Harvard University. doi:10.1094/PDIS-91-4-0467B
Kitapbayev, Y., and T. Leung. 2018. “Mean Reversion Trading with Sequential Deadlines and
Transaction Costs.” International Journal of Theoretical and Applied Finance 21 (1): 1850004.
doi:10.1142/S0219024918500048.
Kratz, D.-M. P. 2011. “Optimal Liquidation in Dark Pools in Discrete and Continuous Time.” Ph.
D. thesis, Humboldt-Universitat zu Berlin.
Lei, Y., and J. Xu. 2015. “Costly Arbitrage through Pairs Trading.” Journal of Economic Dynamics
and Control 56: 119. doi:10.1016/j.jedc.2015.04.006.
Lettau, M., and M. Pelger. 2018. “Estimating Latent Asset-pricing Factors.” Working Paper,
Stanford University.
Leung, T., and X. Li. 2015. “Optimal Mean Reversion Trading with Transaction Costs and
Stop-loss Exit.” International Journal of Theoretical and Applied Finance 18 (3): 1–31.
doi:10.1142/S021902491550020X.
Liang, Z., K. C. Yuen, and J. Guo. 2011. “Optimal Proportional Reinsurance and
OrnsteinUhlenbeck Process.” Insurance: Mathematics and Economics 49 (2): 207215.
Lintilhac, P., and A. Tourin. 2016. “Model-based Pairs Trading in the Bitcoin Markets.”
Quantitative Finance 17 (5): 703–716. doi:10.1080/14697688.2016.1231928.
Liu, J., and A. Timmermann. 2013. “Optimal Convergence Trade Strategies.” Review of Financial
Studies 26 (4): 10481086. doi:10.1093/rfs/hhs130.
Moreau, L., J. Muhle-Karbe, and H. M. Soner. 2017. “Trading with Small Price Impact.”
Mathematical Finance 27 (2): 350–400. doi:10.1111/mafi.2017.27.issue-2.
Moutari, S., A. N. Sandjo, and F. Colin. 2017. “An Explicit Solution for a Portfolio Selection
Problem with Stochastic Volatility.” Journal of Mathematical Finance 7: 199–218. doi:10.4236/
jmf.2017.71011.
Mudchanatongsuk, S., J. A. Primbs, and W. Wong. 2008. “Optimal Pairs Trading: A Stochastic
Control Approach.” 2008 American Control Conference, Seattle, WA, USA. 1035–1039.
Muhle-Karbe, J., R. Liu, and M. Weber. 2017. “Rebalancing with Linear and Quadratic Costs.”
SIAM Journal on Control and Optimization 55 (6): 3533–3563. doi:10.1137/15M1043406.
Ngo, M. M., and H. Pham. 2016. “Optimal Switching for Pairs Trading Rule: A Viscosity Solutions
Approach.” Journal of Mathematical Analysis and Applications 441 (1): 403425. doi:10.1016/j.
jmaa.2016.03.060.
Obizhaeva, A., and J. Wang. 2013. “Optimal Trading Strategy and Supply/demand Dynamics.”
Journal of Financial Markets 16 (1): 1–32. doi:10.1016/j.finmar.2012.09.001.
Papanicolaou, G., and J. Yeo. 2017. “Risk Control of Mean-reversion Time in Statistical Arbitrage.”
Risk and Decision Analysis 6: 263–290.
Pelger, M., and R. Xiong. 2018. “Interpretable Proximate Factors for Large Dimensions.” Working
Paper, Stanford University.
Rogers, L. C. G., and S. Singh. 2010. “The Cost of Illiquidity and Its Effects on Hedging.”
Mathematical Finance 20 (4): 597–615. doi:10.1111/mafi.2010.20.issue-4.
Tourin, A., and R. Yan. 2013. “Dynamic Pairs Trading Using the Stochastic Control Approach.”
Journal of Economic Dynamics and Control 37 (10): 1972–1981. doi:10.1016/j.jedc.2013.05.010.
APPLIED MATHEMATICAL FINANCE 355
Appendix. Proofs
A.1 Proof of Theorem 3.1
As we mentioned, the techniques that we use to solve the HJB equation are classical and have been
addressed in the literature, so we just indicate the key steps for the reader’s convenience and refer
to some of the existing papers for more detail (cf., for example, the proofs of section 3.1 of
Bismuth, Guéant, and Pu (2019) for a similar PDE but in the context of portfolio choice under
a geometric Brownian motion with stochastic drift, or Benth and Karlsen (2005), Liang, Yuen, and
Guo (2011) and Tourin and Yan (2013) for related equations in the case of one or two assets).
1 DH 0 ðσσ 0 Þ1 DH
0 ¼ @t H þ ðAðμ xÞÞ0 Ñx H þ Trðσσ 0 Ñxx HÞ þ wr@w H : (A:1)
2 2@ww H
Considering now the classical ansatz Hðt; x; wÞ ¼ expðγðwerðTtÞ þ hðt; xÞÞÞ for some func-
tion hðt; xÞ to be determined and such that hðT; xÞ ¼ 0, we get rid almost miraculously of the non-
linearity and obtain the ðN þ 1Þ-dimensional linear parabolic equation,
1 1
0 ¼ @t h þ Trðσσ 0 Ñxx hÞ þ rp0 Ñx h þ ðAðμ xÞ prÞ0 ðσσ 0 Þ1 ðAðμ xÞ prÞ:
2 2γ
Finally, we solve this explicitly by using the Feynman-Kac formula, yielding the probabilistic
representation for h given in the proposition’s statement and the closed-form expression,
1
hðt; xÞ ¼ ðAμ prÞ0 ðσσ 0 Þ1 ðAμ prÞðT tÞ
2γ
ð T ð T
1 1 1
ðAμ prÞ0 ðσσ 0 Þ1 AEt;x Ys ds þ Et;x Ys0 A0 ðσσ 0 Þ AYs ds ;
γ t 2γ t
where
ð T ðT
ðT tÞ2
Et;x Ys ds ¼ Et;x ½Ys ds ¼ xðT tÞ þ rp
t t 2
and
ð T
1
Et;x Ys0 A0 ðσσ 0 Þ AYs ds ¼ x0 A0 ðσσ 0 Þ1 AxðT tÞ þ
t
ðT tÞ2 ðT tÞ3
1 1
þ 2x0 A0 ðσσ 0 Þ Arp þ Trðσ 0 A0 ðσσ 0 Þ AσÞ þ r2 p0 A0 ðσσ 0 Þ1 Ap ;
2 3
using that Ys ¼ x þ rpðs tÞ þ σðBs Bt Þ for s t and
E ½ðBs Bt Þ0 σ 0 A0 ðσσ 0 Þ1 AσðBs Bt Þ ¼ ðs tÞTrðσ 0 A0 ðσσ 0 Þ1 AσÞ:
□
Proof of Proposition 3.2:
Following the mentioned literature, we just have to check that π 2 A½0;T and that the function H
derived in Proposition 3.1 is indeed the value function of the stochastic control problem.
356 J. GUIJARRO-ORDONEZ
As for the first issue, from its explicit expression π is obviously F t -adapted and predictable (in
fact, it has continuous paths) and, using the trivial inequalities jjx þ yjj2 2jjxjj2 þ 2jjyjj2 and
ðT
jjAxjj jjAjjjjxjj and the fact that Xt is a Gaussian process, it is easy to see that E½jjπs jj2 ds < 1.
0
Moreover, applying Ito’s formula to the process ert Wt yields,
for any t 0 and any admissible control π. Thus, the SDE for W has a unique strong solution W
for the particular case π ¼ π for any initial data, given by the above integral.
As for the second part, we simply adapt the proof of Theorem 2.1. of Lintilhac and Tourin
(2016) for a related model, which guarantee the uniform P-integrability of the family of random
variables ðHðτ; Xτ ; Wτ ÞÞτ2½0;T where τ is a F -stopping time, and which we simply adapt to the
parameters of the present model obtaining the sufficient conditions stated in Proposition 3.2.
The key observation to adapt their proof is that in our case we also have that the hypothesized
value function is of the form Hðt; x; wÞ ¼ expðγwerðTtÞ 12 x0 A2 ðtÞx A1 ðtÞx A0 ðtÞÞ for
some explicit smooth functions Ai ðtÞ that we computed in the proof of Proposition 3.1, and our X
is also a matrix Ornstein-Uhlenbeck process under P with SDE dXt ¼ Aðμ Xt Þdt þ σdBt , and
ðτ ðτ
γWτ erðTτÞ ¼ γwerðTτÞ þ γ πs erðTsÞ ðAðμ Xs Þ prÞds þ γ πs erðTsÞ σdBs
0 0
as we showed in (A.2). Thus, using the Cauchy–Schwarz inequality as in their proof, the part
corresponding to 12 Xτ0 A2 ðτÞXτ A1 ðτÞXτ A0 ðτÞ in the above expression for Hðτ; Xτ ; Wτ Þ
may be bounded exactly as they do. As for the part corresponding to γWτ erðTτÞ , we can again
repeat their exact reasoning, but noting that the quadratic term in Xs in the first integral above is
now Xs0 C0 ðsÞXs for the matrix C0 ðsÞ that we defined before, and likewise, the term in Xs in
the second integral is Xs0 C1 ðsÞ, which following their proof gives, respectively, the two explicit
sufficient conditions that we stated in Proposition 3.2. ⁏
1 1 e2rðTtÞ
0 ¼ @t a þ ðμ0 A0 b þ b0 AμÞ þ Trðσσ 0 cÞ þ ðAμ prÞ0 ðγðtÞσσ 0 Þ1 ðAμ prÞ
2 2 2
with terminal conditions aðTÞ ¼ bðTÞ ¼ cðTÞ ¼ 0.
This system has an explicit bounded solution in ½0; T, since the classical solutions of the general
first-order linear matrix ODEs @t y þ uy þ vðtÞ ¼ 0 and @t y þ uy þ yu0 þ vðtÞ ¼ 0 with yðTÞ ¼ 0
are given, respectively by,
ðT ðT
yðtÞ ¼ expððs tÞuÞvðsÞds and yðtÞ ¼ expððs tÞuÞvðsÞ expððs tÞu0 Þds
t t
@t a þ aC1 a ¼ 0
with terminal condition aðTÞ ¼ 0 has the obvious symmetric solution aðtÞ ¼ 0 defined on
all ½0; T. Thus, (4.2) has a symmetric classical solution aðtÞ defined on all ½0; T with a 0,
which is bounded because ½0; T is compact and a is differentiable hence continuous.
As for the particular solution when γðtÞ ¼ γ, simply note that pre- and post-multiplying
(4.2) by C1=2 and defining ~a :¼ C1=2 aC1=2 gives the new Riccati,
theorem (see, for example, Appendix A.3 of Cartea, Gan, and Jaimungal (2018) for
a proof of how to adapt the one-dimensional case).
The fact that b has linear growth in x uniformly in t is then a consequence of the
probabilistic representation (4.5). Indeed, Fubini’s theorem implies that,
ðT ð s
bðt; xÞ ¼ : exp a0 ðuÞC1 du : erðTsÞ ðAEt;x ½μ Xs rpÞds
t t
yields,
and this π in turn defines W like in the proof of Theorem 3.1.
Finally, from the above construction it is obvious that both πt and It are F t -adapted and
predictable (in fact, they have continuous paths), and the property that π is in L2 ð½0; T ΩÞ (i.e.,
ðT
that E½jjπs jj2 ds < 1) stems from the observation that RateðuÞ is deterministic and bounded
0
(because of Proposition 4.3.1), Aimðt; xÞ has linear growth in x uniformly in t (by Proposition
4.3.2), and X is a Gaussian process (so it is in L2 ð½0; T ΩÞ).
It is likewise in L2 ð½0; T ΩÞ since, as we saw in Proposition 4.1, It ¼ C1 ðaðtÞπt þ bðt; Xt ÞÞ
and we can therefore use the triangular inequality, the just shown fact that πt is in L2 ð½0; T ΩÞ,
and the same arguments as above that aðtÞ is bounded (because of Proposition 4.3.1), that bðt; xÞ
has linear growth in x uniformly in t (by Proposition 4.3.2), and that X is a Gaussian process, to
conclude. □