Professional Documents
Culture Documents
Barmish 2021
Barmish 2021
Barmish 2021
fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
GENERIC COLORIZED JOURNAL, IEEE TAC, VOL. XX, NO. XX, XXXX 2020 1
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
2 GENERIC COLORIZED JOURNAL, IEEE TAC, VOL. XX, NO. XX, XXXX 2020
obvious incentive to try and capitalize by buying when the stock is dealing with δi is rather trivial. That is, it is typically the case
trending “up” and selling when it is trending “down.” In the sequel, to these price changes are constant and correspond to the exchange’s
emphasize the central role of these random variables in our analysis, minimum tick size. If there is a degree of imbalance between supply
we refer to the “T-model.” In addition, we often mention “T-intervals” and demand, “walking the book” may come into play.1
when discussing the Tk in a generic way with no specific k-value
in mind. In this regard, we let T denote the random variable with
distribution common to all the Tk . It should also be noted that the B. Probability Distribution for Interval Lengths Tk
number of T-intervals will typically be far fewer than the number Recalling the discussion in Section 1, the interval lengths Tk are
of prices. As seen in the analysis to follow, a high probability of assumed to be independent and identically distributed, and repre-
efficiency pe combined with large expected value E[T ], an indicator sented by a common random variable T . As far as their assumed
of the average time trending in a given direction, characterizes an independence is concerned, motivation for this is derived from the
attractive trading environment for a trend follower who uses the fact that real-world markets tend to be highly non-stationary without
previously mentioned feedforward controller to strategically switch any predictability as to price direction. In view of the discussion in
between long and short positions. The key idea in this paper is that the subsection above, it is also assumed that the Tk are independent
ease of entry into the market, as manifested by pe , in combination of the δi ; see also directions for future research in the conclusion. The
with large Tk , is a recipe for successful trading. common expected value E(T ) of the Tk is an indicator of the average
More specifically, when a reversal in trend direction occurs, the time which the stock price spends trending in one direction or another.
control logic generates a triggering signal indicating that a change in In this regard, our T-interval formulation is distinctly different from
the investment, either short to long or long to short, is desired. In this many classical stock price models which have “directionality” either
regard, it is explained in Section 2 how the current price, bid and ask explicitly or implicitly built in. For example, when a classical
determine whether an efficient price point has been encountered. This binomial lattice, for example see [28], is used to model stock prices,
being the case, a trade goes forward. In our analysis, the parameter pe one begins with the probability that the next move is “up” and its
indicates the a priori likelihood that this desirable situation will occur. complement that it is “down”. Then, for this stationary case, when
When it does not, we abstain from trading until an efficient trade the probability is not 1/2, it would be incorrect to assume that the
becomes possible. Our main result is a formula for the expected value resulting Tk are independent. For example, if the probability of up is
of the so-called gain-loss function in terms of pe and expectations of 0.9, then prices tend to trend upward so that Tk will alternate between
appropriately constructed functions of T and the price changes. This large and small values, indicating longer up trends and smaller down
emphasis on control-theoretic methods is similar to what is seen in trends. However, at least anecdotally, our limited experiments on real
a number of papers; e.g., see [17]- [27] and their bibliographies. historical data suggest that the Tk are not highly correlated; e.g., see
The plan for the remainder of this paper is as follows: In Section 2, the discussion in the conclusion.
we formally describe our new model and illustrate its use via an
example. Then, in Section 3, we provide the analysis of a feedforward
controller and the main result, Theorem 3.2, bearing on performance C. Dynamic Generation of the Tk
quantification. Then, in Section 4, we illustrate use of our new theory
via two examples. The first involves theoretical calculations and the The Tk process is initialized at price S(0) which is assumed,
second involves simulation using high-frequency historical NASDAQ without loss of generality, to be the result of an upward tick.
ITCH data with nanosecond level time stamps. Finally, conclusions Hence the initial interval is designated as “UP” and we wait for
are provided in Section 5 and the lengthy proof of the main result is the first price, call it S(m), which corresponds to a downward tick;
given in the Appendix. i.e., S(m) < S(m − 1). This defines the values of the random
variable T0 = m which represents the fact that there were m (non-
zero) transactions before a change in the price, from the upward to
II. N EW S TOCK P RICE VARIATION M ODEL : T HE D ETAILS
downward direction. Accordingly, the next T-interval is designated as
In this section, we provide the details of our new model which “DOWN” and we can continue inductively.
was described in general terms in the previous section. Underlying Given the alternation of price direction from interval to interval,
the definitions to follow is the sequence of stock prices S(i) which the Tk with k even are UP, and for k odd they are DOWN.
are realized in the market. It is assumed that successive prices S(i) Generalizing on the above, suppose arrival at price S(i) marks the end
and S(i+1) are distinct, and a transaction associated with this change, of the k-th T-interval. Hence Tk is well defined and we wait for the
also called a tick, is said to have occurred. Said another way, sideways first instant when a price change occurs which is opposite in direction
price moves, S(i + 1) = S(i), although not part of our theoretical to the initiating move. According to our UP-DOWN convention, if k
model and having no effect on gains and losses, provide additional is even, we take
opportunities for the practitioner to enter and exit trades efficiently;
see the footnote in Section 4. .
Tk+1 = min{m : S(i + m) < S(i + m − 1), m > 0}
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
AUTHOR et al.: PREPARATION OF BRIEF PAPERS FOR IEEE TRANSACTIONS AND JOURNALS (FEBRUARY 2017) 3
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
4 GENERIC COLORIZED JOURNAL, IEEE TAC, VOL. XX, NO. XX, XXXX 2020
B. Markov Dynamics Lemma 3.1: With initial condition PC (0) = 1, PI (0) = 0, and for k
We begin our analysis by computing the probability of entering a positive, the probability of arrival at the k-th T-interval on the correct
T-interval on the correct side of the trade. That is, we compute the side of the trade is given by
h i
probability that the trader enters an UP interval already holding a E[qeT ] 1 + (−1)k (E[qeT ])k−1
single share of the stock, or enters a DOWN interval already short PC (k) = .
a share of stock. Recalling that the trader begins on the correct side 1 + E[qeT ]
of the trade at k = 0, given k > 0 and Tk = t, the probability Proof: Per discussion in the previous section, the state equation
that a successful switch will occur before a new T-interval begins is for the (PC , PI ) pair is written as
1 − (1 − pe )t . Recalling the previously defined complementary effi-
E[qeT ]
ciency probability, qe , it is noted that the probability of a successful PC (k + 1) 0 PC (k)
= .
switch during an interval is 1 − qet . PI (k + 1) 1 1 − E[qeT ] PI (k)
Let Ck be the event that the trader arrives at the beginning of Thus, with initial conditions PC (0) = 1 and PI (0) = 0, the
the k-th T-interval on the correct side of the trade, and let Ik be probabilities of correctness and incorrectness at the k-th T-interval
the event that the trader arrives at k on the incorrect side of the are computed as
trade. Take PC (k) and PI (k) to be the corresponding unconditional k
E[qeT ]
probabilities and recall that we begin with PC (0) = 1, PI (0) = 0. PC (k) 0 1
= T .
Further, note that for all k > 0, it is always the case that PI (k) 1 1 − E[qe ] 0
PC (k) + PI (k) = 1. Now, upon diagonalizing the transition matrix, the k-fold product
above is computed to be
We begin with the basic Markov probability recursion k
E[qeT ]
0
1 1 − E[qeT ]
PC (k + 1) P (Ck+1 |Ck ) P (Ck+1 |Ik ) PC (k)
= ,
PI (k + 1) P (Ik+1 |Ck ) P (Ik+1 |Ik ) PI (k)
1 E[qeT ] 1 1 0 1 1
where P (Ck+1 |Ck ) is the conditional probability of entering into the = , (1)
1 + E[qeT ] 1 −1 0 (−E[qeT ])k 1 −E[qeT ]
(k + 1)-st T-interval on the correct side, given that the k-th T-interval
which, upon substitution into the previous formula, leads directly to
was entered on the correct side of the trade. The other transition
the result for PC (k).
probabilities are defined similarly.
To calculate all the probabilities in the above transition matrix, we
first note that D. Performance Considerations
Recalling that at k = 0 the trader begins on the correct side of
P (Ck+1 |Ck ) = 0, P (Ik+1 |Ck ) = 1 the trade, we now provide the main theorem of this paper, which is
since a trader who is correct on k-th interval will wait until that the formula for the expected gain-loss for the trading algorithm over
interval has ended before attempting to reposition to be correct on the k-th T-interval. The proof of this theorem, which involves many
the next interval. Thus, being correct on the k-th interval necessarily lengthy and detailed calculations, is provided in the Appendix.
implies starting the (k + 1)-st T-interval on the incorrect side. Theorem 3.2: Beginning with PC (0) = 1, the trader’s expected gain
Moreover, we also have or loss over the k-th T-interval is given by
P (Ik+1 |Ik ) = 1 − P (Ck+1 |Ik ). 2 (1 − E[qeT ])
E[g(k)] = E[δ] E[T ] −
Next, consider a generic interval length Tk = t and, per discussion pe (1 + E[qeT ])
above, we have " #!
T k 1 1 − E[qeT ]
+2(−E[qe ]) −1 . (2)
P (Ck+1 |Ik ∩ (Tk = t)) = (1 − pe )t = qet . pe 1 + E[qeT ]
That is, given that the trader begins interval k on the incorrect side,
attempting to switch at each of the t occasions will only result in E. Steady State Considerations
being on the correct side for interval k + 1 if all of the t previous Lemma 3.3 below provides the steady state description of the
attempts fail. probabilities PC (k) and PI (k) associated with Lemma 3.1. Recalling
Thus, by the law of total probability, we obtain 0 < pe < 1, its proof is readily obtained by and letting k → ∞ in
∞ Equation (1).
X
P (Ck+1 |Ik ) = P (Ck+1 |Ik ∩ (Tk = t))P (Tk = t) Lemma 3.3: The steady state probabilities of starting an interval on
t=1 the correct side, PC , and of starting an interval on the incorrect side
∞
of the trade, PI , are given by
qet P (Tk = t) = E[qeT ].
X
=
t=1 E[qeT ] 1
PC = ; PI = .
These preliminaries, as seen below, now enable us to compute the 1 + E[qeT ] 1 + E[qeT ]
probability of entering the k-th T-interval on the correct or incorrect The following corollary gives the steady state version of the result
side of the trade. in Theorem 3.2. The proof for the simplified steady state formula
below, obtained letting k → ∞ in Equation (2), is omitted.
C. Probability of Correctness
Corollary 3.4: The steady state expected gain or loss, g, over a T-
The following lemma provides a closed-form expression for the interval is given by
probability PC (k) of beginning the k-th T-interval on the correct side " #
of the trade. Note that the probability of beginning on the incorrect 2 (1 − E[qeT ])
E[g] = E[δ] E[T ] − .
side of the trade is readily obtained as PI (k) = 1 − PC (k). pe (1 + E[qeT ])
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
AUTHOR et al.: PREPARATION OF BRIEF PAPERS FOR IEEE TRANSACTIONS AND JOURNALS (FEBRUARY 2017) 5
E[gain]
9
Analysis of extreme situations give insight into when profitability 1 10
is possible. Beginning with Corollary 3.4, and noting that pe = 1−qe ,
we rewrite the expected gain formula as
" # 0
2 (1 − E[qeT ])
E[g] = E[δ] E[T ] − . (3)
(1 + E[qeT ]) 1 − qe
−1
For T ≡ 1, the formula becomes 0.0 0.2 0.4 0.6 0.8 1.0
p_e
2
E[g] = E[δ] 1 − . (4)
(1 + qe )
Fig. 3. Expected Gain as a Function of pe for n = 1 . . . 10.
Here we note that E[g] is nonpositive for all values of qe . That is,
it becomes impossible to profit at any probability of inefficiency, qe ,
with the best possible outcome occurring at complete inefficiency,
qe = 1, yielding zero expected gain. 0.40
uniform
Similarly, another interesting observation from Equation (3) is how binomial (p_u = 0.5)
0.35 binomial (p_u = 0.1)
efficiency affects the expected gain. When qe = 0, we see that E[g] =
E[δ] [E[T ] − 2], revealing that E[T ], the average time which the stock 0.30
price spends trending one way or the other, must be greater than 2 in
0.25
order to profit. At the other extreme, when qe → 1, a straightforward
Probability
The first part of this section involves revisiting the uniform distribu-
Fig. 4. PMF of T-intervals for Uniform and Binomial Distributions
tion “toy example” described in Section 2, and providing comparisons
with using the binomial distribution to generate the distribution of T-
interval lengths. The second example, involving the use of NASDAQ
generality, we initialized the calculations with an UP interval. Letting
high-frequency ITCH data, demonstrates the potential application of
U be a random variable which denotes the number of up moves in a
the theory in practice.
row prior to the DOWN move that ends an interval, the total interval
length is T = U + 1. Furthermore, assume that U is distributed as
A. Examples: Uniform and Binomial T-Interval Distributions
the binomial distribution with parameters n − 1 and probability of up
Recalling Section 2, we now revisit the random variable move pu ; i.e., this situation can be viewed as n−1 flips of a coin with
T ∈ {1, 2, ..., n − 1, n} with uniformly distributed probability mass pu denoting the probability of heads. This corresponds to interval
function and probability of efficiency 0 < pe < 1. Here, with δ ≡ 1, lengths in the set T ∈ {1, 2, . . . , n}. Figure 4 provides a comparison
we study the steady state expected gain from Corollary 3.4 as a of the Probability Mass Function (PMF) for the uniform distribution
function of the parameters (n, pe ). Under this uniform distribution and the binomial distribution with pu = 0.5 and pu = 0.1 with a
assumption, a straightforward calculation, for example using the maximum trend interval length of n = 10.
probability generating function, results in the expected gain formula To compute the expected gain from Corollary 3.4 for the binomi-
ally generated trend lengths, we note that
h i
n+1
n+1 2 qe − (n + 1)qe + n
E[g] = + h i. 2 (1 − E[qeT ])
2 pe q n+1 + (n − 1)qe − n E[g] = E[T ] −
e
pe (1 + E[qeT ])
Figure 3 shows a plot of E[g] as a function of pe for n ranging from 1 2 (1 − qe E[qeU ])
to 10. Consistent with intuition, we observe that as n increases, longer = E[U ] + 1 − .
pe (1 + qe E[qeU ])
average T-intervals lengths result and the expected gain increases.
In addition the ”uniform” result for the case n = 1 is seen to be Furthermore, observing that E[U ] = (n − 1)pu and using the
consistent with the prediction of Equation (4). probability generating function for the binomial distribution, we
As a comparison with the uniform distribution, we also generated obtain
the interval lengths for this binomial distribution case. Without loss of E[qeU ] = (1 − pu + pu qe )(n−1) .
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
6 GENERIC COLORIZED JOURNAL, IEEE TAC, VOL. XX, NO. XX, XXXX 2020
Price of Stock
63.7
3.5 uniform
binomial (p_u = 0.5) 63.6
3.0 binomial (p_u = 0.1)
63.5
2.5
2.0 63.4
E[gain]
1.5 63.3
1.0
63.2
0.5
63.1
0.0
63
0.0 0.2 0.4 0.6 0.8 1.0 0 2000 4000 6000 8000 10000 12000
p_e Transaction Number
Fig. 5. Expected Gain Versus pe for Distributions in Figure 4 Fig. 6. JPM Transaction Prices from 10am to 3:30pm on Jan. 4, 2016
Count
Now, by substituting this quantity into the expression for E[g], we 500
arrive at 450
(n−1)
2 (1 − qe (1 − pu + pu qe ) ) 400
E[g] = (n − 1)pu + 1 − .
pe (1 + qe (1 − pu + pu qe )(n−1) )
350
Figure IV-A provides a comparison of the n = 10 case where
300
once again the T-interval probabilities are all equal and, for the
binomial case, we consider the cases pu = 0.5 and pu = 0.1. For 250
the equiprobability uniform case and the binomial with pu = 0.5 the 200
results are seen to be quite similar across all values of pe . However,
150
with pu = 0.1, the distribution of interval lengths is skewed toward
being very short. Thus, in this case, our formula indicates that the 100
algorithm is expected to lose across the entire range of pe .
50
0
B. Example: JP Morgan Chase Intraday Prices 0 2 4 6 8 10 12 14
T-Interval Length
In this example, we work with historical data, and describe how the
analysis in this paper might be used by a practitioner. Specifically, we Fig. 7. Histogram of Interval Lengths for JPM Data in Figure 6
use transaction prices for JP Morgan (JPM) from 10:00am through
3:30pm extracted from the NASDAQ high-frequency ITCH data
for January 4, 2016. Half hour time periods around the open and prediction E[g(k)] ≈ 0.0025 which we compare with its realized
close were removed to provide a more consistent trading volume average g ≈ 0.0016. Finally, using the feedforward algorithm on the
pattern and transactions with the same nanosecond time stamp were actual data as seen in Figure 6, the overall gain was estimated to be
aggregated. The intraday price path for JPM is shown in Figure 6. $1.90, which is approximately 3% of the mean price of JPM.
To estimate the parameters of our T-interval model, we began with
the 10,112 prices in the price plot and consolidated them into 2996
V. C ONCLUSION
non-zero moves, 1485 up and 1511 down. From this starting point,
we estimated3 E(δ) ≈ 0.0095 and pe ≈ 0.5090 associated with these In this paper, we introduced the so-called T-model as a means for
transactions.4 A histogram of the T-interval lengths is provided in studying and exploiting trending behavior of stock prices. In addition
Figure 5 from which we see many Tk of length 1, the longest of to the Tk entering into the model, the probability of efficiency
length 13, and 10 that are of length 10 or greater. In all, there parameter pe was seen to be important. When pe and E[T ] are
were 1214 T-intervals from which we estimated E(T ) ≈ 2.4679 suitably large, as illustrated in the preceding high frequency example,
and E[qeT ] ≈ 0.2806. it was shown that a profitable stock-trading opportunity presented
Next, we turned our attention to application of the feedforward itself. On the other hand, for the low frequency case, although pe
controller of Section 3. Figure 8 provides a simulation of the may be suitably large, recalling the discussion in Section 2, for
resulting cumulative gain/loss function over time. Then on a per-T- E[T ] < 2 steady state trading is not expected to be profitable. To
interval basis, for the assumed steady state, we calculated the model study this further, we carried out a preliminary experiment using the
adjusted daily closing prices for Facebook for the five-year period
3 For the case of non-zero price changes, δ, when book walking occurred,
starting with 2015. Even for the best-case scenario with qe = 0
the value of δ was computed as the change from the previous transaction corresponding to efficient trades at the close, our estimated model
price to the end of the walk; see footnote in Section 2.
4 Here we allow for the possibility that a practitioner may efficiently enter predicts that trading is not profitable; i.e., E[T ] ≈ 1.9 < 2.
or exit a trade on sideways moves. Accordingly, such moves are included in As far as theory related to trading is concerned, we carried out
the calculation of pe . gain-loss analysis using a feedforward stock-trading controller which
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
AUTHOR et al.: PREPARATION OF BRIEF PAPERS FOR IEEE TRANSACTIONS AND JOURNALS (FEBRUARY 2017) 7
0
To calculate the first term above, note that by independence we have
P (Ck ∩ (Tk = t)) = PC (k)P (Tk = t). Moreoever, taking into
-0.5
account that the δi are independent of Tk , and that the trader loses
0 2000 4000 6000 8000 10000 12000 on the last move of each Tk interval, we obtain
Transaction Number
∞
X
Fig. 8. Gain from Trading Algorithm for JPM E[g(k)|Ck ∩ Tk = t]P (Ck ∩ (Tk = t))
t=1
∞
X
executes strategic switching between long and short stock positions = E[g(k)|Ck ∩ Tk = t]PC (k)P (Tk = t)
triggered by trend reversals. Based on work to date, we see four t=1
∞
"t−1 #
directions for future work. X X
The first direction involves the independence assumptions which = E δi − δt PC (k)P (Tk = t)
t=1 i=1
were made in this paper. This includes the assumed independence
involving the Tk and the δi . To this end, we conducted some = E[δ] (E[T ] − 2) PC (k). (5)
preliminary calculations and concluded that further study is needed
regarding the extent to which statistically significant correlations may Next, to address the second term in E[g(k)] above, noting that
or may not exist. This would involve extensive use of historical independence implies P (Ik ∩ (Tk = t)) = PI (k)P (Tk = t), we
data and possibly motivate future theoretical research aimed at define event Ek corresponding to one or more efficient prices over
incorporation of correlation into the model. Interestingly, even if our interval Tk and denoting its complement by Ekc , we obtain
independence assumptions are not strongly supported, preliminary
∞
experiments suggest that the controller which we are currently using X
E[g(k)|Ik ∩ Tk = t]P (Ik ∩ (Tk = t))
may still provide strong performance under a weakening of the
t=1
independence assumptions. ∞
X
The second direction for future research involves extending the = E[g(k)|Ik ∩ Tk = t]PI (k)P (Tk = t)
simple Markov formulation in Section III-B to capture more complex t=1
strategies and market behavior typically involving more than two ∞
E[g(k)|Ekc ∩ Ik ∩ Tk = t]P (Ekc )PI (k)P (Tk = t)
X
states. For example, one possibility involves introducing memory = (6)
considerations into the T-interval modelling; e.g., a Markov process t=1
∞
could be used which enables one to relate the consecutive interval X
lengths Tk and Tk+1 . Going even further, one could consider a + E[g(k)|Ek ∩ Ik ∩ Tk = t]P (Ek )PI (k)P (Tk = t). (7)
t=1
regime switching model in which the market moves between a
“volatile” and “trending” state which are then exploited using separate
To compute (6), noting that conditioning on Ekc implies that no
strategies. In such cases, extensions of the analysis in this paper would
efficient point is encountered over interval Tk , the trader loses on
be required.
the first t − 1 ticks and wins on the last tick leading to a total loss
The third direction involves estimation of model parameters prior
of E[δ](2 − t) with probability qet . Thus, (6) becomes
to the commencement of trading. For example, one might consider
reserving the first hour after the market opens as the ”training period.” ∞
E[g(k)|Ekc ∩ Ik ∩ Tk = t]P (Ekc )PI (k)P (Tk = t)
X
Subsequently, if the expected gains are predicted to be attractive, we
enter into trading. t=1
"∞ #
The fourth direction for further work involves study of the T-
qet (2 − t)P (Tk = t) PI (k)
X
model using a larger class of controllers than considered here. In = E[δ]
this regard, the reader is reminded that we restricted attention to h t=1 i
feedforward control. One immediate direction for future work would = E[δ] 2E[qeT ] − E[T qeT ] PI (k). (8)
be to enhance the controller to include a feedback term which depends
on the account value V (k) as seen in Figure 1. Other possibilities Next, we address (7), which corresponds to the case when an efficient
include the use of random or anticipatory switching. transaction is encountered. Letting i be the first transaction at which
efficiency occurs, this happens with probability qei pe . Hence, for the
interval, there are losses for the first i ticks, gains for the next t−1−i
A. Acknowledgment
ticks, followed by a loss on the final tick. This gives a total gain (or
The authors acknowledge the valuable comments of the reviewers. loss) of E[δ](t − 2 − 2i). Thus (7) is calculated as
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TAC.2021.3086328, IEEE
Transactions on Automatic Control
8 GENERIC COLORIZED JOURNAL, IEEE TAC, VOL. XX, NO. XX, XXXX 2020
∞
[3] N. Jegadeesh and S. Titman S, “Returns to Buying Winners and Selling
X
(E[g(k)|Ek ∩ Ik ∩ Tk = t]P (Ek )) PI (k)P (Tk = t)
Losers: Implications for Stock Market Efficiency,” The Journal of
t=1 Finance, vol. 48, pp. 65-91, 1990.
" ∞ t−1 #
[4] C. S. Asness, T. J. Moscowitz, and L. H. Pedersen, “Value and Momen-
qei pe (t − 2
XX
= E[δ] − 2i)P (Tk = t) PI (k) tum Everywhere,” Journal of Finance, vol. 68, pp. 929-985, 2013.
t=1 i=0 [5] C. R. Harvey and Y. Liu, “Evaluating Trading Strategies,” Journal of
" ∞ t−1
! Portfolio Management, vol. 45, pp. 108-118, 2014.
[6] R. S. Tsay, Analysis of Financial Time Series, John Wiley and
qei
X X
= E[δ] pe (t − 2) P (Tk = t) (9)
Sons, 2016.
t=1 i=0 [7] A. Kanas, “Neural Network Linear Forecasts for Stock Returns,” Inter-
t−1
∞ X
#
national Journal of Finance and Economics, vol. 6,, pp.245-254, 2001.
iqei P (Tk
X
−2pe = t) PI (k). (10) [8] R. R. Trippi and E. Turban, editors, Neural Networks in Finance
t=1 i=0 and Investing: Using Artificial Intelligence to Improve Real World
Performance, McGraw-Hill, 1992.
Recognizing (9) as a geometric progression, we obtain [9] P. D. McNelis, Neural Networks in Finance: Gaining Predictive Edge
∞ t−1
! in the Market, Elsevier Academic Press, 2005.
X X i [10] M. L. De Prado, Advances in Financial Machine Learning, John Wiley
pe (t − 2) qe P (Tk = t) and Sons, 2018.
t=1 i=0 [11] J. B. De Long, A. Shleifer, L. H. Summers and R. J. Waldmann, “Noise
∞
X 1 − qet Trader Risk in Financial Markets,” Journal of Political Economy, vol. 98,
= pe (t − 2) P (Tk = t) pp. 703-738, 1990.
pe [12] E. E. Peters, Fractal Market Analysis, John Wiley and Sons, 1994.
t=1
[13] P. Sieczka and J. A. Holyst, “Statistical Properties of Short Term
= E[T ] − 2 − E[T qeT ] + 2E[qeT ]. (11) Price Trends in High Frequency Stock Market Data,” Physica A, 387,
pp. 1218-1224, 2008.
Moreover, to compute (10), using the summation formula [14] L. Bachelier, The Random Character of Stock Market Prices, ed. P. H.
t−1
X i (t − 1)xt − txt−1 + 1 Cootner, MIT Press, Cambridge, Massachusetts, pp. 17-78, 1964.
ix = x , [15] P. A. Samuelson, “Proof that Properly Anticipated Prices Fluctuate
(1 − x)2
i=0 Randomly,” Industrial Management Review. vol. 6, pp. 41-49, 1965.
we obtain [16] R. C. Merton, Continuous Time Finance, Wiley-Blackwell, 1992.
∞ t−1 [17] Q. Zhang, “Stock Trading: An Optimal Selling Rule,” SIAM Journal of
iqei P (Tk
X X
−2pe = t) Control and Optimization, vol. 40, pp. 64-87, 2001.
t=1 i=0 [18] G. C. Calafiore, “Multi-Period Portfolio Optimization with Linear Con-
∞ trol Policies.” Automatica, vol. 44, pp. 2463-2473, 2008.
qe X
[19] G. C. Calafiore, “An Affine Control Method for Optimal Dynamic
= −2 (t − 1)qet − tqet−1 + 1 P (Tk = t) Asset Allocation with Transaction Costs,” SIAM Journal on Control and
pe
t=1 Optimization, vol. 48, pp. 2254-2274, 2009.
qe 1 [20] B. R. Barmish and J. A. Primbs, “On a New Paradigm for Stock
= −2 E[T qeT ] − E[qeT ] − E[T qeT ] + 1 . (12) Trading Via a Model-Free Feedback Controller,” IEEE Transactions on
pe 1 − pe
Automatic Control, AC-61, pp. 662-676, 2016.
Substitution of (11) and (12) back into (9) and (10) leads to (7), [21] B. R. Barmish and J. A. Primbs, “Stock Trading Via Feedback Control
which when added to (8) results in the sum of (6) and Methods,Encyclopedia of Systems and Control, T. Samad and J. Baillieul
(7) as eds., 2020.
T 2 2 T
E[δ] 2E[qe ] + E[T ] − + E[qe ] PI (k). (13) [22] C. H. Hsieh and B. R. Barmish, “On Drawdown-Modulated Feedback in
pe pe Stock Trading,” Proceedings of IFAC World Congress, vol. 50, pp. 952-
To complete the proof, noting the expected gain is the sum of (5) 958, Toulouse, 2017.
[23] V. Dombrovskii, T. Obyedko and M. Samorodova, “Model Predictive
and (13), using the formulae for PC (k) and PI (k) in Lemma 3.1 Control of Constrained Markovian Jump Nonlinear Stochastic Systems
and temporary notation and Portfolio Optimization Under Market Frictions” Automatica, vol. 87,
. pp. 61-68, 2018.
γ = (−E[qeT ])k /(1 + E[qeT ]), [24] V. Dombrovskii and T. Obyedko, “Model Predictive Control for Con-
strained Systems with Serially Correlated Stochastic Parameters and
a lengthy but straightforward calculation leads to Portfolio Optimization.” Automatica, vol. 54, pp. 325-331, 2015.
[25] A. Bemporad, L. Bellucci and T. Gabbriellini, “Dynamic Option Hedg-
2 2 T
E[g(k)] = E[δ] 2E[qeT ] + E[T ] − + E[qe ] PI (k) ing via Stochastic Model Predictive Control Based on Scenario Simula-
pe pe tion, Quantitative Finance, vol. 14, pp. 1739-1751, 2014.
+E[δ] (E[T ] − 2) PC (k) [26] J. D. O’Brien, M. Burke and K. Burke, “A Generalized Framework
for Simultaneous Long-Short Feedback Trading,” to appear in IEEE
2 2 T 1
= E[δ] 2E[qeT ]+E[T ]− + E[qe ] −γ Transaction on Automatic Control, 2020.
pe pe 1 + E[qeT ] [27] J. A. Primbs and Y. Yamada, “Pairs Trading Under Transactions Costs
Using Model Predictive Control,” Quantitative Finance, vol. 18:6,
" #
E[qeT ] pp. 885-895, 2018.
+E[δ] (E[T ] − 2) +γ
1 + E[qeT ] [28] D. G. Luenberger, Investment Science, Oxford University Press, 2014.
2 (1 − E[qeT ])
= E[δ] E[T ] − +
pe (1 + E[qeT ])
" #!
T k 1 1 − E[qeT ]
2(−E[qe ]) −1 .
pe 1 + E[qeT ]
R EFERENCES
[1] S. Achelis, Technical Analysis From A to Z, McGraw-Hill, 2000.
[2] W. Brock, J. Lakonishok, and B. LeBaron, “Simple Technical Trading
Rules and the Stochastic Properties of Stock Returns,” The Journal of
Finance, vol. 47, pp. 1731-1764, 1992.
0018-9286 (c) 2021 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
Authorized licensed use limited to: National University of Singapore. Downloaded on July 05,2021 at 15:54:17 UTC from IEEE Xplore. Restrictions apply.