Sie sind auf Seite 1von 22

Analysis of Behavioural Reactions in

relation to the Ecient Market Hypothesis


Algorithmic Approach of Technical Swing Trading
Gilbert Sanjaya
366965
Jean-Paul van Brakel
370549
May 25, 2014
Abstract
This research tries to model the movement price of stock prices using a behavioral approach
instead of the conventional and theoretical nancial economics approach. By employing a the-
oretical framework of behavioral economics, incorporating underreactions as well as overre-
actions, this paper deducts that the Ecient Market Hypothesis (EMH) does not accurately
represent the movement of stock prices compared to a more behavioral framework. Specically,
this is tested by developing a model that imitates the technical analysis trading strategy called
Swing-Trading. This is then used to compare it to a linear model based on the EMH. Sub-
sequently, the models will be tested on four major indices: S&P500, AEX 25, FTSE 100 and
the NIKKEI 225. These indices will be tested on short and long run samples respectively. As
hypothesized, the model algorithm conveys that the behavioral model indeed presents a more
accurate prediction of the movement of stock prices compared to the model that obeys to the
EMH assumptions.
Word Count: 4389
Contents
1 Introduction 3
2 Theoretical Framework 4
2.1 Ecient Market Hypothesis (EMH) . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Overcondence and Overreaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Pessimism and Underreaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 Deduction and Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Model 7
4 Methodology 8
5 Results 10
6 Conclusion 13
7 Limitations and Suggestions for Further research 13
7.1 Model Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.2 Hypothetical Deduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.3 Parameter Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.4 Impact of Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
A Appendix 16
2
1 Introduction
In nancial markets, it is an open secret that stock prices are subject to uncertainty and anomaly.
The Ecient Market Hypothesis (EMH), rst developed by Fama (1998), conveys that a stock price
is ecient if it reects all possible information on the market and hence one cannot consistently
achieve abnormal return in excess of average market return. Indeed, empirical evidences have found
that the return of a security consistently demonstrates a remonstrance to the view that securities are
rationally priced to reect all publicly available information (Daniel, Hirshleifer, & Subrahmanyam,
1998). One possibility is that these anomalies are random deviations to be expected under the EMH
(Fama, 1998).
An alternative pathway is to explain this inecient security pricing and the phenomenon of re-
alised abnormal returns, by scrutinizing the validity of a rational risk premium. Conceivably,
variation in marginal utility across investors implies that a risk premium should vary but nonethe-
less in a similar fashion across rational investors with the similar marginal utility. To explain the
predictable variations in market return, Campbell and Cochrane (1994) developed a model that ex-
plains a utility function with an extreme habit of persistence to facilitate dierent preferences. The
model sustains extreme variations in marginal utilities with which it hypothesizes that marginal
utility should correlate strongly with cross-sectional statistics such as returns on the size, book-
to-market, and momentum portfolios. However, the ndings indicate that such correlation is not
present. Given this evidence, the explanation of abnormal returns can also be attributed to the
imperfect rationality of investors (Daniel, Hirshleifer, & Subrahmanyam, 1998). For instance, in a
paper Prospect Theory: an Analysis of Decision Making Risk, Kahneman and Tversky state that
expectations have a fundamental role in the decision-making process (Wilkinson & Klaes, 2012). It
can thereon be deduced that deviations in security prices could also be driven by investors irrational
expectations.
While investors decisions are inuenced by various cognitive biases, this paper will focus on two
decision heuristics: overreaction and underreaction. People have a tendency to exaggerate events.
This has already been observed in the era of David Ricardo. Being an investor himself, he stated
that he had made all his money by observing that people generally exaggerated the importance of
events. If there was reason for a small advance in stock value, he bought a large sum of it because
of his certainty that an unreasonable advance would occur due to this overexaggeration (Brue &
Grant, 2007).
Overreaction and underreaction are closely linked to the information available to investors, yet
it is caused not by the type of information but rather on the psychological state of the investors.
Assume that new information is released, irrespective to what and how the information is released.
Further, assume that the information is correct and is publicly available. The EMH model does
not disprove the existence of overreaction or underreaction in this case. However, EMH strictly
assumes that the price of a security will return to its ecient value after some period of overreaction
or underreaction. This paper will check the credibility of this statement: whether investors expec-
tations are rational in the sense that stock prices converge back to an equilibrium value. Therefore,
behavioural overreactions and underreactions in this paper are more relevant in the context of psy-
chological economics instead of the conventional economic theory of rationality.
3
The aim of the research is to develop a behavioral algorithm that models stock prices under the
inuence of overreactions and underreactions. By modeling such behaviour, this paper aims to
shed a light on uncertainty in nancial markets by exhibiting a more realistic view of the general
behavior of investors. The algorithmic model will be divided into two parts: a linear model and a
behavioral one. Additionally, the algorithm has been programmed so that it can detect structural
breaks whenever it encounters anomalous values that deviate from the models predictions with a
certain threshold. Intuitively, the model with less parameter break implies a better estimator in
explaining the movement of stock prices. By systematically inspecting the performance of each
model, this research will try to answer the following research question and its subquestion:
Research Question
To what extent can the behavioral model explain the movements of stock indices, assuming the
movements occur in the cyclic pattern of the sine wave function.
Do security prices behave in accordance with the EMH or in a repetitive, behaviorial
pattern of overreactions and onderreactions?
2 Theoretical Framework
2.1 Ecient Market Hypothesis (EMH)
Ecient Market Hypothesis (EMH) is a theory that states that in ecient nancial market, se-
curity prices fully reect available information in a rapid and unbiased fashion and thus provide
unbiased estimates of the underlying value (Basu, 1977). The focus of EMH lies on the information
sharing between the investor and thus the classication of the EMH is based on how information
are perceived and spread among investors.
EMH is generally accepted as a paramount theory in explaining the movement in security prices.
However, the 1990s period saw a decline of believe in the EMH. Jensen (1978) has presented one
of the earliest ndings that contradict the deduction of the EMH, in which he has found several
anomalous evidences of securities that deviate from the EMH deduction. DeBondt and Thaler
(1995) found that stock market overreaction has been more persistent than what EMH predicts.
Their ndings are against EMH and urges researchers and investors to be more lenient towards a
behavioral nance approach that focusses on irrationality of individuals and the imperfection of the
nancial markets.
The centrifugal criticism towards EMH is mainly attributed to its conventional rational theory,
which assumes homo economicus; a fully rational human being. Herbert A. Simon (1955), propo-
nent of bounded rationality theory, states that individual rationality is limited by the information
they posses, the cognitive limitation in their minds, and the nite amount of time to make a decision.
This induces the investors to use heuristics, or simple processes that replace complex optimization
in many decisions making processes. This is done rather than rigid-rational optimization (Simon,
1955). Kanheman, Tversky, and Thaler (1986) propose that the imperfection in capital market
are caused by the combination of cognitive biases and various predictable errors in decision mak-
ing. This is due to bounded rationality. Abnormal returns can thus be realized by exploiting the
irrationality of the investors, for example through overcondence and pessimism.
4
2.2 Overcondence and Overreaction
Perhaps the most robust nding in the psychology of judgment is that people are overcondent -
(De Bondt & Thaler, 1995)
As DeBondt and Thaler (1995) suggest, overcondence has been one of the most common cognitive
biases that has been found in many contexts. For instance, physicians often make false-condent
diagnoses, psychologist tends to overgeneralize ndings, and security analysts make overcondent
judgments. Experts are no exception; being an expert does not mean that rationality is enhanced.
Rather, Grin and Tversky (1992) suggest that expert tend to be more overcondent than an in-
experienced individual. Additionally, Einhorn (1980) found that overcondence is more prominent
in tasks that involve judgment, (e.g., stock trading), than for mechanical tasks (e.g., engineer de-
signing) and more severe for tasks that require delayed feedback (e.g., forecasting nancial returns),
than tasks that provide immediate and conclusive feedback.
Daniel, Hirshleifer, and Subrahmanyam (1998) coined the fundamental aspect of overcondence,
biased self-attribution, that is, the condence of investor grows when public information is in line
with his/her information, but does not fall commensurately when public information contradicts
his/her information. This fact has been psychologically tested
1
, as further research concludes that
people tend to credit themselves for past success and blame external factors for failure (Daniel,
Hirshleifer, & Subrahmanyam, 1998).
2.3 Pessimism and Underreaction
The existence of pessimism and underreaction can be associated with the behavioral economic con-
cept of loss aversion, that is, that losses loom larger than gains (Kahneman & Tversky, Prospect
Theory: An Analysis of Decision under Risk, 1979). For example, most people would not bet money
on a symmetrical bet. In nancial markets, it is common for rms to pre-book revenues that it has
not yet received and delay or spread recording costs over several time periods (Wilkinson & Klaes,
2012). Furthermore, Burgstahler and Dichev (1997) nd that rms are more likely to announce
small reported gains than small reported losses. Indeed, rms try to boost investors condence
since they are well aware that investors subconsciously underweigh the probability of success as
suggested by loss aversion.
As previously suggested by Grin and Tversky (1992), underreaction is less common among experts,
but inexperienced individuals are more prone to it. Nevertheless, these empirical and theoretical
nding implicates that, in nancial markets, irrationality is a common bias and every agent is
subjected to cognitive limitation of overcondence or pessimism.
2.4 Deduction and Hypothesis
Extracting the fundamental component of abovementioned theories, this paper attempts to test the
conventional EMH model against a behavioural model. For instance, consider new information of a
possible merger between two rms is expected to increase stock price. The stock price function as
suggested by EMH would be constant around its ecient value (Figure 1a). EMH model can also
1
Daniel, Hirshleifer, and Subharmanyam (1998) have referred these ndings to several psychological literatures.
See: Fischho (1982), Langer and Roth (1975), Miller and Ross (1975), Taylor and Brown (1988).
5
incorporate overreaction or underreaction of investors. However, EMH assumes that overreaction
only occurs temporarily as observed from Figure 1b.
shock
(a) A shock without overreaction according to EMH
shock
(b) A shock with overreaction according to EMH
Figure 1: Visualisation of how shocks are incorporated in stock prices according to the EMH
This paper attempts to reject the rigid assumption of EMH that stock prices stay around its
ecient value. The centrifugal deduction is that overreaction and underreaction does not occur
only around the period of time just after new information is released, as suggested by the EMH,
but rather systematically incorporated in stock price over time and at any moment in time. The
unique characteristic of each investor, whether it is overcondent, pessimistic, or even close to
being rational, will be aggregated and reected in the stock price in a repetitive pattern. Those
characteristics would then create a remonstrance against the theory of the existence of an ecient
value of a stock price. This deduction would be the basis of this papers hypothesis:
Hypothesis 1: Stock prices always deviate around a moving mean because of structural
underreaction and overreaction of investors
Opposed to the EMH, the behavioural pattern of stock movements suggests that investors never
reach an equilibrium: stocks exhibit repetitive states of subsequently optimism, euphoria, slowing
down, reversal, disappointment and pessimism. This implicates that a shock either systematically
changes the moving mean of this cyclic pattern or enlarges the states of the patterns temporarily
or permanently.
shock
Figure 2: A shock according to Behavioral Reactions
Hence, after (and before) any eect of new information kicks in, the investors perception is never
constant or ecient. Rather, it keeps deviating around its ecient value due to innite loop of
6
overreaction and underreaction over time. The implication of the proposition above is visualised in
Figure 2. This Figure exhivits a pattern that may occur upon a shock in the stock price, according
to the behavioral framework.
3 Model
So far, the abovementioned theoretical framework presents a deduction that reject the assumption
of perfect markets and provides evidence for a behavioral approach towards the movement of stock
prices. To test the deduction, two models that take the structure of the behavioral framework, by
utilizing technical analysis, as well as the assumptions of the Ecient Market Hypothesis (EMH)
will be developed. The specic (quantiable) assumptions of the EMH that will be targeted boil
down to the assumptions that holds under the Weak-Form EMH as developed by Fama (1970):
Excess returns cannot be earned in the long run by using investment strategies based on
historical share prices or other historical data.
Technical analysis techniques will not be able to consistently produce excess returns.
Share prices exhibit no serial dependencies, meaning that there are no patterns to asset
prices that make it possible to outperform the overall market systematically.
Henceforth, the model that obeys the assumption of EMH will utilize linear-representation func-
tion, as it closely resembles the theoretical deduction of EMH. In the subsequent result it can be
observed that the graphical representation of linear model also mimics that of EMH. Intuitively,
this is logical since linear function models the shock similar to the rigid-straight line shape of EMH
model.
To incorporate behavioral analysis, this paper will consider the notion of the set of strategies also
referred to as technical analysis. Taylor (1992) denes technical analysis as the method of providing
forecasts or trading advice on the basis of largely visual inspection of past prices, without regard
to any underlying economic or fundamental analysis. In order to implement a counterargument
against the EMH, a strategy out of the set of technical analysis strategies will be taken and applied
in such a way that it contradicts and/or provides counterevidence for the claims made by the EMH
regarding technical analysis.
Specically, a form of technical strategy called Swing-trading will be used. A scientic report by
Pan (2004) conveys that perspective of Swing-trading is the pervasive existence of multilevel swings
and abrupt momentum moves in the market prices, business fundamentals, mass psychology, and
news ow. The dualism of swing versus momentum may resemble the wave-particle dualism in
quantum mechanics, however with much higher nonlinearity and sophistication of human traders
as building elements of the markets (Pan, 2004). This view forms the Swingtum Market Hypothe-
sis, which is arguably better in explaining the reality in nancial market than EMH. Additionally,
one of the motivations of employing Swing-trading strategy is that the notion that is the main
assumption of the Swing-trading strategy is exactly as what this paper hypothesized: that stock
price always deviates around its ecient value.
7
In order to model this dependency, a use of rigorous patterns that takes into account this self-
repeating pattern, the sine function, will be utilized. The sine function is chosen as an element of
the behavioral model since it resembles not only the overreaction and underreactions present in the
main structure of the behavioral framework but it also coheres to the widely popular framework
which is known as the Elliott wave principle (Elliott, 1994).
The Elliott Wave Theory is generally acknowledged as a well-performing pattern for basic technical
analysis strategies. It is based on a certain cyclic laws in human behavior psychology and focuses
on the dierent stages of over- and underreactions, which can be seen in the nal visualization of
the framework that Elliott developed:
Figure 3: The basic structure of the Elliott Wave Pattern
These two underlying aspects of behavioral cycles propose the main argument for the approach.
Using the sine function as the repeating pattern in the model is therefore inline with the generally
acknowledged frameworks, both for stock trading and cyclic analysis of time-series. Using the sine
function also forces our model to incorporate dependency of future prices on historical data, as the
sine function features cycles by denition. Explicitly modeling this autocorrelation is therefore, if
successful, an argument for the existence of stable Swing-trading strategies. This could potentially
generate constant above-market returns, contradicting the EMH assumption as described before.
4 Methodology
In order to keep inline with the denition of the EMH, keeping in mind that shocks and/or changes
in market structure are allowed. This means that we must develop not just a model but an algorithm
which self-adjusts when necessary. This poses a challenge as selection criteria must be applied in
order to model these structural breaks. We have chosen to limit the freedom of our model to two
dierent parameters:
k = deviations
p = intramodel period size
Herein, deviations is the number of k standard deviations from the previous model. These k
deviations serve as the threshold for auto-adjusting. In other words: if future observations surpass
8
this threshold (a breakpoint), the algoritm will adjust itself by constructing a new model from this
breakpoint on forwards.
The intramodel period size is the total number of periods on which seperate models are con-
structed with the total sample size. This means that if a breakpoint occurs in a intramodel period size
block, the model will adjust itself accordingly.
The main strategy of our algorithm is the following:
i = 0
p = 50 (or chosen dierently)
1. Apply model with old coecients from period i to period i + p
2. Regress new model from period i to period i + p
3. Check whether observations from period i to period i+p adhere to the old model: observations
that deviate more than k times the standard deviation of the old model are considered breaks
(which are in period b).
(a) If no breaks: apply old model from i to i + p
(b) If breaks: apply old model from i to i + b, apply new model from breakpoint (period b)
to period i + p
4. i = i + p and return to step 1 until all observations are covered
We will allow independent values of p between the two models with the only restriction being that
p
linear
p
nonlinear
. However, we do take k xed as k = 2. This means that breaks are only recorded
when observations deviate more than 2 standard deviations from the old model. The choice of k
could also be varied to track results.
This algorithm will be used with two dierent models.
The rst one is the linear one (which rejects the possibility of Swing Trading) and over- and
underreactions and is in line with the EMH:
y
i
=
0
+
1
x
i
Where x
i
is period number i and y
i
is the stock (or index) price in period i.
The second model is the behavioural model, which is in line with Swing Trading and the Wave
Theory:
y
i
=
0
+
1
x
i
+
2
sin(
3
x
i
+
4
)
Estimation methods are Ordinary Least Squares for the linear model and for the sine model the
trust-region-reective algorithm which is a commonly used algorithm for Nonlinear Least-Squares
optimisation.
9
Now we will use both models and the proposed algorithm to test the hypothesis on four major
indices (Figure 4). We use Adjusted Close End-Of-Day data from Yahoo Finance for this purpose.
The indices will be tested for dierent intervals (dierent values for p) to see whether the sine wave
algorithm outperforms the linear algorithm both for long term and short term investing.
Index Available data period Long term sample Short term sample
S&P 500 1990/01 - 2014/05 1990/01 - 2014/05 2012/01 - 2014/05
AEX 1992/10 - 2014/05 1995/07 - 2014/05 2012/01 - 2014/05
FTSE 100 1994/01 - 2014/05 1994/01 - 2014/05 2012/01 - 2014/05
Nikkei 225 1992/01 - 2014/05 1992/01 - 2014/05 2012/01 - 2014/05
Figure 4: Data samples per index
Relative performance is tracked with the following three measures:
The Root-Mean-Square Error (RMSE) measure of t. This performance measure is applicable
as the sine model only performs better than the linear model if the data does indeed feature
seasonality or cyclic behaviour of some sort. Therefore the RMSE measure is a great tool to track
relative performance between the models for each index. An added advantage is that the RMSE
represents the sample standard deviation of the residuals, revealing information about the volatility
of the model when it does not perform well. This is important as volatility is the main measure of
accuracy in nancial models (Christoersen & Diebold, 2006).
RMSE =
v
u
u
t
1
n
n
X
t=1
(b y
t
y
t
)
2
Likewise, we will employ the Mean Absolute Error (MAE) and Mean Percentage Squared Error
(MSPE) as each of these criteria may provide useful and additional information.
MAE =
1
n
n
X
i=1
|b y
t
y
t
| MPSE =
1
n
n
X
i=1

b y
t
y
t
y
t

2
5 Results
In the table below is an overview of the acquired results of the employed measures of t as described
in the Section Methodology:
Judging from the results in Figure 5, it is easy to see that the nonlinear model consistently out-
performs the linear model on the Long Term sample. Likewise, judging from Figure 6, the same
pattern appears for the Short Term sample. All measures of t point in the same direction: it is
clear that stock prices should not be modelled in a linear fashion. The sine wave model clearly
prevails in both time frames.
The statistics also reveal that the nonlinear model relatively performs better compared to the
linear model on the Short Term sample than it does on the Long Term sample. This could be
caused by the fact that the Long Term sample also features times of recession or other large shocks
that the Small Term sample does not have. It could also be the case that the behavioral pattern
10
LINEAR model NONLINEAR (sine) model
Index p RMSE MAE MPSE p RMSE MAE MPSE
S&P 500 900 130.19 89.84 0.01613 2000 84.93 66.46 0.01024
AEX 25 900 85.12 69.19 0.06314 3500 65.43 53.80 0.04474
FTSE 100 1000 603.57 455.64 0.01598 4000 508.26 383.60 0.01267
NIKKEI 225 1000 1940.32 1621.10 0.02310 2000 1603.67 1287.02 0.01932
Figure 5: Results of the Measures of Fit for the Long Term sample
LINEAR model NONLINEAR (sine) model
Index p RMSE MAE MPSE p RMSE MAE MPSE
S&P 500 150 34.56 29.54 0.00053 150 22.81 17.07 0.00021
AEX 25 80 8.64 7.18 0.00064 80 5.48 4.38 0.00024
FTSE 100 100 131.54 107.32 0.00045 100 98.56 76.93 0.00025
NIKKEI 225 100 572.30 447.20 0.00224 100 543.68 407.20 0.00194
Figure 6: Results of the Measures of Fit for the Short Term sample
is more apparant in the Short Term. This argument would be backed up by the fact that Swing
Trading strategies are often used on the Primary and Intermediate classications of the Elliott
Wave Theory (Elliott, 1994).
However, the results of both models should not be judged solely by their respective measures
of t. A visual comparison of the models is also crucial in analysing how well the shapes of the
models t to the shapes of the stock indices. A visual overview of the models estimating one of
the indices (AEX) is given on page 12. An overview of the other indices (S&P 500, FTSE 100,
NIKKEI 225) can be found in the Appendix on page 17. From these visualisation it is possible to
deduce the same result: the behavioral model clearly follows the movements of the stock indices in
a more natural and accurate way. The sine wave estimations of two seperate breaks also seem to
approximately connect at break points. This could mean that the sine model could potentially be
a great tool for approximating future movements of the stock indices. Also the fact that the sine
wave model requires less breaks support this inference. This would still need to be investigated in
further research.
11
Figure 7: AEX Long Term Models
500 1000 1500 2000 2500 3000 3500 4000 4500
0
100
200
300
400
500
600
700
800
Trading day in sample (days)
A
E
X

I
n
d
e
x

P
r
ic
e

(
E
U
R
)


AEX
Model
+k*st.dev.
!k*st.dev.
500 1000 1500 2000 2500 3000 3500 4000 4500
0
100
200
300
400
500
600
700
800
Trading day in sample (days)
A
E
X

I
n
d
e
x

P
r
ic
e

(
E
U
R
)


AEX
Model
+k*st.dev.
!k*st.dev.
Figure 8: AEX Short Term Models
50 100 150 200 250 300 350 400 450 500 550
260
280
300
320
340
360
380
400
420
Trading day in sample (days)
A
E
X

I
n
d
e
x

P
r
ic
e

(
E
U
R
)


AEX
Model
+k*st.dev.
!k*st.dev.
50 100 150 200 250 300 350 400 450 500 550
280
300
320
340
360
380
400
420
Trading day in sample (days)
A
E
X

I
n
d
e
x

P
r
ic
e

(
E
U
R
)


AEX
Model
+k*st.dev.
!k*st.dev.
12
6 Conclusion
Based on the result above, the abovementioned research question and subquestion can then be
answered. Indeed, less parameter breaks are needed for the sine model compared to the linear
one. This means that the sine model performs better in a sense that it requires fewer adjustments.
Conceivably, the sine model can estimate the movements of the indices more accurately compared
to the linear model as all measures of t point in this direction. Judging from the resulting graphs,
also visually the sine wave seems to predict future patterns and movements of the indices better
than the linear model. This fact is justied both in short run and long run analysis, enhancing the
validity of the ndings.
The implication is that the theoretical deduction in the beginning of this paper is then justied:
overreaction or underreaction does not occur only in one period of time. Rather, it structurally
incorporates itself in security prices over time, causing uctuations and deviations that cannot be
explained solely by the EMH. This merely reects the fact that each investor has dierent marginal
valuations and behavioral patterns, where one might me overcondent and one might be pessimistic.
However, the combined optimism and pessimism in respectively the bullish or bearish side of the
market leads to combined, predictable, patterns that uctuates over time. This theory, proposed by
Elliott (1994), can therefore also be found empirically. Another important conclusion that can be
drawn is that the release of new information might not be the main catalyst in which overreaction or
underreaction occurs. Rather, those cognitive biases have been persistently incorporated along with
the movement of stock prices due to the irrationality of investors. Arguably then, the model that
is based on the technical-swing trading strategy gives a more accurate estimation in determining
the movements of stock prices. This opposes the rigid-rationality analysis of conventional nancial
economic theory, stated by the EMH.
7 Limitations and Suggestions for Further research
There are several limitations to the nding of abovementioned technical swing analysis and several
suggestions for future research has been presented as follows.
7.1 Model Limitations
The main limitation of using the sine wave as the prominent pattern in regressing on market data
is that the sine function is rather smooth. Stock prices, on the other hand, can exhibit very quick
increases and declines. An example of this problem is visualised in the following graph:
Clearly, the steep declines and rises cannot be modelled very accurately by the sine wave. Therefore,
an alternative pattern that is able to capture these fast movements would improve the model.
7.2 Hypothetical Deduction
The theoretical deduction of this paper is mainly based on intuitive assumptions of irrationality,
that is, it assumes a market with many agents that behave dierently and unique behavioral pattern
of each agent is the main cause of uctuations. Thus, the nding might not be generalizable to
every sector of nancial market, especially to the market that consist of relatively few stakeholders
13
300 350 400 450
330
340
350
360
370
380
390


Figure 9: Example of sine wave not tting the AEX data well
or low number of shares outstanding. Further research is advisable to test the validity of behavioral
model in such market to test its validity towards a market with less behavioral pattern.
7.3 Parameter Estimation
The parameters that are chosen for the models (p and k) are chosen based on empirical ndings. An
analytical approximation for these parameters might lead to better performance. Further research
on deriving better parameters (with, for example, maximum likelihood estimation) is necessary
in order to verify the developed sine algorithm as a reliable alternative to existing techniques for
modeling behavioral patterns in the nancial markets.
7.4 Impact of Information
Finally, the analysis above does not scrutinize the possible impact of new information on the behav-
ioral model. Intuitively, the amplitude of the sine-wave should be higher after the introduction of
new information since the overreaction and underreaction eect become more eminent. A specic
and rigorous research on the impact of information to the behavioral model is also suggested.
Moreover, defendant of EMH argues that nancial market will eliminate behavioral deviations
from standard model. There are three main reasons for this argument (Wilkinson & Klaes, 2012):
1. Aggregation individual deviations will tend to cancel each other out in the market
2. Experience and Expertise skilled expertise are less likely to suer from the same biases as
normal people
2
3. Competition agents who are biased or irrational will be driven out of market
Additionally, Basu (1977) has found that several empirical evidences on the relation between com-
mon stock and price-earnings ratio that EMH deduction is not always incorrect. In general, it is
fair to conclude that the evidence is mixed; some of them are in favor of behavioral model, just as
this paper concludes, and others are for EMH.
2
This deduction contradicts the nding of Grin and Tversky (1992), which states that experts are tend to be
overcondent. Additionally, one study by Haigh and List (2005) found that experts showed even more bias than
non-experts.
14
Concluding, it is important to consider the fundamental deduction for both behavioral model and
EMH. Each of the propositions has its own strengths and weaknesses, and phenomena in nancial
market are better explained by looking from both perspectives. Understanding behavioral deduc-
tion is dicult without having grasped the fundamental of EMH. All in all, both deductions are
complementary to acquire a better understanding of the complex uncertainty-hierarchy of nancial
market.
References
[1] Burgstahler, D., & Dichev, I. (1997). Earnings management to avoid earnings decreases and
losses. Journal of Accounting and Economics (24), 99-126.
[2] Basu, S. (1977). Investment performance of common stocks in relation to their price-earnings
ratios: a test of the Ecient Market Hypothesis. The Journal of Finance , 32 (3), 663.
[3] Brue, S., & Grant, R. (2007). The Evolution of Economic Thought. Mason: Thomson South-
Western.
[4] Campbell, J. Y., & Cochrane, J. H. (1994). By force of habit: A consumption based explanation
of aggregate stock market behavior. University of Chicago. University of Chicago.
[5] Christoersen, P. F., Diebold, F. X. (2006). Financial Asset Returns, Direction-of-Change Fore-
casting, and Volatility Dynamics. Management Science, Vol. 52, No. 8, August 2006. pp. 1273-
1287.
[6] Einhorn, H. J. (1980). Overcondence in Judgment. New Directions for Methodology of Social
and Behavioural Science (4), 1-16.
[7] Daniel, K., Hirshleifer, D., & Subrahmanyam, A. (1998). Investor Psychology and Security
Market Under- and Overreactions. The Journal of Finance , 53, 18391885.
[8] De Bondt, W. F., & Thaler, R. H. (1995). Financial decision-making in markets and rms: A
behavioural perspective. Handbooks in OR & MS , 9.
[9] Elliott, Ralph Nelson (1994). Prechter, Robert R., Jr., ed. R.N. Elliotts Masterworks.
Gainesville, GA: New Classics Library. pp. 70, 217, 194, 196.
[10] Fama, E. (1998). Market Eciency, long term returns and behavioural nance. Journal of
FInancial Economics , 283-306.
[11] Fischho, B. (1982). For those condemned to study the past: Heuristics and biases in hindsight.
Cambridge: Cambridge University Press.
[12] Grin, D., & Tversky, A. (1992). The Weighing of Evidence and the Determinants of Con-
dence. Cognitive Psycology (24), 411-435.
[13] Haigh, M., & List, J. (2005). Do professional traders exhibit myopic loss-aversion? An experi-
mental analysis. Journal of Finance , 60 (1), 523-534.
15
[14] Jensen, M. C. (1978). Some anomalous evidence regarding market eciency. Journal of Finan-
cial Economics , 6 (2-3).
[15] Kahneman , D., & Tversky, A. (1979). Prospect Theory: An Analysis of Decision under Risk.
Econometrica , 2 (47), 263-291.
[16] Kahneman, D., Tversky, A., & Thaler , R. (1986). Rational Choice and the Framing of Deci-
sions. The Journal of Business 2nd ser. 59.4 25178 (2), 251-78.
[17] Langer, E. J., & Roth, J. (1975). Heads I win tails its chance: The illusion of control as a
function of the sequence of outcomes in a purely chance task. Journal of Personality and Social
Psychology (32), 951-955.
[18] Miller, D. T., & Ross, M. (1975). Self-serving bias in attribution of causality: Fact or ction?
Psychological Bulletin (82), 213-225.
[19] Pan, H. (2004). A Swingtum Theory of Intelligent Finance for Swing Trading and Momentum
Trading . Center for Informatics and Applied OptimizationSchool of Information Technology
and Mathematical Sciences University of Ballarat, Mt Helen, VIC 3353, Australia, Center for
Informatics and Applied Optimization. Melbourne: Intelligent Finance Cluster.
[20] Simon, H. A. (1955). A behavioural model of rational choice. Quarterly Journal of Economics
(69), 99-118.
[21] Taylor, M. P. (1992). The use of technical analysis in the foreign exchange market. Journal of
International Money and Finance , 11 (3), 304314.
[22] Taylor, S. E., & Brown, J. D. (1988). Illusion and well-being: A social psychological perspective
on mental health,. Psychological Bulletin (103), 193-210.
[23] Wilkinson, N., & Klaes, M. (2012). An Introduction to Behavioral Economics. New York:
Palgrave Macmillan.
A Appendix
16
Figure 10: S&P 500 Long Term Models
1000 2000 3000 4000 5000 6000
200
400
600
800
1000
1200
1400
1600
1800
2000
Trading day in sample (days)
S
&
P

5
0
0

I
n
d
e
x

P
r
ic
e

(
$
)


S&P 500
Model
+k*st.dev.
!k*st.dev.
1000 2000 3000 4000 5000 6000
200
400
600
800
1000
1200
1400
1600
1800
2000
S
&
P

5
0
0

I
n
d
e
x

P
r
ic
e

(
$
)
Trading day in sample (days)


S&P 500
Model
+k*st.dev.
!k*st.dev.
Figure 11: S&P 500 Short Term Models
50 100 150 200 250 300 350 400 450 500 550
1200
1300
1400
1500
1600
1700
1800
1900
2000
Trading day in sample (days)
S
&
P

5
0
0

I
n
d
e
x

P
r
ic
e

(
$
)


S&P 500
Model
+k*st.dev.
!k*st.dev.
50 100 150 200 250 300 350 400 450 500 550
1200
1300
1400
1500
1600
1700
1800
1900
2000
Trading day in sample (days)
S
&
P

5
0
0

I
n
d
e
x

P
r
ic
e

(
$
)


S&P 500
Model
+k*st.dev.
!k*st.dev.
17
Figure 12: FTSE 100 Long Term Models
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
2000
3000
4000
5000
6000
7000
8000
Trading day in sample (days)
F
T
S
E

1
0
0

I
n
d
e
x

P
r
ic
e

(

)


FTSE 100
Model
+k*st.dev.
!k*st.dev.
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
2000
3000
4000
5000
6000
7000
8000
9000
Trading day in sample (days)
F
T
S
E

1
0
0

I
n
d
e
x

P
r
ic
e

(

)


FTSE 100
Model
+k*st.dev.
!k*st.dev.
Figure 13: FTSE 100 Short Term Models
100 200 300 400 500 600
5200
5400
5600
5800
6000
6200
6400
6600
6800
7000
7200
Trading day in sample (days)
F
T
S
E

1
0
0

I
n
d
e
x

P
r
ic
e

(

)


FTSE 100
Model
+k*st.dev.
!k*st.dev.
100 200 300 400 500 600
5200
5400
5600
5800
6000
6200
6400
6600
6800
7000
7200
Trading day in sample (days)
F
T
S
E

1
0
0

I
n
d
e
x

P
r
ic
e

(

)


FTSE 100
Model
+k*st.dev.
!k*st.dev.
18
Figure 14: NIKKEI 225 Long Term Models
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0
0.5
1
1.5
2
2.5
x 10
4
Trading day in sample (days)
N
I
K
K
E
I

I
n
d
e
x

P
r
ic
e

(

)


NIKKEI
Model
+k*st.dev.
!k*st.dev.
500 1000 1500 2000 2500 3000 3500 4000 4500 5000
0.5
1
1.5
2
2.5
x 10
4
Trading day in sample (days)
N
I
K
K
E
I

I
n
d
e
x

P
r
ic
e

(

)


NIKKEI
Model
+k*st.dev.
!k*st.dev.
Figure 15: NIKKEI 225 Short Term Models
50 100 150 200 250 300 350 400 450 500 550
0.7
0.8
0.9
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
x 10
4
Trading day in sample (days)
N
I
K
K
E
I

I
n
d
e
x

P
r
ic
e

(

)


NIKKEI
Model
+k*st.dev.
!k*st.dev.
50 100 150 200 250 300 350 400 450 500 550
0.7
0.8
0.9
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
x 10
4
Trading day in sample (days)
N
I
K
K
E
I

I
n
d
e
x

P
r
ic
e

(

)


NIKKEI
Model
+k*st.dev.
!k*st.dev.
19
Algorithm in Code
% SPECS
****************
% final data
S = AEX;
nonlinear = true; % set to false for linear model
deviation = 2;
stepsize = 100;
tryMoreGuesses = true;
% SPECS
****************
dataN = S; breaks = [1]; counter = 1; breakflag = 0;
meanREG = []; lowerREG = []; upperREG = [];
options = optimset('MaxFunEvals',50000,'MaxIter', 10000);
% LINEAR
if (nonlinear)
funsin = @(p,xdata) p(1)
*
xdata+p(2);
pguess = [80,0.001];
end
% NONLINEAR
if (nonlinear)
funsin = @(p,xdata) p(1)
*
sin( p(2)
*
xdata+p(3) ) + p(4) + p(5)
*
xdata;
end
% post guesses / starting points here:
pguess = [400 0.13 70 9000 2]; pguess2 = [400 0.15 70 9000 2];
pguess3 = [900 0.13 70 15000 2];
% do FIRST regression
data = dataN( breaks(length(breaks)):stepsize,1);
ydata = [data([1:length(data)], 1)];
xdata = breaks(length(breaks)):1:stepsize;
xdata = xdata';
[p,resnorm,,,output] = lsqcurvefit(funsin,pguess,xdata,ydata,[],[],options);
stdevOutput = sqrt(resnorm)/sqrt(length(data)1);
if (tryMoreGuesses)
[p2,resnorm2,,,output2] = lsqcurvefit(funsin,pguess2,xdata,ydata,[],[],options);
stdevOutput2 = sqrt(resnorm2)/sqrt(length(data)1);
[p3,resnorm3,,,output3] = lsqcurvefit(funsin,pguess3,xdata,ydata,[],[],options);
stdevOutput3 = sqrt(resnorm3)/sqrt(length(data)1);
if (stdevOutput2 < stdevOutput)
if (stdevOutput3 < stdevOutput2)
p = p3;
stdevOutput = stdevOutput3;
else
p = p2;
stdevOutput = stdevOutput2;
end
else
if (stdevOutput3 < stdevOutput)
20
p = p3;
stdevOutput = stdevOutput3;
else
p = p;
stdevOutput = stdevOutput;
end
end
end
Oldp = p;
OldSTDEV = stdevOutput;
lastPos = 1;
for i=stepsize:stepsize:length(dataN)
% do regression from last break to new observation
data = dataN( breaks(length(breaks)):i,1);
ydata = [data([1:length(data)], 1)];
xdata = breaks(length(breaks)):1:i;
xdata = xdata';
[p,resnorm,,,output] = lsqcurvefit(funsin,pguess,xdata,ydata,[],[],options);
stdevOutput = sqrt(resnorm)/sqrt(length(data)1);
if (tryMoreGuesses)
[p2,resnorm2,,,output2] = lsqcurvefit(funsin,pguess2,xdata,ydata,[],[],options);
stdevOutput2 = sqrt(resnorm2)/sqrt(length(data)1);
[p3,resnorm3,,,output3] = lsqcurvefit(funsin,pguess3,xdata,ydata,[],[],options);
stdevOutput3 = sqrt(resnorm3)/sqrt(length(data)1);
if (stdevOutput2 < stdevOutput)
if (stdevOutput3 < stdevOutput2)
p = p3;
stdevOutput = stdevOutput3;
else
p = p2;
stdevOutput = stdevOutput2;
end
else
if (stdevOutput3 < stdevOutput)
p = p3;
stdevOutput = stdevOutput3;
else
p = p;
stdevOutput = stdevOutput;
end
end
end
xdata = lastPos:1:i1;
xdata = xdata';
OldMean = funsin(Oldp,xdata);
OldUpperB = funsin(Oldp,xdata)+deviation
*
OldSTDEV;
OldLowerB = funsin(Oldp,xdata)deviation
*
OldSTDEV;
cN = 1;
lastBreak = 0;
21
breakflag = 0;
% go over observations again
for j=lastPos:1:i1
if (dataN(j,1) > OldUpperB(cN) | | dataN(j,1) < OldLowerB(cN)) && breakflag == 0
breakflag = 1;
breaks = [breaks j];
lastBreak = j;
counter = counter + 1;
end
cN = cN + 1;
end
test = xdata;
if (breakflag == 1)
bdata = lastPos:1:lastBreak1;
bdata = bdata';
xdata = lastBreak:1:i1;
xdata = xdata';
end
if (breakflag == 1)
meanREG = [meanREG; funsin(Oldp,bdata)];
upperREG = [upperREG; funsin(Oldp,bdata)+deviation
*
OldSTDEV];
lowerREG = [lowerREG; funsin(Oldp,bdata)deviation
*
OldSTDEV];
meanREG = [meanREG; funsin(p,xdata)];
upperREG = [upperREG; funsin(p,xdata)+deviation
*
stdevOutput];
lowerREG = [lowerREG; funsin(p,xdata)deviation
*
stdevOutput];
Oldp = p;
OldSTDEV = stdevOutput;
else
meanREG = [meanREG; OldMean];
upperREG = [upperREG; OldUpperB];
lowerREG = [lowerREG; OldLowerB];
end
lastPos = i;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% in real code, the full algorithm is repeated here for the leftover
% which is
% length(dataN) i
% this leftover algorithm is initialised when:
% length(dataN) i > stepsize
%
% this algorithm is removed because otherwise the code would span 7+ pages
%
% For the full code, please consult J.P.G. van Brakel or G. Sanjaya
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end
22

Das könnte Ihnen auch gefallen