0% found this document useful (0 votes)
28 views10 pages

On Simultaneous Long-Short Stock Trading Controller

This paper introduces a novel architecture for simultaneous long-short (SLS) stock trading by cross-coupling two SLS controllers, which allows for the exploitation of correlations between two stocks. It derives a closed-form expression for the expected value of the gain-loss function and proves that the Robust Positive Expectation (RPE) property holds for a wide range of stock price dynamics. The findings suggest that this cross-coupled approach can reduce trading risk compared to independent SLS controllers when additional information about stock returns is available.

Uploaded by

Rafael Judson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views10 pages

On Simultaneous Long-Short Stock Trading Controller

This paper introduces a novel architecture for simultaneous long-short (SLS) stock trading by cross-coupling two SLS controllers, which allows for the exploitation of correlations between two stocks. It derives a closed-form expression for the expected value of the gain-loss function and proves that the Robust Positive Expectation (RPE) property holds for a wide range of stock price dynamics. The findings suggest that this cross-coupled approach can reduce trading risk compared to independent SLS controllers when additional information about stock returns is available.

Uploaded by

Rafael Judson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

On Simultaneous Long-Short Stock Trading

Controllers with Cross-Coupling


Atul Deshpande ∗ John A. Gubner ∗ B. Ross Barmish ∗∗

Department of Electrical and Computer Engineering,
University of Wisconsin, Madison, WI 53706.
email: [email protected]; [email protected]
∗∗
Department of Electrical and Computer Engineering,
Boston University, Boston, MA 02215.
email: [email protected]
arXiv:2011.09109v1 [q-fin.ST] 18 Nov 2020

Abstract: The Simultaneous Long-Short (SLS) controller for trading a single stock is known to
guarantee positive expected value of the resulting gain-loss function with respect to a large class
of stock price dynamics. In the literature, this is known as the Robust Positive Expectation (RPE)
property. An obvious way to extend this theory to the trading of two stocks is to trade each one
of them using its own independent SLS controller. Motivated by the fact that such a scheme
does not exploit any correlation between the two stocks, we study the case when the relative sign
between the drifts of the two stocks is known. The main contributions of this paper are three-
fold: First, we put forward a novel architecture in which we cross-couple two SLS controllers
for the two-stock case. Second, we derive a closed-form expression for the expected value of the
gain-loss function. Third, we use this closed-form expression to prove that the RPE property is
guaranteed with respect to a large class of stock-price dynamics. When more information over
and above the relative sign is assumed, additional benefits of the new architecture are seen. For
example, when bounds or precise values for the means and covariances of the stock returns are
included in the model, numerical simulations suggest that our new controller can achieve lower
trading risk than a pair of decoupled SLS controllers for the same level of expected trading gain.

Keywords: Finance, Robustness, Stochastic Control, Uncertain Dynamic Systems.

1. Introduction paths such as Dokuchaev and Savkin [2004], Dokuchaev


[2002], Dokuchaev and Savkin [2002], and model-specific
The starting point for this paper is the fact that the trading strategies such as Deshpande and Barmish [2016],
so-called Simultaneous Long-Short (SLS) stock trading Markowitz [1952], Song and Zhang [2013], Zhang [2001].
controller, see Barmish [2011], Barmish and Primbs [2011, In addition to the work in Barmish [2011], Barmish and Primbs
2016], Baumann and Grüne [2017], Deshpande and Barmish [2011, 2016], Baumann and Grüne [2017], Deshpande and Barmish
[2018], Malekpour and Barmish [2016], guarantees satis- [2018], Malekpour and Barmish [2016], other contribu-
faction of the Robust Positive Expectation (RPE) property, tions to the SLS theory involve robustness results with re-
which means the following: The trading gain-loss function spect to stock prices having time-varying drift and volatil-
is guaranteed to have positive expected value for a broad ity Primbs and Barmish [2017], prices generated from
class of stock-price processes. In this paper, we go beyond Merton’s diffusion model Baumann [2017], generalization
the single-stock results cited above and pursue this theme to the case of PI controllers Malekpour et al. [2018], and
in a more general two-stock trading scenario. To this end, discrete-time systems with delays Malekpour and Barmish
we introduce Cross-Coupled SLS controllers to exploit a [2016]. More recently, in O’Brien et al. [2018], the authors
“correlation” between the stocks. For this new controller, generalize the RPE Theorem to the case of an SLS con-
we prove an RPE theorem which holds when the sign troller which can have different parameters for the long
of the cross-coupling coefficient is chosen appropriately. and short sides of the trade and suggest procedures for
When additional information about the price processes controller parameter selection to minimize trading risk
is assumed, our numerical examples suggest that cross- based on historical data. In Maroni et al. [2019], the au-
coupled SLS controllers can achieve lower trading risk than thors start with a problem formulation which treats prices
a pair of decoupled SLS controllers for the same target as if they are disturbances, as in Barmish [2008], and
value of the expected trading gain. obtain the SLS controller parameters as the solution of
For an SLS controller trading a single stock, the key idea an appropriately constructed H∞ optimization problem.
in existing literature involves generating the investment A noticeable attribute of the SLS literature is that it ad-
level in the stock from calculations based on hypothetically dresses single-stock trading scenarios. For the multi-stock
holding both long and short positions at the same time. case, the obvious approach for using existing results would
This is accomplished using two complementary controllers. be to independently trade each stock using its own SLS
The associated RPE results, obtained using linear feed- controller, without exploiting any information about their
back, differ from earlier work which is based on sample
price correlation. Influenced by these considerations, the at stages k = 0, 1, . . . , N − 1, with the assumption that
innovation in Deshpande and Barmish [2018] is to trade the return vectors [ρ1 (k) ρ2 (k)]T are independent
one stock with a long-only linear feedback and the other and identically distributed. The mean values of the re-
. .
with a short-only linear feedback instead of using two sepa- turns µ1 = E[ρ1 (k)] and µ2 = E[ρ2 (k)] are unknown to
rate SLS controllers. Additionally, a strong assumption on the trader. Only the relative sign between the two means,
the price relationships between the two stocks is made. In namely sign(µ1 µ2 ), is assumed to be known. For instance,
contrast to the aforementioned, in this paper we impose if the two stocks are from the same sector, it is often
a much weaker assumption. Specifically, we assume that the case that they tend to move in the same direction;
only the relative sign between the underlying drifts of the i.e., sign(µ1 µ2 ) = 1, over the medium to long term; e.g.,
two stock prices is known. We then put forward a new see King [1966]. Similarly, when assets in a portfolio are
architecture that cross-couples two SLS controllers to take negatively correlated; e.g., see Irwin and Landa [1987], we
advantage of this relative-sign information. assume sign(µ1 µ2 ) = −1.
In comparison to existing SLS literature, our new control
Idealized Market Assumptions: In the theory to fol-
architecture includes an extra degree of freedom: a cross-
low, consistent with existing SLS literature, an idealized
coupling feedback parameter γ, which forces interactions
market is assumed. That is, transaction costs such as
between the two SLS controllers. In addition to the in-
brokerage, commissions, taxes, or fees levied by the stock
troduction of this novel trading architecture, the main
exchange, are not incurred. In addition, we assume perfect
theoretical contributions in this paper are results related to
liquidity so that there is no gap between the bid and
the expected value of the trading gain-loss function. First,
ask prices, and the trader can buy or sell any number
we provide a closed-form expression for the expected value
of shares, including fractions, at the market price. These
of the trading gain-loss function. Subsequently, we prove
assumptions are similar to those made in the context of
that for a range of γ, satisfaction of the RPE property
“frictionless markets” in finance literature; e.g., see Merton
is guaranteed with respect to a large class of stochastic
[1990].
processes for the stock prices. We also establish a recursive
formula to calculate the variance of the gain-loss function. Leverage and Interest: In practice, the broker usually
Under strengthened assumptions that additional informa- imposes limits on the trading account leverage. For our
tion about the stock prices is known over and above the theoretical analysis, however, we assume that leverage
relative sign between the mean returns, we demonstrate limits are not in play. That is, the trader has sufficient
via a numerical simulation example that there can be account resources to hold any desired position in the
performance benefits due to the use of cross-coupling. In stocks. In Section 8, when we provide a numerical example,
our example, using an assumed price model with known we study the practical implications of a leverage constraint
means and variances of the stock-price returns, an opti- and suggest further research on this issue in Section 9. We
mized cross-coupled architecture achieves lower risk than also assume that the margin interest and the risk-free rates
two similarly optimized independent SLS controllers. The of return are zero; we defer consideration of nonzero rates
methodology used in the numerical example can be easily to future research.
adapted to evaluate performance benefits when the price
model assumed is not precise. For example, when the drifts
and volatilities of the price processes are characterized 3. Two Independent SLS Controllers
with bounds instead of precise values, minimax optimiza- To provide context for the analysis and main results to
tion of the controller design is still possible. follow, we first elaborate on the obvious way that existing
Additionally, in our numerical example, we consider the ac- single-stock SLS theory might be applied to the two-stock
count leverage resulting from the use of the cross-coupled case. As discussed in Section 1, one can simply design
controller. For the specific case of Geometric Brownian two decoupled SLS controllers: one for the first stock and
Motion prices, along most sample paths, trading with the another for the second. Proceeding in this manner, the net
optimal cross-coupled controller results in lower account investment levels I1 (k) and I2 (k) in the stocks at stage k
leverage than that obtained with optimal independent are obtained as sums
SLS controllers. For scenarios with a limit on the trading I1 (k) = I1L (k) + I1S (k); I2 (k) = I2L (k) + I2S (k),
account leverage, we see that a “saturated” implementation
where IiL (k) and IiS (k) for i = 1, 2, are the nominally long
of our cross-coupled controller still results in trading gains
and short positions in the i-th stock, each obtained using a
with a positive sample mean.
linear feedback controller. That is, with initial investment
levels I01 > 0 and I02 > 0 and feedback parameters K1 > 0
2. Two-Stock Trading Scenario and K2 > 0, the long and short investment functions are
given respectively as
In this section, we describe our two-stock trading setup,
IiL (k) = I0i + Ki giL (k); IiS (k) = −I0i − Ki giS (k),
including the assumptions which are in force.
for i = 1, 2, where the cumulative gain-loss functions re-
Stock Price Dynamics: We consider two stocks with sulting from individual long and short positions in each
stochastically varying prices S1 (k) and S2 (k) having as- stock are obtained using the gain-loss update equations
sociated returns giL (k + 1) = giL (k) + IiL (k)ρi (k);
. S1 (k + 1) − S1 (k) . S2 (k + 1) − S2 (k) giS (k + 1) = giS (k) + IiS (k)ρi (k)
ρ1 (k) = ; ρ2 (k) =
S1 (k) S2 (k)
for i = 1, 2, with g1L (0) = g1S (0) = g2L (0) = g2S (0) = 0. In Then, the gain-loss update equations become
the sequel, we refer to the above as the 2-SLS controller. x(k + 1) = A(k)x(k) + b(k)u(k);
Now, the overall trading gain-loss function g(k) for this .
setup is given by y(k) = cT x(k)
. where
g(k) = g1L (k) + g1S (k) + g2L (k) + g2S (k).
1 + K1 ρ1 (k) −γK2 ρ1 (k) 0 0
 
Applying existing results as in Deshpande and Barmish  γK1 ρ2 (k) 1 − K2 ρ2 (k) 0 0
A(k) =  ,

[2018] to each of the two stocks individually, we arrive 0 0 1 − K1 ρ1 (k) γK2 ρ1 (k) 
at 0 0 −γK1 ρ2 (k) 1 + K2 ρ2 (k)
2
X I0i  T
b(k) = [I01 ρ1 (k) −I02 ρ2 (k) −I01 ρ1 (k) I02 ρ2 (k)] ,
(1 + Ki µi )N + (1 − Ki µi )N − 2 ,

E [g(N )] =
K i
i=1 and constant input u(k) ≡ 1. Since x(0) = 0, the standard
which is positive for N > 1, and µ1 , µ2 not both zero. solution for g(N ) is
N
X −1
g(N ) = y(N ) = cT Φ(N, k + 1)b(k)u(k),
4. Cross-Coupling and State Equations k=0
In this section, we describe the main technical novelty of where the state transition matrix Φ(k, k0 ) from stage k0
this paper: a new architecture for trading which involves to k ≥ k0 is given by
cross-coupling between two single-stock SLS controllers. 
This is achieved by augmenting each of the four linear . A(k − 1) · · · A(k0 + 1) · A(k0 ) for k > k0 ;
Φ(k, k0 ) =
investment functions of Section 3 with a coupling term I4×4 for k = k0 .
having feedback gain −1 < γ < 1 to obtain Taking expectations, we obtain
IiL (k) = I0i + Ki giL (k) − γKj gjS (k); N
X −1

IiS (k) = −I0i − Ki giS (k) + γKj gjL (k). E [g(N )] = cT ĀN −1−k b̄,
k=0
for i, j ∈ {1, 2}; i 6= j. We refer to this as the Cross-
Coupled SLS (CC-SLS) controller. When γ = 0, we recover where
1 + K1 µ1 −γK2 µ1 0 0
 
the decoupled 2-SLS controller and the corresponding
results stated in Section 3. .  γK1 µ2 1 − K2 µ2 0 0
Ā = E [A(k)] = 

0 0 1 − K1 µ1 γK2 µ1 
To provide some insight into the operation of the CC-SLS 0 0 −γK1 µ2 1 + K2 µ2
controller, we consider the case when the drifts µ1 and µ2
as well as γ are positive. For this case, we expect g1L (k) and
. T
and g2L (k) to both be positive, with g1S (k) and g2S (k) both b̄ = E [b(k)] = [I01 µ1 −I02 µ2 −I01 µ1 I02 µ2 ] .
negative. This leads to I1L (k) and I2L (k) being greater
than would be the case if γ = 0; i.e., greater than the long-
investment levels in the 2-SLS counterpart. Another case 5. Main Results
which can be similarly analyzed is encountered when the
first stock follows a sample path with a positive trend, In this section, we provide two theorems related to the
but the second stock does not, so that g2S (k) is positive; expected value E [g(N )] of the overall gain-loss func-
resulting in a smaller I1L (k) than would be the case tion at stage N . The first theorem gives us the formula
without coupling. More generally, the CC-SLS controller for E [g(N )]. Following this, the second theorem gives
invests more aggressively or less aggressively than its 2- us conditions under which E [g(N )] > 0. For simplicity of
SLS counterpart, depending on the extent to which the the proofs, we assume that both µ1 and µ2 are nonzero.
stock behaviors are consistent with their drifts. However, by separately considering the case when one of
these two drifts vanish, it is easy to see that E [g(N )] > 0 in
Gain-Loss Update Equations: Substituting the formu- this situation, except for the break-even case when both µ1
lae for the relevant CC-SLS investment functions into each and µ2 are zero.
of the four gain-loss update equations in Section 3, we To obtain a formula for E [g(N )], we use the following
obtain the closed-loop equations notation. For K1 > 0, K2 > 0, and 0 < |γ| < 1, we define
giL (k + 1) = (1 + Ki ρi (k))giL (k) − γKj ρi (k)gjS (k) + I0i ρi (k); . p
θ = (K1 µ1 + K2 µ2 )2 − 4γ 2 K1 K2 µ1 µ2 ,
giS (k + 1) = (1 − Ki ρi (k))giS (k) + γKj ρi (k)gjL (k) − I0i ρi (k) .
α1 = (θ − K1 µ1 + K2 µ2 )/2,
for i, j ∈ {1, 2}; i 6= j, with overall trading gain-loss func- .
α2 = (θ + K1 µ1 − K2 µ2 )/2,
tion g(k) = g1L (k) + g1S (k) + g2L (k) + g2S (k). .
β1 = (K1 µ1 + K2 µ2 + θ),
.
State-Space Representation: We work with a state- β2 = (K1 µ1 + K2 µ2 − θ),
space representation of the CC-SLS controller to derive our and the function
main results on robust positivity of E [g(N )]. With state .
φN (x) = (1 + x)N + (1 − x)N − 2,
. T
x(k) = [g1L (k) g2S (k) g1S (k) g2L (k)] which is positive for all x 6= 0 and N > 1.
.
and c = [1 1 1 1]T , the output of interest is
Expected Value Theorem: Suppose two stocks with
g(k) = cT x(k). stochastically varying prices S1 (k) and S2 (k) with mean
returns µ1 and µ2 are traded using the Cross-Coupled SLS −I02 µ2 (β1 + 2γK2 µ1 ) − I01 µ1 (β2 + 2γK1 µ2 )
 
controller with K1 > 0, K2 > 0, and coupling coefficient 1  I02 µ2 (β2 + 2γK2µ1 ) + I01 µ1 (β1 + 2γK1 µ2 ) 
satisfying 0 < |γ| < 1. Then, for µ1 and µ2 nonzero, the D= .
2θ −I02 µ2 (β2 + 2γK2 µ1 ) − I01 µ1 (β1 + 2γK1 µ2 )

expected value of the gain-loss function is given by I02 µ2 (β1 + 2γK2µ1 ) + I01 µ1 (β2 + 2γK1 µ2 )
"
E [g(N )] =
1 2γµ1 µ2 (I01 K1 + I02 K2 ) + I02 µ2 β1 + I01 µ1 β2
· φN (α1 )
Then the summation above for E [g(N )] simplifies to the
2θ α1 claimed closed-form expression. ✷
#
2γµ1 µ2 (I01 K1 + I02 K2 ) + I02 µ2 β2 + I01 µ1 β1 Remarks: We observe that the expected value of the gain-
+ · φN (α2 ) .
α2 loss function is of the form
E [g(N )] = C1 · φN (α1 ) + C2 · φN (α2 ),
Proof: For µ1 , µ2 6= 0 and coupling coefficient 0 < |γ| < 1,
we diagonalize the block-diagonal matrix Ā defined in where C1 and C2 are independent of N . This is similar
Section 4 to obtain in form to the result given for two independent SLS
controllers in Section 3, that is,
Ā = P ΛP −1 ,
I I
where E [g(N )] = 01 φN (K1 µ1 ) + 02 φN (K2 µ2 ).
2-SLS K1 K2
β2 β1
 
0 0 In the theorem to follow, we use the closed-form expression
 2γK1 µ2 2γK1 µ2
for E [g(N )] to prove that if sign(γ) = sign(µ1 µ2 ), the RPE

.  1 1 0 0
 
P =
 property of the CC-SLS controller is guaranteed.
β1 β2 
 0 0 
2γK1 µ2 2γK1 µ2 Robust Positive Expectation Theorem: Suppose two
 
0 0 1 1 stocks with stochastically varying prices S1 (k) and S2 (k)
is composed of the eigenvectors of Ā as its columns, and with nonzero mean returns µ1 and µ2 are traded using
. the Cross-Coupled SLS controller with coupling coefficient
Λ = diag (1 − α1 , 1 + α2 , 1 − α2 , 1 + α1 )
satisfying 0 < |γ| < 1 and sign(γ) = sign(µ1 µ2 ). Then, for
is the diagonal matrix with the corresponding eigenvalues any N > 1, robust satisfaction of the condition
of Ā. Note that the standing assumptions assure that α1
E [g(N )] > 0
and α2 are nonzero.
is guaranteed.
Rewriting the expression for E [g(N )] in terms of P and Λ,
we obtain Proof: Beginning with the formula obtained for E [g(N )]
N
X −1 and rearranging, it suffices to show that the following three
E [g(N )] = cT ĀN −1−k b̄ inequalities hold:
k=0
φN (α1 ) · (I02 µ2 β1 + I01 µ1 β2 )
N −1 > 0;
= cT
X
P ΛN −1−i P −1 b̄
 α1
φN (α2 ) · (I02 µ2 β2 + I01 µ1 β1 )
i=0 > 0;
= cT P ΛS P −1 b̄, α2 !
where the diagonal matrix ΛS is given by φN (α1 ) φN (α2 )
2γµ1 µ2 (I01 K1 + I02 K2 ) + ≥ 0.
.
 N N N N
(1 − α1 ) − 1 (1 + α2 ) − 1 (1 − α2 ) − 1 (1 + α1 ) − 1
 α1 α2
ΛS = diag , , , .
−α1 α2 −α2 α1
For arbitrary admissible pair µ1 6= 0 and µ2 6= 0, we verify
Since E [g(N )] is a scalar, we write the satisfaction of the first two inequalities above for the
E [g(N )] = cT P ΛS P −1 b̄ = tr cT P ΛS P −1 b̄ , cases enumerated in Table 1. In each row of the table, we

consider a possible combination of the signs of µ1 and µ2 .
where tr(·) is the trace operator, and its cyclic prop- Each combination determines the range of possible values θ
erty Strang [2009] gives us can take, which in turn dictates the signs of α1 , α2 , β1
E [g(N )] = tr(cT P ΛS P −1 b̄) and β2 . Using these in conjunction with the positivity
= tr(P ΛS P −1 b̄cT ) of φN (αi ) for N > 1 establishes the first two inequalities.
= tr(ΛS P −1 b̄cT P ) To prove the third inequality holds, given that
X sign(µ1 µ2 ) = sign(γ),
= (ΛS )ii (P −1 b̄cT P )ii ,
i
we readily see that 2γµ1 µ2 (I01 K1 + I02 K2 ) > 0. Thus, to
−1 T
complete the proof, it suffices to show that
where (ΛS )ii and (P b̄c P )ii denote the diagonal entries
of the respective matrices. For ΛS as given above, we need φN (α1 ) φN (α2 )
+ ≥ 0.
only find the values of (P −1 b̄cT P )ii , which we collect in α1 α2
the vector To this end, we consider the following two cases:
 −1 T 
(P b̄c P )11 Case 1: If sign(µ1 ) = sign(µ2 ), we see from Table 1
. (P −1 b̄cT P )22  that α1 > 0 and α2 > 0. Combined with the fact that the
D= (P −1 b̄cT P )33  .

function φN (x) > 0 for all x 6= 0, it follows that φN (α1 ) > 0
(P −1 b̄cT P )44 and φN (α2 ) > 0. Hence,
Further simplification using β1 β2 = 4γ 2 K1 K2 µ1 µ2 yields φN (α1 ) φN (α2 )
+ > 0.
α1 α2
Scenario Bounds on θ α1 α2 β1 β2
µ1 > 0; µ2 > 0 |K1 µ1 − K2 µ2 | < θ < K1 µ1 + K2 µ2 α1 > 0 α2 > 0 β1 > 0 β2 > 0
µ1 < 0; µ2 < 0 |K1 µ1 − K2 µ2 | < θ < |K1 µ1 + K2 µ2 | α1 > 0 α2 > 0 β1 < 0 β2 < 0
µ1 > 0; µ2 < 0 |K1 µ1 + K2 µ2 | < θ < K1 µ1 − K2 µ2 α1 < 0 α2 > 0 β1 > 0 β2 < 0
µ1 < 0; µ2 > 0 |K1 µ1 + K2 µ2 | < θ < K2 µ2 − K1 µ1 α1 > 0 α2 < 0 β1 > 0 β2 < 0

Table 1. Satisfaction of the First Two Inequalities for All Combinations of Signs of µ1 and µ2

Case 2: If sign(µ1 ) = −sign(µ2 ), we see from Table 1 2 X


X 2 h
that sign(α1 ) = −sign(α2 ). Without loss of generality, as- E[x(k + 1)xT (k + 1)] = Ri+1,j+1 (µ, σ) Ai E[x(k)xT (k)]ATj
suming µ1 > 0 > µ2 , we obtain α2 > 0 > α1 with |α2 | ≥ |α1 | i=0 j=0
i
and we use this condition to arrive at +Ai E[x(k)]bTj + bi E[xT (k)]ATj + bi bTj .
φN (α1 ) φN (α2 ) |α1 |φN (α2 ) − |α2 |φN (α1 )
+ = . Starting with initial value E x(0)xT (0) = 0, we use the
 
α1 α2 |α1 α2 |
Since N > 1, it is easily shown that above recursion for 0 ≤ k ≤ N − 1 to obtain E[x(N )xT (N )].
Recalling that the gain-loss function g(N ) = cT x(N )
|α1 |φN (α2 ) > |α2 |φN (α1 ). for c = [1 1 1 1]T , we now calculate
This completes the proof of the theorem. ✷ E [g(N )] = cT E [x(N )] ; E g 2 (N ) = cT E x(N )x(N )T c,
   

and subsequently,
6. Variance of the Gain-Loss Function var(g(N )) = E g 2 (N ) − E2 [g(N )].
 

Assuming that the mean vector From this, we calculate the standard deviation of g(N ),
. . which is used in the numerical example in Section 8.
µ = [µ1 µ2 ]T = E [ρ1 (k) ρ2 (k)]T ,
and covariancematrix 
. σ12 σ12 . 7. Risk Mitigation via Cross-Coupling
σ= = cov([ρ1 (k) ρ2 (k)]T )
σ12 σ22 To augment the analysis of the CC-SLS controller in Sec-
of the returns of the two stocks are known, we now derive tion 4, we now analyze a trading scenario where a cross-
a recursion to calculate var(g(N )). Recalling the state- coupling can result in lower trading risk when compared
update equation from Section 4, we first rewrite the state to two independent SLS controllers. This analysis is per-
matrix as formed under the strengthened assumption that the mean
A(k) = A0 ρ0 (k) + A1 ρ1 (k) + A2 ρ2 (k) returns and covariances of the two stock prices are known.
Then in the spirit of modern portfolio theory, for the clas-
where ρ0 (k) ≡ 1, A0 is the identity matrix I, sical case when the controller parameters I01 , I02 , K1 , K2
K1 −γK2 0 0 0 0 0 0
   
and γ are optimized with respect to these assumed price
.  0 0 0 0  . γK1 −K2 0 0  models, we compare the mean and standard deviation
A1 =  , A2 =  ,
0 0 −K1 γK2  0 0 0 0  of g(N ) obtained by the CC-SLS controller against the
0 0 0 0 0 0 −γK1 K2
ones obtained by the 2-SLS controller. We demonstrate
and we rewrite b(k) as how, for a given target return, the CC-SLS controller
b(k) = b0 ρ0 (k) + b1 ρ1 (k) + b2 ρ2 (k), architecture can lead to lower trading risk than that of the
2-SLS controller. Namely, the standard deviation of g(N )
where
. . . resulting from the use of the CC-SLS is lower than that
b0 = [0 0 0 0]T ; b1 = [I01 0 − I01 0]T ; b2 = [0 − I02 0 I02 ]T . obtained using 2-SLS.
With this notation, the state update equation becomes Associated with the two controllers described in Sections 3
x(k + 1) = (A0 ρ0 (k) + A1 ρ1 (k) + A2 ρ2 (k))x(k) and 4, whenever convenient, we emphasize the dependence
+(b0 ρ0 (k) + b1 ρ1 (k) + b2 ρ2 (k)), of various quantities on the controller parameter vector
.
with initial value x(0) = 0. It follows that d = (I01 , I02 , K1 , K2 , γ)
E[x(k + 1)] = ĀE[x(k)] + b̄. by including it as an argument in mathematical functions
of interest; e.g., we write g(d, k) instead of g(k) for the
To calculate the variance of the gain-loss function, we first
. gain-loss function at stage k. Thus, given initial trading
define ρ(k) = [ρ0 (k) ρ1 (k) ρ2 (k)]T , and subsequently
.  account value V0 , the account value V (k) at stage k is
R(µ, σ) = E ρ(k)ρ(k)T

given by
 
1 µ1 µ2
= µ1 σ12 + µ21 σ12 + µ1 µ2  . V (d, k) = V0 + g(d, k)
µ2 σ12 + µ1 µ2 σ22 + µ22
and depends on d. Without loss of generality, we as-
We now obtain the recursion sume V0 = 1 so that the cumulative return
E[x(k + 1)xT (k + 1)] = E[(A(k)x(k) + b(k))(A(k)x(k) + b(k))T ], V (d, N ) − V0
Substituting the various quantities into the recursion V0
above for E[x(k)xT (k)] and denoting the (i, j)-th element is equal to g(d, N ), and the risk-return pair is
of the matrix R(µ, σ) as Ri,j (µ, σ), it follows that 
std(g(d, N )), E [g(d, N )] .
8. Numerical Example and results in
(std(g(d∗ccsls , N )), E [g(d∗ccsls , N )]) ≈ (2.225, 2.00).
To illustrate the ideas in Section 7, we work with an
assumed stochastic model of the stock-price processes Consistent with the discussion above, this CC-SLS con-
with independent returns having respective mean val- troller leads to lower risk than its 2-SLS counterpart.
ues µ1 = 0.023374 and µ2 = 0.031014, and known vari-
Account Leverage Considerations: As stated in Sec-
ances σ12 = 8.3333 × 10−3 and σ22 = 16.333 × 10−3 . Then,
tion 2, the broker typically imposes limits on the account
for both the CC-SLS and the 2-SLS controllers, we con-
leverage to ensure that investment levels are commen-
sider 5000 candidate parameter vectors d selected by using
surate with the account value. Thus, to supplement the
the uniform distribution to generate points
foregoing risk-return analysis, we study the leverage used
I01 , I02 ∈ (0, 3]; K1 , K2 ∈ (0, 3]; γ ∈ [0, 0.99], by the two optimal controllers above. Given that one or
noting that γ = 1 is inadmissible in the RPE Theorem. For both stocks may be sold short with the corresponding net
each vector d selected above for the CC-SLS controller, investments Ii (k) < 0, consistent with practice, we work
we force γ = 0 to get a corresponding 2-SLS parameter with leverage ratio
vector. Then for each d, and N = 30, we calculate the risk- . |I (k)| + |I2 (k)|
return pair (std(g(d, N )), E [g(d, N )]) for each of the two L(k) = 1 ,
V (k)
controllers. In Figure 1, for the CC-SLS controller, each .
such pair is denoted with a blue dot and for the 2-SLS and study Lmax = max L(k) using one million sam-
0≤k≤N −1
controller, a green dot is used. ple paths. For simulating these paths, however, we need
For each of the two architectures, for a given target to know the joint distribution of the returns, not just
their means and covariances. To this end, we assume that
5 the prices are obtained from two independent Geomet-
4.5 ric Brownian Motion models which are consistent with
the (µi , σi2 ) used for the two controller optimization tasks
4
above. Since the total returns Si (k + 1)/Si (k) are log-
3.5 normally distributed, we generate these prices using the
update equations
3
S1 (k + 1) = S1 (k) · exp (0.019142 + 0.08903w1(k)) ;
2.5
S2 (k + 1) = S2 (k) · exp (0.022918 + 0.12349w2(k)) ,
2 where w1 (k) ∼ N (0, 1) and w2 (k) ∼ N (0, 1). Without loss
1.5
of generality, we assume that the initial prices in the
above update equations are S1 (0) = S2 (0) = 1. Subse-
1 quently, for N = 30, we estimate that for the CC-SLS
0.5 CC-SLS controller, Lmax ≤ 3.44 about 95% of the time, and that for
2-SLS the 2-SLS controller, using that same 95% figure of merit,
0
0 2 4 6 8 10
we estimate Lmax ≤ 6.94. Furthermore, out of the one mil-
lion sample paths, the optimal CC-SLS controller results in
a bankruptcy, characterized by account value V (k) ≤ 0, in
only 715 sample paths as compared to 15, 006 bankruptcies
Fig. 1. Expected Value vs. Standard Deviation of g(d, N )
for the 2-SLS controller. For such sample paths, we record
the maximum leverage to be Lmax = ∞. To summarize,
return G, we seek a parameter vector d that solves the optimal CC-SLS controller not only leads to lower risk
min std(g(d, N )) subject to E [g(d, N )] ≥ G. than its optimal 2-SLS controller, but it also results in a
d
much lower account leverage almost all the time and leads
In terms of Figure 1, this means that the CC-SLS optimum to a lower probability of account bankruptcy.
parameter vector corresponds to the leftmost blue dot
along the line with E [g(d, N )] ≈ G. Similarly for 2-SLS, Saturated 2-SLS and CC-SLS Controllers: Noting
the optimum parameter vector corresponds to the leftmost that the account leverage for both controllers can far
green dot along the same line. From the figure, we see that exceed the limits imposed by stock brokers, to illustrate
for target return G, the optimal CC-SLS controller appears how one might conform with common practice, we revisit
to guarantee a lower level of the risk std(g(d, N )) versus our simulation with the added constraint L(k) ≤ 2, and
that obtained for the optimal 2-SLS controller. “saturate” the investments of the 2-SLS and the CC-
To make the above more concrete, for G = 2, using the SLS controllers whenever this inequality is violated. More
search sets for the controller parameters above, an optimal precisely, we take
2-SLS controller parameter vector is found to be 
I (k) when L(k) ≤ 2;
d∗2sls = (3, 3, 0.713, 0.381) IiL (k) = iL
IiL (k) · 2/L(k) otherwise,
and results in and
(std(g(d∗2sls , N )), E [g(d∗2sls , N )]) ≈ (2.399, 2.00).

I (k) when L(k) ≤ 2;
IiS (k) = iS
Similarly, an optimal CC-SLS parameter vector is found IiS (k) · 2/L(k) otherwise.
to be
d∗ccsls = (3, 2.58, 0.339, 0.234, 0.990),
Although such a scheme ensures that L(k) ≤ 2 for all k, Motion Stock Market. Proceedings of IEEE Conference
the theoretical guarantee of robust positive expectation on Decision and Control, pages 2889–2894, Orlando,
is no longer available. Nonetheless, from the one million 2011. doi: 10.1109/CDC.2011.6160731.
sample paths of the GBM prices described above, we statis- B. Ross Barmish and James A. Primbs. On a New
tically estimate E [g(N )] ≈ 1.86 and std(g(N )) ≈ 2.15, and Paradigm for Stock Trading Via a Model-Free Feed-
encounter no bankruptcies using the saturated CC-SLS back Controller. IEEE Transactions on Automatic
controller. In comparison, for the saturated 2-SLS con- Control, 61(3):662–676, 2016. ISSN 0018-9286. doi:
troller, we estimate E [g(N )] ≈ 1.74, with std(g(N )) = 2.27 10.1109/TAC.2015.2444078.
and face account bankruptcy in 12 sample paths. Thus, for Michael Heinrich Baumann. On Stock Trading Via Feed-
this more practical scenario, the saturated CC-SLS and 2- back Control When Underlying Stock Returns Are Dis-
SLS controllers yield positive average trading gains while continuous. IEEE Transactions on Automatic Con-
conforming to the leverage constraints imposed on them. trol, 62(6):2987–2992, 2017. ISSN 0018-9286. doi:
10.1109/TAC.2016.2605743.
Michael Heinrich Baumann and Lars Grüne. Simultane-
9. Conclusion ously Long Short Trading in Discrete and Continuous
In this paper, we introduced the notion of cross-coupled Time. Systems & Control Letters, 99:85–89, 2017. ISSN
SLS controllers for trading two stocks. We derived a closed- 0167-6911. doi: 10.1016/J.SYSCONLE.2016.11.011.
form expression for the expected trading gain-loss function Atul Deshpande and B Ross Barmish. A General Frame-
resulting from this new architecture and, based on this work for Pairs Trading with a Control-Theoretic Point
formula, our new Robust Positive Expectation Theorem of View. Proceedings of IEEE Conference on Control
provides conditions under which positivity of the expected Applications, pages 761–766, Buenos Aires, 2016.
gain-loss function is guaranteed. We also provided simula- Atul Deshpande and B. Ross Barmish. A Generaliza-
tions which suggest, under strengthened hypotheses, that tion of the Robust Positive Expectation Theorem for
our new CC-SLS architecture enables controller designs Stock Trading via Feedback Control. Proceedings of the
that achieve lower trading risk than two independent SLS European Control Conference, pages 514–520, Limassol,
controllers for the same target expected gain. Finally, in 2018. doi: 10.23919/ECC.2018.8550535.
our numerical simulations, we found that the cross-coupled N.G. Dokuchaev and Andrey V. Savkin. Universal Strate-
SLS controller results in lower trading account leverage gies for Diffusion Markets and Possibility of Asymp-
than two decoupled SLS controllers. Similarly, we showed totic Arbitrage. Insurance: Mathematics and Eco-
that using “saturated” implementations of both controller nomics, 34(3):409–419, 2004. ISSN 0167-6687. doi:
designs which guarantee compliance with a leverage limit 10.1016/J.INSMATHECO.2004.01.004.
imposed by the broker, the mean-variance performance Nikolai Dokuchaev. Dynamic Portfolio Strategies: Quan-
of the cross-coupled SLS controller is better than that titative Methods and Empirical Rules for Incom-
obtained with two decoupled SLS controllers. plete Information. International Series in Opera-
tions Research & Management Science. Springer US,
Three directions for future research immediately present Boston, MA, 2002. ISBN 978-0-7923-7648-4. doi:
themselves: The first involves the introduction of cross- 10.1007/978-1-4615-0921-9.
coupling into different variants of the SLS controller found Nikolai Dokuchaev and Andrey V. Savkin. A Bounded
in the literature; e.g., in Malekpour and Barmish [2016], Risk Strategy for A Market with Non-Observable Pa-
an SLS controller with delays is considered. A second rameters. SSRN Electronic Journal, 2002. ISSN 1556-
direction involves extending the theory presented in this 5068. doi: 10.2139/ssrn.321960.
paper to trading scenarios involving more than two stocks. Scott H. Irwin and Diego Landa. Real Estate, Futures,
Finally, the third possible direction for future research is and Gold as Portfolio Assets. Journal of Portfolio
motivated by the fact that the practitioner invariably faces Management, 14(1):29–34, Fall 1987.
leverage restrictions. Hence, it would be of interest to see Benjamin F King. Market and Industry Factors in Stock
if the CC-SLS controller still leads to a guarantee of ro- Price Behavior. The Journal of Business, 39(1):139–190,
bust positive expectation when a saturation scheme, along 1966. ISSN 00219398, 15375374.
the lines studied in the previous section, is used. Results S. Malekpour, J. A. Primbs, and B. R. Barmish.
given in Barmish and Primbs [2016] for a standalone SLS A Generalization of Simultaneous Long-Short Stock
controller provide motivation for further work. Trading to PI Controllers. IEEE Transactions on
Automatic Control, 63(10):3531–3536, 2018. doi:
References 10.1109/TAC.2018.2799484.
B. Ross Barmish. On Trading of Equities: A Robust Shirzad Malekpour and B. Ross Barmish. On Stock Trad-
Control Paradigm. IFAC Proceedings Volumes, ing Using a Controller with Delay: The Robust Posi-
41(2):1621 – 1626, 2008. ISSN 1474-6670. doi: tive Expectation Property. 2016 IEEE 55th Conference
https://doi.org/10.3182/20080706-5-KR-1001.00276. on Decision and Control, pages 2881–2887, Las Vegas,
17th IFAC World Congress. 2016. doi: 10.1109/CDC.2016.7798698.
B. Ross Barmish. On Performance Limits of Feedback Harry Markowitz. Portfolio Selection. The
Control-Based Stock Trading Strategies. Proceedings of Journal of Finance, 7(1):77–91, 1952. doi:
the American Control Conference, pages 3874–3879, San 10.1111/j.1540-6261.1952.tb01525.x.
Fransisco, 2011. doi: 10.1109/ACC.2011.5990879. G. Maroni, S. Formentin, and F. Previdi. A Robust Design
B. Ross Barmish and James A. Primbs. On Arbitrage Pos- Strategy for Stock Trading via Feedback Control. Pro-
sibilities via Linear Feedback in an Idealized Brownian ceedings of the European Control Conference, pages 447–
452, Naples, 2019. doi: 10.23919/ECC.2019.8795812. ISSN 2405-8963. doi: 10.1016/J.IFACOL.2017.08.2045.
Robert C. Merton. Continuous-time Finance. B. Black- Qingshuo Song and Qing Zhang. An Optimal Pairs-
well, 1990. ISBN 9780631185086. Trading Rule. Automatica, 49(10):3007–3014, 2013.
Joseph D O’Brien, Mark Burke, and Kevin Burke. A Gilbert Strang. Introduction to Linear Algebra. Wellesley-
Generalized Framework for Simultaneous Long-Short Cambridge Press, Wellesley, MA, fourth edition,
Feedback Trading. arXiv preprint, 2018. 2009. ISBN 9780980232714 0980232716 9780980232721
James A. Primbs and B. Ross Barmish. On Robustness 0980232724 9788175968110 8175968117.
of Simultaneous Long-Short Stock Trading Control with Qing Zhang. Stock Trading: An Optimal Selling Rule.
Time-Varying Price Dynamics. Proceedings of the IFAC SIAM Journal on Control and Optimization, 40(1):64–
World Congress, 50(1):12267–12272, Toulouse, 2017. 87, 2001.
This figure "Coupled_Controller.png" is available in "png" format from:

http://arxiv.org/ps/2011.09109v1
This figure "bifurcation.jpg" is available in "jpg" format from:

http://arxiv.org/ps/2011.09109v1

You might also like