Professional Documents
Culture Documents
heterogeneous agent models can thus help to discipline the defined in the following sections of this paper). The ’s are
wilderness of agent-based modeling.” time-varying coefficients (representing the evolving market
The third approach to studying the dynamic changes of stock reality (Lo, 2004)), and means the i’th excess
prices is technical analysis that summarizes the trading demand is not present at time t. The ’s can be
heuristics from stock practitioners over hundreds of years of determined based on stock price data , and
real stock trading experiences in human civilization (Lo and we will show the details in Part III of this paper. To convert the
Hasanhodzic, 2010). The foundation of technical analysis is the technical trading rules into excess demand functions, we first
belief that prices follow trends so that past price information is define fuzzy sets to characterize the words used in the technical
useful in predicting the future price values. The mainstream trading rules so that these technical rules become fuzzy
academics do not view technical analysis as a serious scientific IF-THEN rules in the framework of fuzzy systems theory. Then,
discipline and claim that “chart-reading must share a pedestal standard fuzzy logic principles are employed to combine these
with alchemy” (Malkiel, 2012). While the academics stand firm fuzzy IF-THEN rules into fuzzy systems which are the excess
on the Efficient Markets Hypothesis (Fama, 1970) and believe demands in the price dynamic equation (1).
that stock prices are unpredictable, the practitioners are using Part I of this paper is organized as follows. In Sections II, III,
technical trading rules to “ride the trends” to make a lot of IV, VI and VII, we will convert a number of popular technical
money (Lo and Hasanhodzic, 2009). Some open-minded trading rules into excess demand functions, including moving
academics studied the performance of some technical trading average rules, support and resistance rules, trend line rules,
rules and gave positive conclusions (e.g., Brock, Lakonishok band and stop rules, and volume and relative strength rules. To
and LeBaron, 1992; Gencay, 1998; Sullivan, Timmermann and make the picture more complete, in Section V we will
White, 1999; Lo, Mamaysky and Wang, 2000). A main formulate the typical actions of the big buyers and big sellers
criticism of technical analysis is that most technical rules (the institutional traders who manage large sums of money) and
require subjective judgment because the rules are expressed in the manipulators in terms of fuzzy IF-THEN rules. Simulations
terms of natural languages where fuzzy words and vague will be performed in these sections to illustrate the typical price
descriptions are everywhere. For example, one such trading trajectories of these models. Some concluding remarks will be
rule might be: “If the momentum of the uptrend is too strong, drawn in Section VIII.
over-bought may have occurred so that a trailing stop should be In Part II of this paper, we will analyze the price dynamic
placed somewhere below the current price to secure some model (1) with moving-average rules in details to show the
profits.” How strong is “too strong”? Where is “somewhere”? stability, volatility, short-term predictability, return
What amount should be placed at the trailing stop? This is independency, fat-tailed return distribution and other properties
where the academics leave the practitioners (Gigerenzer, 1996; of the model. In Part III of this paper, we will show how to
Gigerenzer and Gaissmaier, 2011), and this is where fuzzy detect big buyers and big sellers in Hong Kong stock market
systems theory (Zadeh, 1971) comes to play, as we will do in based on the price dynamic model (1) and develop two trading
this paper. strategies (called follow-the-big-buyer and ride-the-mood) to
The basic idea of this paper is to use fuzzy systems theory to beat the benchmark buy-and-hold strategy.
convert the technical trading rules into excess demand (demand
minus supply) functions which are then used to drive the price II. MOVING AVERAGE RULES
dynamics. Specifically, consider a stock whose price at time
point t is , where t=0,1,2,…. Suppose there are M groups of The most commonly-used trading rules by technical traders are
traders who are trading this stock from t to t+1, and the traders based on price moving averages of different lengths. The basic
in a group are using the same technical trading rules. By philosophy behind these rules is that the price may be on a trend
converting the technical trading rules for a group, say group , if a shorter moving average is crossing a longer moving average.
into a single excess demand function , we obtain the More specifically, one such trading heuristic is as follows.
price dynamical model as follows:
Heuristic 1: A buy (sell) signal is generated if a shorter
moving average of the price is crossing a longer moving
average of the price from below (above). Usually, the larger the
difference between the two moving averages, the stronger the
buy (sell) signal. But, if the difference between the two moving
where the coefficient accounts for the strength of the averages is too large, the stock may be over-bought (over-sold),
traders in group for the relative change of price from t to t+1, so a small sell (buy) order should be placed to safeguard the
and the denotes variables computed from the past prices and investment.
other information available at time t (the ’s will be precisely
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 3
We now translate this heuristic into an excess demand demand (demand minus supply) and it can be positive (demand >
function using fuzzy systems theory. The moving average of supply) or negative (demand < supply). Define seven fuzzy sets
the stock price with length n is defined as “Buy Small (BS)”, “Buy Medium (BM)”, “Buy Big (BB)”,
“Sell Small (SS)”, “Sell Medium (SM)”, “Sell Big (SB)” and
“Neutral (N)” for ed with membership functions shown in Fig.
2. For example, the membership function of BM (Buy Medium)
is
and
is the log-ratio (relative change) of the price moving average of The numbers 0.1, 0.2 and 0.4 in Fig. 2 indicate, respectively,
length-m to the price moving average of length-n where m<n. 10%, 20% and 40% of the buying or selling power of the
The common choices of (m,n) are (1,5), (1,10), (5,20), (5,50), traders who use Heuristic 1 as their trading strategy. So “Buy
etc. (when m=1, is the current price ). A positive Small”, “Buy Medium” and “Buy Big” means using around
implies a rising mode of the stock, whereas a negative 10%, 20% and 40% of the buying power, respectively. The
signals the weakness of the stock price. sell-side is just the mirror of the buy-side. You can of course
To translate Heuristic 1 into the language of fuzzy systems choose other numbers to reflect the preference of different
theory, we first define fuzzy sets to clarify the meaning of the traders.
-3w -2w -w 0 w 2w 3w
SB SM SS N BS BM BB
With the fuzzy sets defined in Figs. 1 and 2, we can now (t=101 to t=500) were generated by the price dynamical model
convert Heuristic 1 into the following seven fuzzy IF-THEN (9). We see from Fig. 3 that although there is only one group of
rules which we call Rule 1 Group: traders who were using the same trading rules (7), the resulting
price dynamics were complex and chaotic. Comparing the
Rule 11: IF is Positive Small (PS), THEN is Buy Small (BS) random walk prices to with the fuzzy-rule-driven
Rule 12: IF is Positive Medium (PM), THEN is Buy Big (BB) prices to , we see that the big pictures look quite
similar for these two fundamentally different models: one is
Rule 13: IF is Positive Large (PL), THEN is Sell Medium (SM)
random and the other is deterministic.
Rule 14: IF is Negative Small (NS), THEN is Sell Small (SS) (7)
(m,n)=(1,5), w=0.01, a1=0.2
20
Rule 15: IF is Negative Medium (NM), THEN is Sell Big (SB)
15 random walk Rule 1 group
Rule 16: IF is Negative Large (NL), THEN is Buy Medium (BM)
10
Rule 17: IF is Around Zero (AZ), THEN is Neutral (N)
5
0 50 100 150 200 250 300 350 400 450 500
The meaning of these rules is explained as follows: Rule 11 and
Rule 12 (Rule 14 and Rule 15 ) follow the uptrend (downtrend), 20
suggests.
5
With Heuristic 1 being transformed into the fuzzy IF-THEN 0 50 100 150 200 250 300 350 400 450 500
Fig. 3: Three simulation runs of price generated by the random walk model
(10) (t=1 to t=100) and the Rule-1-Group-driven price dynamic model (9)
(t=101 to t=500) with (m,n)=(1,5), w=0.01 (1%), ,
where , , , , and .
, , are the fuzzy sets shown in Fig. 1, and
, , , , , We now make a few remarks about what to look for from the
, are the centers of the fuzzy sets BS, BB, SM, simulated price curves (Figs. 3 to 12). Why is technical analysis
SS, SB, BM and N shown in Fig. 2, respectively. Substituting so popular among traders? One explanation is that we humans
(8) into (1), we obtain the price dynamic equation: have a very good vision system, and price curves provide a very
convenient framework for our vision system. “A picture is
worth a thousand words.” The trading-heuristic-driven price
dynamic models proposed in this paper produce very complex
that shows how the price evolves if considering only the traders and chaotic price trajectories. In fact, whenever we made a new
who use Heuristic 1 (Rule 1 Group) as their trading strategy. simulation of the price dynamic model with randomly chosen
We now simulate the price dynamic equation (9) with initial condition, we got a totally different price series (the three
(m,n)=(1,5), w=0.01 (1%) and ; three simulation price trajectories in each Figs. 3 to 12 were chosen randomly
runs were performed and the resulting price series are from the simulations). This is consistent with the evolving
shown in Fig. 3, where the first 100 (t=1 to t=100) were market reality (Lo, 2004). Therefore, revealing specific
generated by the random walk model: characters of the models is not the main purpose of illustrating
these simulated price trajectories; rather, we would like to give
the reader the “big picture” or some “feeling” about what price
series the models would produce. This is quite different from
with being independent Gaussian random variables of mean our usual simulations for engineering systems where some
0 and variance 1, and ; the remaining fixed phenomenon occurs whenever and wherever we do the
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 5
is the lowest trough in the time interval . When Rule 21: IF is Positive Small (PS), THEN is Buy Small (BS)
the n in (11) and (12) are set equal to the current time t, the Rule 22: IF is Positive Medium (PM), THEN is Buy Big (BB)
resistance (support) point is the highest peak (lowest trough) in
Rule 23: IF is Positive Large (PL), THEN is Sell Medium (SM)
the entire history of the price.
The basic philosophy of the technical trading rules based on Rule 24: IF is Negative Small (NS), THEN is Sell Small (SS) (15)
support and resistance points is that the support (resistance) Rule 25: IF is Negative Medium (NM), THEN is Sell Big (SB)
point is the lowest (highest) price in recent history where the
Rule 26: IF is Negative Large (NL), THEN is Buy Medium (BM)
buyers (sellers) were becoming stronger than the sellers
(buyers), so that if this support (resistance) price is broken, then
a downtrend (uptrend) might be establishing. So we have the Combining these rules into a standard fuzzy system we get
following heuristic:
which shows how the price changes when two groups of traders points and traders were jumped in to catch up the trends, which
are trading in the time interval (t,t+1), where one group of caused the jumps in price. Fig. 5 shows three simulation runs of
traders use Rule 1 Group (7) and the other use Rule 2 Group the price dynamic equation:
(15). Fig. 4 shows the price for three simulation runs with
parameters (m,n)=(1,5), n*=100, w=0.01, and
, where the first 100 (t=1 to t=100) were generated
by the random walk model (10) with and , with parameters n*=100, w=0.01, , and
and the remaining (t=101 to t=500) were generated by the , where the first 100 prices come from the pure random
price dynamic model (17). walk model (10) and the remaining prices are generated by (18).
Comparing the price trajectories in Figs. 3 and 4 we see that From Fig. 5 we see that there are indeed many jumps in the
there were some big jumps when Rule 2 Group was added. prices and these jumps are caused by the in (18).
These jumps occurred when the prices crossed the support or
n*=100, w=0.01, a2=0.5
resistance lines. 30
25
(m,n)=(1,5), n*=100, w=0.01, a1=0.2, a2=1
30
20 random walk random walk + Rule 2 group
25 15
10
20 random walk Rule 1+2 groups
15 5
0 50 100 150 200 250 300 350 400 450 500
10
5
30
0 50 100 150 200 250 300 350 400 450 500
25
15 5
5
0 50 100 150 200 250 300 350 400 450 500 30
25
5
0 50 100 150 200 250 300 350 400 450 500
Fig. 5: Three simulation runs of price generated by the random walk model
(10) (t=1 to t=100) and the random walk plus Rule-2-Group model (18) (t=101
Fig. 4: Three simulation runs of price generated by the random walk model to t=500) with n*=100, w=0.01, , and .
(10) (t=1 to t=100) and the Rule-1-plus-Rule-2-Group-driven price dynamic
model (17) (t=101 to t=500) with (m,n)=(1,5), n*=100, w=0.01, ,
, and .
Another trading heuristic related to support and resistance
points concerns the traders who missed the buying (selling)
We know that the real stock prices exhibit jumps that the opportunity at the last low (high) price. These traders have a
random walk model cannot capture. The mathematical finance strong tendency to buy (sell) when the price is getting around
literature dealt with this problem by adding a jump random the support (resistance) point once again; this gives us the
process to the random walk model (10) (e.g. Merton, 1976) or following heuristic:
by modeling the volatility as a random variable (e.g.
Bollerslev, Chou and Kroner, 1992; Bouchaud and Potters, Heuristic 3: For those traders who felt regret to miss the
2003; Fouque, Papanicolaou and Sircar, 2000). The problem of buying (sell) opportunity at the last low (high) price, the chance
these random approaches is that they cannot explain why the comes again when the price is getting around the support
jumps occurred at those particular locations. So it will be (resistance) point one more time, so buy (sell) medium (not big
interesting if we can show that jumps occur when we add the because the price may break across the support (resistance) line
excess demand of Rule 2 Group to the random walk model this time, and not small because you don’t want to miss this
(10), because in so doing we can explain why the jumps opportunity too much).
occurred at those particular locations: the reason is that the
previous support or resistance lines were broken at these time
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 7
This heuristic is transformed into the following Rule 3 IV. TREND LINE RULES
Group:
Trend lines are lines that connect peaks or troughs and extend
Rule 31: IF is Around Zero (AZ), THEN is Sell Medium (SM) into the future. There are two types of trend lines: uptrend line
and downtrend line. An uptrend (downtrend) line is established
Rule 32: IF is Around Zero (AZ), THEN is Buy Medium (BM) (19)
if the line connecting the troughs (peaks) is pointing upwards
(downwards). More specifically, let and (
and the excess demand function from the Rule-3-Group traders
is the following fuzzy system: and ) be the two lowest (highest) troughs (peaks) in the
time interval [t-n, t-1] with t1<t2, i.e.,
25
10
5
0 50 100 150 200 250 300 350 400 450 500
25
10
5
0 50 100 150 200 250 300 350 400 450 500
30
25
20 random walk Rule 1+2+3 groups where , time t is the horizontal-axis and
15
price is the vertical-axis.
10
5
The basic logic behind the trading heuristics related to trend
0 50 100 150 200 250 300 350 400 450 500 lines is that it is usually difficult to break through a trend line
because the existence of a trend line means that a trend has
already been in place, so a breakdown (breakup) across the
Fig. 6: Three simulation runs of price generated by the random walk model
(10) (t=1 to t=100) and the price dynamic model (1) (t=101 to t=500) with the uptrend (downtrend) line will most likely end up with a
three excess demand functions , and from Rule 1, Rule 2 and Rule pullback (throwback). This gives the following heuristic:
3 Groups.
Heuristic 4: If the current price is getting closer to an
uptrend (downtrend) line from above
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 8
25
10
5
0 50 100 150 200 250 300 350 400 450 500
30
25
10
5
0 50 100 150 200 250 300 350 400 450 500
30
25
10
Fig. 7: Three simulation runs of price generated by the random walk model
The excess demand function from the Rule-4-Group traders is (10) (t=1 to t=100) and the price dynamic model (1) (t=101 to t=500) with the
the following fuzzy system: two excess demand functions and from Rule 1 and Rule 4 Groups.
prices came from the pure random walk model (10) and the
remaining prices were generated by (1) with all other ’s and the excess demand function from the Rule-5-Group traders
except and equal to zero. Comparing Fig. 7 with is the following fuzzy system:
Fig. 3, we see that more trending happened when the
Rule-4-Group traders were added. Originally the Rule-4-Group
traders just anticipate that a trend may be coming and act
according to their guess, but their actions cause the trend to
really happen; this is self-fulfilling, a typical phenomenon in
real markets.
Another trading heuristic related to trend lines is about trend
reversal. Experience has shown that if an established trend line
was broken by a relatively large amount, then the trend might where or ( and are defined in
have been reversed. This gives the following trading heuristic: (25) and (26)), PM, PL, NM and NL are fuzzy sets shown in Fig.
1, and 0.1, 0.4, -0.1 and -0.4 are the centers of fuzzy sets BS,
Heuristic 5: If the current price is under (above) the uptrend BB, SS and SB shown in Fig. 2, respectively.
(downtrend) line for a medium to large Fig. 8 shows three simulation runs of the Rule-1+5-Groups
case with parameters (m,n)=(1,5), n*=100, w=0.01,
, and , where the first 100
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 9
prices came from the pure random walk model (10) and the Rule 61: IF is Positive Small (PS), THEN is Sell Small (SS)
remaining prices were generated by (1) with all other ’s Rule 62: IF is Positive Medium (PM), THEN is Sell Medium (SM)
except and equal to zero. Again we see
Rule 63: IF is Positive Large (PL), THEN is Sell Big (SB) (31)
self-fulfilling phenomenon in Fig. 8: the big jumps in prices
were generated by the Rule-5-group traders who took actions to Rule 64: IF is Around Zero (AZ), THEN is Neutral (N)
anticipate the end of the old trends and these actions ended the
old trends. and Heuristic 7 into the following Rule 7 Group:
(m,n)=(1,5), n*=100, w=0.01, a1=0.2, a5=1
30 Rule 71: IF is Negative Small (NS), THEN is Buy Small (BS)
25
Rule 72: IF is Negative Medium (NM), THEN is Buy Medium (BM)
20 random walk Rule 1+5 groups
15
Rule 73: IF is Negative Large (NL), HEN is Buy Big (BB) (32)
10
10
5
0 50 100 150 200 250 300 350 400 450 500
01 PS
02 PM
0 PL
30
25
PS PM PL AZ
20 random walk Rule 1+5 groups
15
10 where and
5
0 50 100 150 200 250 300 350 400 450 500
Fig. 8: Three simulation runs for the case of Rule-1-Group plus Rule-5-Group.
25 15
10 14
5
0 50 100 150 200 250 300 350 400 450 500
13
30
25
10
5 11
10
Fig. 9: Three simulation runs for the case of Rule-1-Group plus Rule-6-Group
(big sellers).
9
0 50 100 150 200 250 300 350 400 450 500
10
Since the manipulator trades like a big buyer (seller) in Phase
5
0 50 100 150 200 250 300 350 400 450 500 1 (Phase 3), the excess demand function equals ( ) in
these phases. For Phase 2 (the pushing-up phase), the strategy is
30
25
the following treading heuristic:
20 random walk Rule 1+7 groups
15 Heuristic 8: Buy the stock with big money within very short
10
time to clear the ask (sell) side of the order book quickly.
5
0 50 100 150 200 250 300 350 400 450 500
which, when expressed in terms of fuzzy IF-THEN rules, is the
30
following Rule 8 Group:
25
10
Fig. 10: Three simulation runs for the case of Rule-1-Group plus Rule-7-Group
(big buyers).
01 NS
02 NM
0 NL
strategies (Leinweber and Madhavan, 2001; Fan, 2010; Jiang,
2013) to move the price up or down very quickly to create a NS NM NL AZ
mood of optimistic or fear as a trap for other traders. Fig. 11
illustrates a typical working cycle of the pump-and-dump 01 PS
02 PM
0 PL
process: in Phase 1 the manipulator trades like a big buyer using
PS PM PL AZ
Heuristic 7, i.e., collecting a large sum of stocks at relatively
(36)
low prices; in Phase 2 the manipulator uses strong capital to
push the stock price up very quickly (by clearing the ask-side of
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 11
where in Phase 1 and in Phase 3. Fig. 11 which, when combined into a fuzzy system, give the following
is in fact a simulation run of (1) with and , where Phase excess demand function:
2 is from t=200 to t=220.
based on the Bollinger Band is the following: 20 random walk random walk + Rule 9 group
15
5
Band , it is a sign of the start of a 0 50 100 150 200 250 300 350 400 450 500
new trend, so a buy (if the price is above the Band) or sell (if the 30
price is below the Band) order should be in place. 25
10
5
0 50 100 150 200 250 300 350 400 450 500
ln
30
25
10
Fig. 12: Three simulation runs of random walk plus Rule-9-Group model (43).
maximum losses allowed and clear the position when the hard If the denominator of (45) equals zero, then . The
limits are reached, and trailing stops that protect profits from final excess demand function from Rule-10-Group is the
deteriorating back into a loss. There are many types of weighted average of the ’s with weights :
protective and trailing stops, such as Hard Money Stops,
Breakeven Stops, Technical Point Stops, Volatility Stops,
Trend Line Stops, Adaptive Stops, Time Stops, Signal Stops,
etc. (Kirkpatrick and Dahlquist, 2011). The following heuristic
summarizes a typical protective stop and a typical trailing stop:
The rules in the last five sections used only the past price
To translate Heuristic 10 into fuzzy IF-THEN rules, let
information of the same stock. In this section we consider the
be the amount of a stock in the portfolio purchased at price trading rules that use not only its own past prices but also other
( ) and max be the information such as volume and the prices of other stocks in the
maximum of the last n prices of the stock. Then Heuristic 10 market. Since the key of technical trading is “follow the trend”,
becomes the following Rule 10 Group: the indicators considered in this section are used to confirm a
trend or to give early warning for a possible trend reversal.
Rule 101: IF is Not Around Zero ( and is Negative Large We start with volume. A useful volume indicator is the
(NL), THEN is Sell Big (SB) on-balance volume defined as follows:
Rule 102: IF is Not Around Zero ( and is Positive (P)
min2
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 13
02 PS P
02 NS N
PS P NS N
where if the denominator of (57) equals zero. The
If the denominator of (53) equals zero, then . price dynamics driven by can be simulated if we consider
Since volume data are not available for our price models (it is a multi-stock simulation model; however, we will leave it to
our current research topic to build dynamical models for another paper concentrating on this very important topic:
volumes based on technical trading rules), we will not perform interactions among multiple stocks.
simulations for Rule 11 Group. For real stocks where volume
data are available, the Rule-11-Group rules can be incorporated VIII. CONCLUDING REMARKS
into the price dynamic model (1) in the same manner as the
rules in other groups. Stock prices are generated by the actions of stock traders, and
according to a survey of 692 fund managers in five countries
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 14
(Menkhoff, 2010), the vast majority of the fund managers rely The price dynamical models proposed in this paper are
on technical analysis4. The main contribution of this paper is to totally deterministic, so a natural question is how these models
build a bridge between the fuzzy, linguistic world of technical compare with the mainstream stochastic models that provide
analysis and the rigorous, mathematical world of nonlinear measures of unpredictable uncertainties 6 ? To answer this
dynamic equations, as illustrated in Fig. 13. In Part I of this question, let’s see how the mainstream stochastic models
paper, we developed the details of transforming twelve handle the unpredictable uncertainties: these models usually
common trading heuristics into nonlinear dynamical equations have a simple deterministic part (linear or simple ad-hoc
and simulated these models to illustrate how simple technical nonlinear functions of state variables), and leave the real
trading rules can produce complex price patterns. There have important part of the (unknown) dynamics to the noise term
been a huge number of technical trading rules accumulated (representing unpredictable uncertainties); then, they assume
during the long history of technical analysis (Lo and that the noise term is zero-mean and i.i.d. (or make other
Hasanhodzic, 2010) and more rules are being proposed comparable assumptions in order for the mathematics to march
constantly to adapt to the evolving market conditions5; by using forward beautifully). We know a key characteristic of financial
the methods of this paper we can transform these linguistic systems is evolving (time-varying, non-stationary7; Lo, 2004).
descriptions of trading wisdoms into dynamical equations and How can one faithfully assume a key part of an evolving,
observe exactly what price trajectories and patterns these non-stationary dynamics (the unpredictable uncertainties) to be
heuristic rules can produce. Furthermore, these dynamical zero-mean (a time-invariant constant)? Furthermore, the i.i.d.
equations allowed us to study the price dynamics generated by assumption implies that the traders are drunkards (Malkiel,
the technical trading rules in a mathematically rigorous fashion 2012) --- the move in one step has no relation to the moves of
(as we will do in Part II of this paper) and push technical the previous steps. Real traders are betting in real money, they
analysis forward in the direction from an art to a science. are serious, they are watching the evolving markets closely and
Practically, these models provide us a framework to detect the making decisions accordingly, they are socially connected and
hidden operations in the market so that trading strategies can be influence each other, and they are not some random noise from
developed to beat the benchmark Buy-and-Hold strategy (as we the background as in an electronic circuit model. So, we will
will do in Part III of this paper). ultimately have to roll up our sleeves to dig deep into the origin
of the price formation machine 8 to build a deterministic,
Technical analysis Dynamical systems theory cause-effect model for the key dynamics; the models proposed
(fuzzy, linguistic world) Fuzzy systems (precise, mathematical world)
in this paper are a trial in this direction.
The main difference between Natural Sciences and Social
Trend following; Equilibrium; Sciences is that we know the basic laws governing the motions
Contrarian; Stability; of the objects in Natural Sciences such as the Newton’s Laws,
Stop-loss; Lyapunov exponent; whereas the basic objects in Social Sciences are human beings
Band rules; Strange attractors;
and we do not have the “Newton’s Laws for human subjects.”
That is, we lack a deep underpinning for understanding the
Oscillators; Fractal dimensions;
mechanisms at the origin of the dynamical behavior of financial
Pattern rules; Emergence;
markets (Mirowski, 1989; Kirman, 1989; Malevergne and
Sornette, 2006). Our current stage of understanding social
systems is quite similar to “the blind monks touching the
elephant”. In our pursuit for the basic laws of stock markets, we
6
“The human brain is wonderful at spotting patterns. It's an ability that is one
Fig. 13: The “main story” this paper is trying to tell: A bridge is being built
of the foundation stones of science. When we notice a pattern, we try to pin it
across the gulf between the fuzzy, linguistic world of technical analysis which
down mathematically, and then use the maths to help us understand the world
is rich in trading wisdom on one side and the precise, mathematical world of
around us. And if we can't spot a pattern, we don't put its absence down to
dynamical systems theory which is rich in rigorous tools on the other side.
ignorance. Instead we fall back on our favourite alternative. We call it
randomness.” --- Ian Stewart (Stewart, 2004).
7
4
Traders come and go (Foucault, Pagano and Roell, 2013), and different
More specifically, for the forecasting horizon of weeks, the relative traders use different trading strategies, which results in different price patterns
importance is 29.4 for Technical Analysis, 28.4 for Order Flow, and 1.4 for at different time points, meaning that the returns are non-stationary.
8
Fundamental Analysis for US fund managers; for German fund managers, By which we mean both the mechanical setup of the limit order book
these numbers are 60 for Technical Analysis, 22.6 for Order Flow, and 6.7 for dynamics (Gould, Porter, Williams, McDonald, Fenn and Howison, 2013;
Fundamental Analysis; see Fig. 2 in Menkhoff 2010 for more data. Bouchaud, Farmer and Lillo, 2008; Cont, Kukannov and Stoikov, 2014) and the
5
According to Schmidt 2011, a search on Amazon.com using the key words investors’ mindset (Keynes, 1935; Graham, 1973; Lynch, 1989; Soros, 2003;
technical analysis for new books that were printed between January 2001 and etc.) including their “obstinate passion” for technical analysis (Menkhoff and
September 2010 yielded 468 entries --- roughly one new book every week. Taylor, 2007).
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 15
should listen carefully to what the real traders say about their price dynamics, which is what we are going to do in Part II of
crafts (e.g. Livermore, 1940; Lynch, 1989; Soros, 2003; this paper (Part II can be found at arXiv:1401.1891), next.
Lindsey and Schachter, 2007; Lo and Hasanhodzic, 2009),
because human traders are the “atoms of stock markets.” As Participating function
one of the most successful speculators in modern finance,
George Soros has a Theory of Reflexivity which, in his own
words (page 2 of Soros, 2003), is described as follows:
[6] Bollerslev, T., R.Y. Chou and K.F. Kroner, “ARCH Modeling in Finance: [31] Kirilenko, A.A. and A.W. Lo, “Moore’s Law versus Murphy’s Law:
A Review of the Theory and Empirical Evidence,” Journal of Algorithmic Trading and Its Discontents,” Journal of Economic
Econometrics 52: 5-59, 1992. Perspectives, 27: 51-72, 2013.
[7] Bollinger, J., Bollinger on Bollinger Bands, McGraw-Hill, New York, [32] Kirkpatrick, C.D. and J. Dahlquist, Technical Analysis: The Complete
2002. Resource for Financial market Technicians (Second Edition), Pearson
[8] Bouchaud, J.P., D. Farmer and F. Lillo, “How Markets Slowly Digest Education, New Jersey, 2011.
Changes in Supply and Demand,” in T. Hens, K. Schenk-Hoppe, eds., [33] Kirkpatrick, C.D. and J. Dahlquist, Study Guide for the Second Edition of
Handbook of Financial Market: Dynamics and Evolution, Elsevier: Technical Analysis: The Complete Resource for Financial market
Academic Press: 57-160, 2008. Technicians, Pearson Education, New Jersey, 2013.
[9] Bouchaud, J.P. and M. Potters, Theory of Financial Risks: From Statistical [34] Kyle, A.S., “Continuous Auction and Insider Trading,” Econometrica53:
Physics to Risk Management (2nd Edition), Cambridge University Press, 1315-1335, 1985.
Cambridge, 2003. [35] Kyle, A.S. and S. Viswanathan, “Price Manipulation in Financial
[10] Bradshaw, M.T., S.A. Richardson and R.G. Sloan, “Pump and Dump: An Markets: How to Define Illegal Price Manipulation,” American Economic
Empirical Analysis of the Relation Between Corporate Financing Review 98:2, 274-279, 2008.
Activities and Sell-side Analyst Research,” SSNR 410521, 2003. [36] LeBaron, B., S.H. Chen and S. Sunder, “The Future of Agent-Based
[11] Brock, W.A. J. Lakonishok and B. LeBaron, “Simple Technical Trading Research in Economics: A Panel Discussion,” Eastern Economic Journal
Rules and the Stochastic Properties of Stock Returns,” Journal of Finance 34: 550-565, 2008.
47: 1731-1764, 1992. [37] Leinweber, D.J. and A.N. Madhavan, “Three Hundred Years of Stock
[12] Cont, R., A. Kukannov and S. Stoikov, “The Price Impact of Order Book Market Manipulations,” The Journal of Investing 10: 7-16, 2001.
Events,” J. Financial Econometrics 12: 47-88, 2014. [38] Lindsey, R.R. and B. Schachter, How I Became a Quant: Insights From
[13] Elton, E.J., M.J. Gruber, S.J. Brown and W.N. Goetzmann, Modern 25 of Wall Street’s Elite, John Wiley & Sons, New Jersey, 2007.
Portfolio Theory and Investment Analysis (7th Edition), John Wiley & [39] Livermore, J., How to Trade in Stocks, (McGraw-Hill, 2001), 1940.
Sons, Inc., 2007. [40] Lo, A.W., “The Adaptive Market Hypothesis: Market Efficiency from an
[14] Engle, R.F., “Autoregressive Conditional Heteroskedasticity with Evolutionary Perspective,” The Journal of Portfolio Management 30:
Estimates of the Variance of U.K. Inflation,” Econometrica 50: 987-1008, 15-29, 2004.
1982. [41] Lo, A.W. and J. Hasanhodzic, The Heretics of Finance: Conversations
[15] Fama, E., “Efficient Capital Markets: A Review of Theory and Empirical with Leading Practitioners of Technical Analysis, Bloomberg Press, New
Work,” Journal of Finance 25: 383-417, 1970. York, 2009.
[16] Fan, J.J., Follow the Banker (in Chinese), China Machine Press, Beijing, [42] Lo, A.W. and J. Hasanhodzic, The Evolution of Technical Analysis:
2010. Financial Prediction from Babylonian Tablets to Bloomberg Terminals,
[17] Foucault, T., M. Pagano and A. Roell, Market Liquidity: Theory, John Wiley & Sons, Inc., New Jersey, 2010.
Evidence, and Policy, Oxford University Press, 2013. [43] Lo, A.W., H. Mamaysky and J. Wang, “Foundations of Technical
[18] Fouque, J.P., G. Papanicolaou and K.R. Sircar, Derivatives in Financial Analysis: Computational Algorithms, Statistical Inference, and Empirical
Markets with Stochastic Volatility, Cambridge University Press, 2000. Implementation,” Journal of Finance 55: 1705-1765, 2000.
[19] Gencay, R., “The Predictability of Security Returns with Simple [44] Lux, T., “The Socio-Economic Dynamics of Speculative Markets:
Technical Trading Rules,” Journal of Empirical Finances 5: 347-359, Interacting Agents, chaos, and the Fat Tails of Return Distribution,”
1998. Journal of Economic Behavior & Organizations 33: 143-165, 1998.
[20] Gigerenzer, G., “On Narrow Norms and Vague Heuristics: A Reply to [45] Lux, T. and M. Marchesi, “Scaling and Criticality in A Stochastic
Kahneman and Tversky (1996),” Psychological Review 103: 592-596, Multi-Agent Model of A Financial Market,” Nature 397: 498-500, 1999.
1996. [46] Lynch, P., One Up on Wall Street: How to Use What You Already Know
[21] Gigerenzer, G. and W. Gaissmaier, “Heuristic Decision Making,” Annual to Make Money in the Market, Simon & Schuster Paperbacks, New York,
Review of Psychology 62: 451-482, 2011. 1989.
[22] Gould, M.D., M.A. Porter, S. Williams, M. McDonald, D.J. Fenn and S.D. [47] Malevergne, Y. and D. Sornette, Extreme Financial Risks: From
Howison, “Limit Order Books,” Quantitative Finance 13: 1709-1742, Dependence to Risk Management, Springer-Verlag Berlin Heidelberg,
2013. 2006.
[23] Graham, B., The Intelligent Investor (Revised Edition), Harper Business, [48] Malkiel, B.G., A Random Walk Down Wall Street (10 th Edition), W.W.
1973. Norton & Co., New York, 2012.
[24] Graham, B. and D. Dodd, Security Analysis (6th Edition), (McGraw-Hill, [49] Menkhoff, L., “The Use of Technical Analysis by Fund Managers:
New York, 2009), 1940. International Evidence,” Journal of Banking & Finance 34: 2573-2586,
[25] Hommes, C.H., “Heterogeneous Agent Models in Economics and 2010.
Finance,” in L. Tesfatsion and K.L. Judd, eds., Handbook of [50] Menkhoff, L. and M.P. Taylor, “The Obstinate Passion of Foreign
Computational Economics Vol. 2: Agent-Based Computational Exchange Professionals: Technical Analysis,” Journal of Economic
Economics, Elsevier B.V.: 1109-1186, 2006. Literature XLV: 936-972, 2007.
[26] Hull, J.C., Options, Futures, and Other Derivatives (7th Edition), Pearson [51] Merton, R.C., “Option Pricing When Underlying Stock Returns Are
Education, Inc., 2009. Discontinuous,” Journal of Financial Economics 3: 125-144, 1976.
[27] Jegadeesh, N and S. Titman, “Returns to Buying Winners and Selling [52] Mirowski, P., More Heat Than Light: Economics as Social Physics,
Losers: Implications for Stock Market Efficiency,” Journal of Finance 48: Physics as Nature’s Economics, Cambridge University Press, 1989.
65-91, 1993. [53] Schmidt, A.B., Financial Markets and Trading: An Introduction to
[28] Jiang, X.S., Reveal the Secrets of Main Force Manipulation (in Chinese), Market Microstructure and Trading Strategies, John Wiley & Sons, New
Tsinghua University Press, 2013. Jersey, 2011.
[29] Keynes, J.M., The General Theory of Employment, Interest and Money, [54] Soros, G., The Alchemy of Finance, John Wiley & Sons, New Jersey,
(BN Publishing, 2009), 1935. 2003.
[30] Kirman, A., “The Intrinsic Limits of Modern Economic Theory: The [55] Stewart, I., “In the Lap of the Gods,” NewScientist, 25 Sept. 2004.
Emperor Has No Clothes,” Economic Journal 99:126-139, 1989.
For referencing please quote: IEEE Trans. on Fuzzy Systems 23(4): 1127-1141, 2015. 17