You are on page 1of 22

Technical Analysis Compared to Mathematical Models Based Methods Under Parameters Mis-specication

Christophette Blanchet-Scalliet1 , Awa Diop2 , Rajna Gibson3 , Denis Talay2 , Etienne Tanre2 ,
Abstract In this study, we compare the performance of trading strategies based on possibly mis-specied mathematical models with a trading strategy based on a technical trading rule. In both cases, the trader attempts to predict a change in the drift of the stock return occurring at an unknown time. We explicitly compute the traders expected logarithmic utility of wealth for the various trading strategies. We next rely on Monte Carlo numerical experiments to compare their performance. The simulations show that under parameter mis-specication, the technical analysis technique outperforms the optimal allocation strategy but not the model and detect strategies. The latter strategies dominance is conrmed under parameter mis-specication as long as the two stock returns drifts are high in absolute terms.

Keywords Stochastic models, Model specication, Portfolio allocation, chartist. JEL classication G11, G14, C15, C65 AMS classication 60G35, 93E20, 91B28, 91B26, 91B70.

Acknowledgment Financial support by the National Centre of Competence in Research Financial valuation and Risk Management (NCCR FINRISK) is gratefully acknowledged. NCCR-FINRISK is a research program supported by the Swiss National Science Foundation.

1 Laboratoire Dieudonn, universit Nice Sophia-Antipolis Parc Valrose 06108 Nice Cedex 2, FRANCE, e e blanchet@math.unice.fr 2 INRIA, Projet OMEGA, 2004 route des Lucioles, BP93, 06902 Sophia-Antipolis, France, {Awa.Diop,Denis.Talay,Etienne.Tanre}@sophia.inria.fr. Awa Diop gratefully acknowledges nancial support from the National Centre of Competence in Research Conceptual Issues in Financial Risk Management (NCCRFINRISK), 3 NCCR FINRISK, Swiss Banking Institute, University of Zurich, Plattenstrasse 14, Zurich 8032, Switzerland, Email: rgibson@isb.unizh.ch

Introduction

The nancial services industry typically relies on three main approaches to make investment decisions: the fundamental approach that uses fundamental economic principles to form portfolios, the technical analysis approach that uses price and/or volume histories and the mathematical approach that is based on mathematical models. Technical analysis has been used by professional investors for more than a century. The academic community has looked at its foundations and its performance with a rather skeptical frame of mind. Indeed, technical analysis techniques have limited theoretical justication, and they stand in contradiction to the conclusions of the ecient market hypothesis. More recently, there has been a renewal of academic interest in the performance of technical analysis based methods. Indeed, the pioneering study by Brock, Lakonishok and Le Baron [6] applied 26 trading rules to the Dow Jones Industrial Average and found that they signicantly outperform a benchmark of holding cash. In their impressive study, Sullivan, Timmermann and White [15] examine close to 8000 technical trading rules and repeat Brock and al. study while correcting it for data snooping problems. They nd that the trading rules examined by Brock and al. do not generate superior performance out-of sample. Lo, Mamaysky and Wang [11] propose to use a non-parametric kernel regressions pattern recognition method in order to automate the evaluation of technical analysis trading techniques. In their comprehensive study they compare the unconditional and the conditional - on technical analysis indicators - distribution of a large number of stocks traded on the NYSE/AMEX and on the NASDAQ. They conclude that several technical indicators do provide some incremental information and may have some practical value. However, as pointed out by Jegadeesh [7] in his comment of the Lo and al. paper [11], none of the technical analysis indicators examined by the authors is able to identify profitable investment opportunities. Thus, it seems that the debate about the eectiveness of technical analysis usefulness is still very much alive. The purpose of our study is to examine chartist and mathematical models based trading strategies by providing a conceptual framework where their performance can be compared. If one considers a nonstationary economy, it is impossible to specify and calibrate mathematical models that can capture all the sources of parameter instability during a long time interval. In such an environment, one can only attempt to divide any long investment period into sub-periods such that, in each of these sub-periods, the nancial assets prices can reasonably be supposed to follow some particular distribution (e.g., a stochastic dierential system with a xed volatility function). Due to the investment opportunity sets instability, each sub-period must be short. Therefore, one can only use small amounts of data during each sub-period to calibrate the model, and the calibration errors can be substantial. Yet, any investment strategys performance depends on the underlying model characterizing the evolution of the investment opportunity set and also on the parameters involved in the model. Thus, in a non-stationary economy, one can use strategies which have been optimally designed under the assumption that the market is well described by a prescribed model, but these strategies can be extremely misleading in practice because the prescribed model does not t the actual evolution of the investment opportunity set. In such a situation, is one better of using a technical analysis based trading rule which is free of any model dependency? In order to answer that question one should compare the performance obtained by using erroneously calibrated mathematical models with the one associated with technical analysis techniques. To our knowledge, this question has not yet been investigated in the academic literature. More specically, we here consider the following test case: the agent in a frictionless continuous-time economy can invest in a riskless asset and in a stock. The instantaneous expected rate of return of the stock changes once at an unknown random time. We compare the performance of traders who respectively use: A technical analysis technique, namely the simple moving average technique in order to predict the change in the stock returns drift. a portfolio allocation strategy which is optimal when the mathematical model is perfectly specied and calibrated. two mathematical strategies called model and detect strategies aimed at detecting the time of the 2

drift change. the three previous strategies under mis-specied parameters (due to the error on calibration). The study is divided into two parts: a mathematical part which, whenever possible, provides analytical formulae for portfolios managed by means of mathematical and technical analysis strategies and a numerical part which provides comparisons between the various strategies performance. Based on the numerical simulations, we nd that the chartist strategy can outperform optimal portfolio allocation models when there is parameter mis-specication. However, the model and detect mathematical strategies clearly dominate the chartist trading rule even when they are subject to parameter mis-specication. The paper is organized as follows: In section 2, we describe the basic setting underlying our mathematical modeling. In sections 3 and 4, we examine the performance of a trader whose strategy is based on mathematical models. In section 3, we examine the optimal portfolio allocation strategy. We give explicit formulas for the optimal wealth and the portfolio strategy of a trader who perfectly knows all the parameters characterizing the investment opportunity set and thus fully describe the best nancial performance that one can expect within our model. In section 4, we consider a trader who uses mathematical models in order to detect the change time in the drift of the stock price process as early and reliably as possible: he/she selects a stopping time adapted to the ltration generated by (St ), which serves as an alarm signal (this strategy is called Model and Detect). In section 5, we consider the performances of the optimal portfolio allocation strategy and of the Model and Detect strategy when the trader mis-species the parameters of the model. In section 6, we focus on a technical analyst who uses a simple moving average indicator to detect the time at which the drift of the stock return switches. We characterize his/her expected utility of wealth in the logarithmic case. We also numerically illustrate the properties of his/her strategys performance. Finally, in section 7,we compare the performances of the mis-specied mathematical strategies to those of the technical analysis technique.1 .

Description of the Setting

We consider a frictionless continuous-time economy with two assets that are traded continuously. The rst one is an asset without systematic risk, typically a riskless bond (or bank account), whose price at time t evolves according to the following equation
0 dSt 0 S0 0 = St rdt, = 1.

The second asset is a stock subject to systematic risk. We model the evolution of its price at time t by the linear stochastic dierential equation dSt S0 = St 2 + (1 2 )1(t ) dt + St dBt , = S0, (2.1)

where (Bt )0tT is a one-dimensional Brownian motion on a given probability space (, F, P). The random time of the stcok return drift change is independent of B and has an exponential distribution with parameter : P ( > t) = et , t 0. (2.2) At time , which is neither known, nor directly observable, the instantaneous expected rate of return changes from 1 to 2 .
1A

short version of this paper has been published in [3].

We suppose that the parameters 1 , 2 , > 0 and r 0 satisfy 1 2 2 < r < 2 . 2 2

The main purpose of this study will be to use this setting in order to examine if mathematical models used to detect the time change in the drift of the stock price process lead to better predictions and thus to superior performance than a very popular technical analysis method based on a simple moving average signal.

3
3.1

The Optimal Portfolio Allocation Strategy Under a Change of Drift


Introduction

We start by characterizing the optimal wealth and portfolio allocation of a trader who perfectly knows all the parameters 1 , 2 , , r and . Of course, this situation is unrealistic. However, it is worth computing the best performance that one can expect within our setting. This performance represents an optimal benchmark for mis-specied allocation strategies relying either on a mathematical model or on technical analysis. Let t be the proportion of the traders wealth invested in the stock at time t; the remaining proportion 1 t is invested in the bond. For a given, non random, initial capital x > 0, let Wx, denote the wealth process corresponding to the portfolio ( ). We have dWtx, = Wtx, rdt + t 1 r + (2 1 )1( t) dt + dBt . (3.1)

Now, let U () denote a utility function. We suppose that U is strictly increasing, concave, of class C 2 (0, ) and satises U (0+) = lim U (x) = , U () = lim U (x) = 0.
x0 x

Let A(x) denote the set of admissible strategies, that is, the set of processes which take values in [0, 1] and are progressively measurable with respect to the ltration FS generated by the observed prices St . It is easy to see that, for all process in A(x), Wtx, > 0 for all t. The investors objective is to maximize his/her expected utility of wealth at the terminal date T . He/she solves the following optimization problem: V (x) :=
A(x) sup E [U (WT )|W0 = x] .

(3.2)

In order to compare the performance of the optimal strategy dened by (3.2) to the one pursued by a technical analyst, we impose constraints on the portfolio weights. Indeed, we will below assume that the technical analyst invests all of his/her wealth either in the stock or in the bond depending upon the moving average signal. We therefore assume that the portfolio weights of the trader pursuing an optimal strategy are also constrained to lie within the interval [0, 1] in the absence of short selling.

3.2

The Case of General Utility Functions

In order to compute the constrained optimal wealth of the trader, we use the martingale approach to stochastic control problems as developed by Karatzas, Shreve, Cvitani, etc. More precisely, we follow and c carefully adapt the martingale approach to the well known optimal consumption-portfolio problem studied by Merton [13]. We emphasize that our traders situation diers from the Merton problem for the following three reasons: 4

The drift coecient of the dynamics of the risky asset return is not constant over time (since it changes at the random time ). We face some subtle measurability issues since the traders strategy needs to be adapted with respect to the ltration generated by (St ). As already mentioned, the drift change at the random time makes this ltration dierent from the ltration generated by the Brownian motion (Bt ). The portfolio weight is constrained to lie in a nite interval ([0, 1]). These three features of our problem make it hard to construct optimal strategies. Indeed, in the case of a general utility function, we need an additional hypothesis described below to prove the existence of an optimal constrained allocation strategy , and to exhibit an abstract representation for the corresponding optimal portfolio process. As in Karatzas-Shreve [10], we introduce an auxiliary unconstrained market M dened as follows: Let S D be the subset of {Ft } progressively measurable processes : [0, T ] R such that
T

E
0

(t) dt < , where (t) := inf(0, (t)).

The bond price process S 0 () and the stock price S() satisfy
0 dS 0 dSt () = 0t + (t)dt, 0 St () St dSt () dSt = + (t) + (t) dt. St () St

We compute the optimal allocation strategy for each auxiliary unconstrained market driven by a process (see Proposition 3.1). We conclude with Proposition 3.2 which links the optimal strategy for the constrained problem with the set of optimal strategies for auxiliary unconstrained markets. For each auxiliary unconstrained market, let A(x, ) denote the set of admissible strategies, that is,
, S A(x, ) := { Ft progressively measurable process s.t. W0 = x, Wt, > 0 for all t > 0}.

We have to solve the following problem P : V (, x) := where dWt, dSt () dS 0 () + (1 t ) 0t , = t Wt St () St () dWt = + (t) + t (t) dt. Wt sup
A(,x) , , E [U (WT )|W0 = x] ,

(3.3)

To characterize optimal allocation strategies and their associated wealth level, we need to introduce four processes which are adapted to the ltration FS generated by the observed price process. The exponential likelihood-ratio process Lt is dened by Lt = St S0
2 1 2

exp

1 2 2

(2 1 )2 + 2(2 1 )(1

2 ) t . 2

(3.4)

The conditional a posteriori probability Ft that the change point has appeared before time t is Ft := S P t|Ft . t et Lt 0 es L1 ds s Ft = (3.5) t s 1 t L 1 + e Ls ds t 0 e The innovation process B is dened by Bt = 1 Rt (1 2 )t (2 1 ) 2
t

Fs ds , t 0.
0

(3.6)

The process B is a Brownian motion for the ltration FS .


The exponential process Ht : t Ht = exp

0 t 0

1 r + (s) (2 1 )Fs +
2

dB s

1 2

1 r + (s) (2 1 )Fs +

ds .

Proposition 3.1. For each D, the optimal wealth is


, WT = (U ) 1 Rt
0

yHT erT (s)ds

RT
0

(t)dt

Wt,

ert+

Ht

E HT erT

RT
0

(s)ds

(U )

yHT erT

RT
0

(s)ds

S |Ft .

Moreover, the optimal strategy satises


, t = 1

1 r + (2 1 )Ft + (t) t Rt + W , ert 0 (s)ds Ht t

(3.7)

where Ft is dened as in (3.5), y stands for the Lagrange multiplier, that is, is such that
T E HT exp(rT 0 S and is a Ft adapted process which satises E HT e(rT RT
0

(t)dt) (U )

T (yHT exp(rT 0

(t)dt)) = x.

(t)dt)

(U )

yHT e(rT

RT
0

(t)dt)

t S Ft

=x+
0

s dB s .

The proof is postponed to the Appendix. Wt, In view of (3.3), we observe that for each constrained strategy , (t) + t (t) 0, and therefore Wt and V (, x) V (x). So, V (x) inf D V (, x). The following proposition tells us that, if the minimum is attained, then the minimizing auxiliary strategy provides the optimal constrained strategy . Proposition 3.2. If there exists in D such that V (, x) = inf V (, x),
D

(3.8)

then an optimal portfolio , for the unconstrained problem P is also an optimal portfolio for the constrained original problem P, such that

Wt = Wt An optimal portfolio allocation strategy is


t := 1

,e

and

V (x) = V (, x).

(3.9)

t 1 r + (2 1 )Ft + (t) Rt + e W ert 0 (s)ds e Ht t

(3.10)

where Ft is dened as in (3.5). Proof. See the proof in Karatzas-Shreve [10] p. 275.

3.3

The Case of the Logarithmic Utility Function

When the agent has a logarithmic utility function, we can verify the existence of a satisfying (3.8) and explicit the optimal allocation strategy and its associated wealth W ,x . Proposition 3.3. If U () = log() and the initial endowment is x, then the optimal wealth process and strategy are Wt,x where (t) = x exp rt + =
t 0

(s)ds , (3.11)

e Ht

( r + ( )F ) 1 2 1 t 0 2 (1 r + (2 1 )Ft )

1 r + (2 1 )Ft < 0, 2 1 r + (2 1 )Ft [0, 1], if 2 otherwise, if

(3.12)

and, as above, (t) = inf (0, (t)) . In addition,


t = proj[0,1]

1 r + (2 1 )Ft 2

(3.13)

Proof. If U (x) = log(x) for each D, the solution of the unconstrained problem is
, t

= = =

1 r + (2 1 )Ft + (t) , 2 x exp rt +


t 0 Ht

Wt, V (, x)

(s)ds ,
T

log x + rT + E
0 T

(t) dt
2

+E
0

1 2

1 r + (2 1 )Ft + (t)

dt .

(3.14)

Then the process dened by (3.12) satises (t) + 1 2 1 r + (2 1 )Ft + (t)


2

= inf

(t) +

1 2

1 r + (2 1 )Ft + (t)

Remark 3.4. Optimal strategies for the constrained problem are projections on [0, 1] of optimal strategies for the unconstrained problem. Remark 3.5. In the case of the logarithmic utility function, when t is small and thus smaller than the change time with high probability, Ft is close to 0; since, by hypothesis, one also has 1 r 0, the optimal 2 risky asset portfolio weight is close to 0 ; after the change time , Ft is close to 1, and the optimal risky asset portfolio weight is close to min(1, 2 r ). In both cases, we approximately recover the optimal strategies of 2 the constrained Merton problem. with drift parameters equal to 1 or 2 respectively.
Remark 3.6. Notice that, in view of (3.4), (3.5) and (3.13), t can be expressed in terms of the prices (Su , 0 u t). e Using the explicit value (3.12) of (t), one can obtain an explicit formula for the value function V (x) corresponding to the optimal strategy.

The derivations of the optimal portfolio weights and of the expected utility of wealth for the logarithmic investor will serve as benchmarks to compare the performances obtained by the model and detect strategy and the strategy pursued by a technical analyst. Indeed, we can write (see Appendix 9.3) a lengthy formula for the value function V (x) by using a result due to Yor (see Yor [16] or BorodinSalminen [5, formula 1.20.8 p.618]). See [4] for further details.

Two Model and Detect Strategies

The optimal portfolio allocation strategy in the previous section supposes that the trader is allowed to continuously change his/her portfolio allocation. In this section, the trader is allowed to change his/her allocation only once. So, the trader uses an optimal detection procedure to decide when to rebalance his/her portfolio. In order to facilitate the comparison with the performance of the technical analysts strategy, we here assume that the trader arbitrarily sets the stock weight to = 0 before the drift change and subsequently to 1. We continue to suppose that the trader perfectly knows all the parameters of the model. We consider two detection methods: the rst one has been proposed by Karatzas [9], and the other one has been proposed by Shiryayev [14]. The goal of these two methods is to nd a stopping rule which detects the instant at whihc the drift of the stock return changes. We compute the wealth of the trader who uses one of the two model and detect strategies. In both cases, the trader puts all of his/her money in the bond until , and in the stock after , thus his wealth satises: WT =
0 xS 0 ST 1(T ) + xST 1(>T ) . S

The time is interpreted as the alarm time, it can occur before (in this case, it corresponds to a false alarm), or after . So, the amount of time by which the stopping rule misses the true change of drift point is given by | |. The main mathematical tool used to obtain these two stopping rules is the process Ft , the (conditional) probability that the (unknown) change point appeared before the running time t. For each procedure, the trader decides to invest his/her wealth in the stock when Ft is bigger than a given quantity repectively equal to p for the Karatzas method (see (4.2)) and to A for the Shiryayevs method (see (4.3)). These two quantities will be dened in Sections 4.1 and 4.2. 8

With the Karatzas method, the trader minimizes the expected miss E| |. With Shiryayevs one, the trader minimizes {P( < ) + cE( )+ }, i.e., he/she does not give the same weight to errors generated by false alarms ( < ) and errors generated by late alarms ( ).

4.1

Karatzas Method

We rst adapt Karatzass detection method to compute the optimal stopping rule K that minimizes the expected miss R() := E| | (4.1) over all stopping rules , when is assumed to have the a priori exponential distribution (2.2). Proposition 4.1. The stopping rule K which minimizes the expected miss E| | over all the stopping rules with E() < is (4.2) K = inf t 0 Ft p , where Ft is dened as in (3.5) and p is the unique solution in ( 1 , 1) of the equation 2
1/2 0

(1 2s)e/s 2 s ds = (1 s)2+

p 1/2

(2s 1)e/s 2 s ds, (1 s)2+

where = 2 2 /(2 1 )2 . Proof. We adapt Karatzass method in [9] to our specic case. Denote by S the collection of stopping rules : [0, ) such that E() < . Rewrite (4.1) as follows: R() = E ( )+ + ( )+ = E( )+ + E( ) E( ). Then, using (2.2) and the notation (3.5), we get R() = = = We thus obtain
S

1 +E 1 +E 1 + 2E

1( s) ds
0

1( >s) ds

21( s) 1
0

1(s) ds

Fs
0

1 2

ds.

inf R() =

1 + 2 inf E S

Fs
0

1 2

ds.

It now remains to follow Karatzas arguments (see [9]). The terminal wealth of a trader who uses Karatzas detection procedure satises WT = xer exp (BT BK ) + (1 + (2 1 )[(T )+ (K )+ ] + x exp(rT )1(K >T ) .
K

2 )(T K ) 2

1(K T )

4.2

Shiryayevs Method

The detection method proposed by Shiryayev (namely the Variant B in [14]) consists in computing B(c) := inf {P( < ) + cE( )+ }

and the corresponding optimal stopping time for a given c > 0. For all c > 0, this time is given by S (A ) := inf{t 0; Ft A } (4.3)

where F is the conditional a posteriori probability solution of (9.6) and the parameter A is dened as the root in (0, 1) of the equation
A

exp
0

1 2 (2 1 )2 y =

1 y(1 y)2
2

y 1y

2 2 (2 1 )2

dy A 1 A

(2 1 ) 2 1 exp 2 2 c (2 1 )2 A

2 2 (2 1 )2

For both Karatzas and Shiryayevs detection procedures, we are able to write explicit formulae for the expected utility of terminal wealth, E(log(WT )) (similar to the formula in Proposition 6.1 below). Due to their complexity, these formulae do not allow us to compare the expected utility of terminal wealth associated with the model and detect strategies to the one obtained when pursuing the optimal strategy or the technical analysis based strategy. In section 7, we therefore rely on numerical simulations to make comparisons between the various strategies performances. Remark 4.2. Beibel and Lerche [2] have considered the model (2.1) with 1 r 2 . 2 2 They have studied the problem of maximizing E er S 1(<) over all stopping times adapted to the ltration generated by (St ). We do not examine their detection procedure in our study.
2 2

Mis-specied Trading Models

In reality, it is extremely dicult to know the parameters characterizing the investment opportunity set exactly. It may be possible to calibrate the rst drift coecient 1 and the volatility coecient relatively well owing to historical data, but the value of 2 cannot be determined a priori (i.e. before the occurrence of the drift change), and the law of cannot be calibrated accurately because of the lack of data associated with . It is thus reasonable to assess the impact of estimation risk on the performance of the various model - based detection strategies.

5.1

Mis-specication of the Parameters

We consider the case where each parameter is estimated with error. In other words, the trader believes that the stock price satises the following stochastic dierential equation: dSt = St 2 + (1 2 )1(t ) dt + St dBt , (5.1)

where the law of is exponential with parameter , while the true stock price is still given by (2.1). Our aim is to study the mis-specied optimal allocation strategy and the mis-specied model and detect strategy. 10

Notation. As in the previous developments without estimation error, we set Rt = log(St ), where St denotes the current stock price. We need to compute Lt and Ft (see (3.4) and (3.5)) to apply the optimal allocation strategy and the model and detect strategies. We dene the approximated quantities computed when the model is mis-specied Lt and F t as follows: Lt = exp Ft = 1 1 2 (2 1 )Rt 2 2
t s 1 e Ls ds 0 . t s 1 et Lt 0 e Ls ds

(2 1 )2 + 2(2 1 )(1

2 ) t , 2

et Lt 1+

5.2

On the Mis-specied Optimal Allocation Strategy

Observing the stock price St , the trader computes a pseudo optimal portfolio allocation by using the erroneous parameters 1 , 2 , and . Thus, the stock proportion of his/her mis-specied optimal allocation strategy satises ( r + (2 1 )F t ) = proj[0,1] 1 , t 2 and the corresponding wealth satises W t = ert exp
0 t

d(eru Su ) . u

5.3

On Mis-specied Model and Detect Strategies


K

The erroneous stopping rule for the Karatzas dtection time rule sasties = inf t 0, F t p

1 where p is the unique solution in ( , 1) of the equation 2


1/2 0

(1 2s)e/s (1 s)2+

s2 ds =
1/2

(2s 1)e/s (1 s)2+

s2 ds

with = 2 /(2 1 ) . The wealth of the model and detect trading strategy satises
0 W T = xSK

ST 0 1 K + xST 1(K >T ) . SK ( T )

A similar approach based on the results obtained in section 4.2 can be followed to compute the erroneous stopping rule and its associated wealth for the Shiryayev detection rule.

6
6.1

The Chartist Investment Strategy


Introduction

Technical analysis makes predictions about the evolution of an assets price and denes trading rules using only the assets price (or/and volume) history. Thus, technical analysts compute indicators based on the assets past transaction prices and volumes. These indicators are used as trading signals assuming that (see, e.g., the book by Steve Achelis [1]) : 11

The price of a stock is governed by the law of supply and demand. The stock price evolves according to trends during discernible periods. These discernible tendencies repeat themselves in a regular fashion. A very large number of technical analysis indicators are used by practitioners. In their impressive study, Sullivan, Timmermann and White [15] provide a parameterization for 7846 distinct trading rules. Here, we limit ourselves to the simple moving average indicator because it is easy to compute and widely used to detect trend patterns in stock prices. In order to compute its value, one averages the closing prices of the stock during the most recent time periods. When prices are trending, this indicator reacts quickly to recent price changes.

6.2

Moving Average Indicator for the Stock Prices

Consider a chartist trader who takes decisions at discrete times during the interval [0, T ] with time increments T t = N : 0 = t0 < t1 < . . . < tN = T ; tk = kt. We denote by t {0, 1} the proportion of the agents wealth invested in the risky asset at time t, and by Mt the simple moving average indicator of the prices dened as Mt = 1
t

Su du.
t

(6.1)

The parameter denotes the size of the time window used to compute the moving average.
At time 0, the agent knows the past prices of the stock and has enough data to compute M0 . At each tn , n [1 N ], the chartist follows a very simple trading strategy: all the wealth is invested into the risky asset if the price Stn is larger than the moving average Mtn . Otherwise, all the wealth is invested into the riskless asset. This portfolio investment strategy is thus analogous to the one followed by the model and detect trader.

Consequently,

tn = 1(St M ) . n tn

(6.2)

Denote by x the initial wealth of the trader. The wealth at time tn+1 is Wtn+1 = Wtn
0 0 and therefore, since Stn+1 /Stn = exp(rt), N 1 0 St Stn+1 tn + n+1 (1 tn ) , 0 Stn Stn

WT = x
n=0

tn

Stn+1 exp(rt) + exp(rt) . Stn

(6.3)

6.3

The Particular Case of the Logarithmic Utility Function

We now assume that the chartist trader displays a logarithmic utility function. Then, his expected utility of wealth can be explicitly characterized.

12

Proposition 6.1. Consider a technical analyst whose strategy is dened as in (6.2). Then his expected logarithmic utility of wealth satises E log WT erT x = 2 2 (1) r T p 2 2 r 2 1 eT (2) (1) (3) (p p )e + p 1 et 1 eT (3) p , 1 et

+ t 2

t(2 1 )(et t) where we have set p = p =


(2) (1) 0 0 R4 y

z 2 3/2 2y

(2 / /2) (1 + z 2 ) 2 2 2 y i2 /2 e
)

z 2 y

dzdy,

1(

y2

z1 +z2 y1

z2 2 2y2

3/2

2 (2 / /2) ( v) (1 + z2 ) 2y 2 2 2 i2 (v)/2 e 2 (1 / /2) v (1 + z1 ) 2y 2 2 1 i2 v/2 e 2

z2 2 y2

3/2 z1 1

2y1

z1 2 y1

ev dy1 dz1 dy2 dz2 dv, p =


(3) 0 y

z 1 3/2 2y

(1 / /2) (1 + z 2 ) 2 2 2 y i2 /2 e

z 2 y

dzdy,

the function i being dened as in (9.11). Proof. In view of Stj+1 = exp Stj and (6.2), we have E log WT x = 1 2 r t 2
N 1 N 1

2 2

t + (2 1 ) (tj+1 max(, tj )) + (Btj+1 Btj ) ,

(6.4)

P Stj Mtj
j=0

+ (2 1 )
j=0

1(Stj Mt ) (tj+1 max(, tj ))+


j

N 1

+ rT +
j=0

1(Stj Mt ) (Btj+1 Btj ) .


j

From here, one obtains the result by lengthy calculations using independence and identity in law arguments, and Lemma 9.3 in the Appendix. Remark 6.2. Relying on proposition 6.1, one can use numerical optimization procedures to optimize the choice of , the moving average window size. As we will see in the next section, inadequate choices of may negatively aect the performance of the technical analyst strategy. 13

7
7.1

A Numerical Comparison of the Various Strategies


Empirical Determination of a Good Windowing

Before turning to a comparison between the various trading strategies, we rst show how to optimize the choice of the moving average window size by using Proposition 6.1 and deterministic numerical optimization procedures, or by means of Monte Carlo simulations. In this subsection, we present results obtained from Monte Carlo simulations to show that inadequate choices of may indeed alter the performance of the technical analyst strategy. For each value of we have simulated 500,000 trajectories of the asset price and computed the expected utility of terminal wealth, E log(WT ) by a Monte Carlo method. In all our simulations the empirical variance of log(WT ) is set at 0.04. Thus, the Monte Carlo error on E log(WT ) is of the order 5.104 with probability 0.99. At rst, the number of price trajectories used for these simulations may seem too large; however, considered as a function of , the quantity E log(WT ) varies very slowly, so that we really need a large number of simulations to obtain smooth curves (cf. Fig. 1). Fig. 1(a) and Fig. 1(b) illustrate the relationship between E log(WT ) and for two dierent values of the stock returns volatility. It is clear from these gures that the optimal choice of varies with the volatility of the stock returns. When the volatility reaches 0.05, the optimal choice of is around 0.3 whereas, when the volatility increases to 0.15, the optimal choice of is around 0.8.
4.8 4.79 4.88 4.87 4.86

E(log(W_T))

E(log(W_T))
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

4.78 4.77 4.76 4.75 4.74 4.73 4.72

4.85 4.84 4.83 4.82 4.81 4.8 4.79 4.78 4.77 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

order of moving average = delta

order of moving average = delta

(a) 1 = 0.2; = 2; r = 0.0; 0.2; = 0.15; T = 2.0

2 =

(b) 1 = 0.2; = 2; r = 0.0; 0.2; = 0.05; T = 2.0

2 =

Figure 1: Expected Values of the Logarithm of the Terminal Wealth (E(log(WT ))) for a Trader using the Moving Average Indicator of Order as a Function of . On the basis of a comprehensive numerical study performed in [4], we can make the following statements: When the volatility decreases, the choice of becomes more important: the curve is at for large volatility levels only. When the volatility is high, the losses decrease when choosing a large window size. In all cases, a too small window length is sub-optimal, As |1 | or 2 decreases (respectively, increases), the choice of becomes less (respectively, more) important. The choice of depends on the arrival rate . The parameter 2 has a strong eect on the importance of the window length. In [4], it is shown that the curves become atter when 2 increases. This observation conrms the intuition; if the future drift is not large enough, the detection of will be more dicult.

14

Fig. 2 shows that, when = 2.0, the time horizon has a signicant eect on the optimal choice of . When the time horizon is small, for example when T = 1, one has better to underestimate than to overestimate it. When T is large, one has better to overestimate . Of course, the specic values for T highly depend on the chosen level of .
T=1 5 4.66 4.98 4.65 4.96 4.64 T=3

4.94

4.63

0.5

1.5

4.92

0.5

1.5

Figure 2: Expected Values of the Logarithm of the Terminal Wealth (E(log(WT ))) for a Trader using the Moving Average Indicator of Order as a Function of : the Dependence of the optimal on the Time Horizon T .

7.2

Mis-specied Mathematical Strategies vs Technical Analysis

We can now address our main question: Is it better to invest according to a mathematical model and detect strategy based on a mis-specied model, or according to a strategy which is model - free? Due to the analytical complexity of all the explicit formulae that we have obtained for the various expected utilities of terminal wealth, we have not yet succeeded to nd a mathematical answer to this question( even in asymptotic cases, when 22 1 is large, e.g.). We therefore present numerical results obtained from Monte Carlo simulations to illustrate our comparisons2 . Fig. 3 shows that, despite a large degree of parameter mis-specication, the two model and detect strategies represented in panels (a) and (b) yield a good performance and clearly outperform the technical analyst. However, it can be seen from Figure 3(c) that the optimal trading strategy with mis-specied parameters is out-performed by the technical analysis strategy. This result suggests that statistical detection techniques or technical analysis approaches could be more attractive when the parameters are mis-specied. We have run, a number of other simulations which all conrm that the technical analyst may outperform the mis-specied optimal allocation strategy but not the mis-specied model and detect strategies. These simulations also show that when 2 /1 decreases, the performances of well specied and mis-specied model and detect strategies decrease3 . In conclusion, our numerical study suggests that there is no universal solution to the problem of parameter mis-specication. It seems that when the drifts are high in absolute terms and, in particular, when the upward drift is high, the performance of the Model and Detect strategies can be quite robust and superior to the one of the chartist trading strategy. However, their performance deteriorates rapidly when is strongly mis-specied and/or when the upward drift is not very high. Since the second drift is in fact the hardest to estimate due to the fact that we lack a priori information, we recommend caution before asserting that Model
2A 3 The

more complete set of simulations on the performance of the mathematical and the chartist strategies can be found in [4]. results are available from the authors upon request.

15

4.85 4.8 E[log(WT)] 4.75 4.7

technical analysis exact parameters misspecified parameters E[log(W )]

4.85 4.8 4.75 4.7 4.65 4.6

technical analysis exact parameters misspecified parameters

4.65 4.6 4.55 0 0.5 1 Time (years) 1.5 2

4.55 0

0.5

1 Time (years)

1.5

(a) Model and Detect Strategy based on Karatzas (b) Model and Detect Estimation Shiryayevs Estimation
4.85 4.8 E[log(WT)] 4.75 4.7

Strategy

based

on

technical analysis exact parameters misspecified parameters

exact parameters = 0.2 1 = 0.2 2 = 0.15 =2

4.65 4.6 4.55 0 0.5 1 Time (years) 1.5 2

misspecified parameters _ 1 = 0.3 _ 2 = 0.1 _ = 0.25 _ =1

(c) Optimal Strategy

Figure 3: Comparison of the Expected Values of the Logarithm of Wealth when the Traders use Strategies With Exact and Mis-specied Parameters and Detect strategies are superior to the technical trading rule4 . Indeed, the model and detect strategies only oer a clear comparative advantage over the chartist trading rule in the presence of strong expected future trends.

Conclusion and Perspectives

In this study, we have compared the performance of trading strategies based on possibly mis-specied mathematical models used to detect the time of the change in the drift of the stock return with a trading strategy based on the simple moving average rule. We have explicitly computed the traders expected logarithmic utility of wealth for the various trading strategies. Unfortunately, these explicit formulae were not propitious to mathematical comparisons. We have therefore relied on Monte Carlo numerical experiments, and observed from these experiments that under parameter mis-specication, the technical analysis technique outperforms the optimal allocation strategy but not the model and detect strategies. The latter strategies dominance
4 In reality, the technical analyst does not know the length of the optimal window, thus his/her strategy is not free of misspecication either. However, as we show in gure 2, the performance of the technical analyst has only weak sensitivity with respect to the window length.

16

is conrmed under parameter mis-specication as long as the two stock returns drifts are high in absolute terms. This study provides a rst step towards building a rigorous mathematical framework in which chartist and mathematical model based trading strategies can be compared. We are extending this research along several dimensions. First, we examine and model the performance of other chartist based trading rules (such as lter rules, point and gure charts, etc.). Second, we consider modeling the more realistic case where there are multiple changes in the drift of the stock returns: we examine the case where the instantaneous expected rate of return of the stock changes at the jump times of a Poisson process, and the value of this rate after each time change is unknown. We follow two new directions to tackle these questions: jointly with B. de Saporta (INRIA), we use stochastic control techniques for switching models and, jointly with M. Martinez (INRIA) and S. Rubenthaler (University of Nice Sophia Antipolis), we use ltering techniques [12]. Finally, it would be worth extending our conceptual framework to the more realistic case where the mathematical and the chartist strategies performances account for market frictions.

9
9.1

Appendix
An Explicit Expression for the Process Ft

Lemma 9.1. The conditional a posteriori probability Ft that the change point has appeared before time S t, that is, Ft := P t|Ft , is t et Lt 0 es L1 ds s Ft = (9.1) t 1 + et Lt 0 es L1 ds s where Lt = St S0
2 1 2

exp

1 2 2

(2 1 )2 + 2(2 1 )(1

2 ) t . 2

(9.2)

Proof. In order to compute Ft , we start with a probability space (, F, Q) that can support both a standard Brownian motion B and independent random variable : [0, ) with distribution Q[ > t] = et for t 0; we denote by (Gt )t0 the ltration generated by and B, which means that Gt := (, Bs ; 0 s t). In view of Girsanovs theorem, the process (2 1 ) Bt = Bt
t Gt t 0

1( s) ds
t 0

is a (Gt )t0 -Brownian motion under the measure of probability P such that dP dQ = exp
0

1 1 (2 1 )1( s) dBs 2 2

(2 1 )2 1( s) ds

= exp = exp We observe that

1 1 (2 1 )(Bt B )1( t) 2 (2 1 )2 (t )+ 2 1 1 (2 1 )(Bt B ) 2 (2 1 )2 (t ) 1( t) + 1( >t) . 2 1 Bt = log St S0 (1 2 )t . 2 (9.3)

Observe that under Q, the random variable is independent of the (Gt ; t 0)-Brownian motion B and thus of R. Thus, the above expression of dP/dQ can be written as follows dP dQ
Gt

Lt 1( t) + 1( >t) := Zt , L 17

(9.4)

where Lt is dened as in (3.4). We now check that, on the probability space (, F, P), we have the same model as the one presented in the introduction. Indeed, the random variable is G0 -measurable; then, under P, is independent of the (Gt )t0 -Brownian motion B and we have P[ > t] = EQ [Z0 1 >t ] = Q[ > t]. Using the Bayes rule, one gets
S Ft = P[ t|Ft ] = S EQ Zt 1( t) |Ft . S EQ Zt |Ft

(9.5)

Using now the independence of B and under Q, one gets


S EQ Zt |Ft = EQ t

Lt 1( =0) +

Lt 1(0< t) + 1( >t) | FtS L

=
0

Lt s e ds + et . Ls
t 0

On the other hand, we get


S EQ Zt 1( t) |Ft =

Lt s e ds. Ls

Then, going back to (9.5), we get (3.5). Moreover, we can show that the process (Ft )t0 satises the following stochastic dierential equation dFt = (1 Ft )dt + where Bt = 1 log(St ) (1 (2 1 ) Ft (1 Ft )dB t ,
t

(9.6)

2 )t (2 1 ) 2

Fs ds , t 0,
0

(9.7)

is the innovation process. Indeed, set Vt :=

Ft ; an easy computation leads to 1 Ft


t

Vt =
0

Lt (ts) e ds. Ls

From dLt = Lt we deduce dV t V0 =

1 2 1 (2 1 )d(log St ) 2 (2 1 )(1 )dt 2 2 2 1 (2 1 )(1 ) 2 2 1 (2 1 )Vt d(log St ), 2

+ Vt

dt +

= 0.

Vt , and get the stochastic dierential equation (9.6). 1 + Vt S Notice that B t dened as in (3.6) is a (Ft )t0 - Brownian motion. We nally apply Its formula to the process Ft = o We conclude with a result useful to apply the martingale representation theorem in the next subsection. Lemma 9.2. The ltration generated by the observations (FS ) is equal to the ltration generated by the innovation process (Bt ; t 0). In particular, each (FS ) martingale M admits a representation as
t

Mt = M0 +
0

s dBs ,

where is an (FS ) adapted process. 18

Proof. Thanks to (3.6), B t is (FS ) adapted. Conversely, we write (3.6) as: d(log St ) =

(1

2 ) + (2 1 )Ft dt + dB t , 2

(9.8)

Thanks to (9.6), F is (FB ) adapted. and we conclude that the process S (= exp(R )) is also (FB ) adapted. And so (FB ) = (FS ).

9.2

Proof of Proposition 3.1

We follow Karatzass method (see for example Karatzas [8]). For A(x, ), remember that dWt, = (r + (t))dt + t ((1 r) + (2 1 )Ft + (t)) dt + t dB t . Wt, Dene t := (1 r) + ( u2 1 )Ft + (t)
t

Wt, := Wt, exp rt


0

(s)ds .

We thus have

dWt, t, = t t dt + t dBt , W
t

Wt, = x exp
0

1 2 s s 2 s ds + 2

s dBs .
0

We now search an exponential martingale Mt (independent of ) such that Wt, = Wt, Mt is an exponential martingale. Set t 1 t 2 ds . Mt = exp s dBs 2 0 s 0 Then needs to satisfy 1 1 1 2 2 (s + s ) = s s 2 2 s , s 2 2 2 and Mt = Ht . Thus, for all , dWt, Wt, = t t dBt . (9.9)

from which s = s

S Therefore the process (Wt, , 0 t T ) is a non-negative (Ft , P)- local martingale and so a supermartingale. Consequently, T , E HT WT exp rT

(t)dt
0

x.

We now introduce the convex dual of U () : U (y) := max [U (x) xy] ,


0<x<

y > 0.

19

Using a duality method, we obtain: for all > 0, A(x, ), y 0,


T , E[U (WT )] E U yHT exp(rT 0 T , + yE HT WT exp(rT T E U (yHT exp(rT 0

(t)dt) (t)dt)
0

(t)dt)) + yx.

This inequality is an equality if and only if W , = (U )1 yH exp(rT T T E H W , exp rT T T


T 0

T 0

(t)dt) , = x.

(t)dt

The coecient y is introduced to satisfy the constraint. Now, we need to verify that there exists a portfolio such that the process
E HT exp(rT T 0 (s)ds)(U )1 yHT exp(rT Ht exp(rt t 0 T 0

(s)ds)

S Ft

Xt :=

(s)ds)

is its wealth process. We use the martingale representation property of the Brownian ltration in order to nd the optimal strategy . Indeed, there exists a predictable process such that
E HT erT RT
0

(t)dt

(U )1 (yHT erT

RT
0

(t)dt

t S ) / Ft = x + 0

s dB s .

In particular, with the notation Xt = Xt Ht exp rt

t 0

(s)ds , we obtain

dXt = t dBt . Consider the strategy


t = 1

t 1 r + (2 1 )Ft + (t) Rt + Xt Ht ert 0 (u)du

In view of (9.9), we have dWt,

Wt,

t Xt

dBt =

d Xt Xt

By uniqueness arguments, we obtain Xt = Wt, .

9.3

Joint Law of Geometric Brownian Motion and its Integral

Lemma 9.3. Let B be a real Brownian Motion. Let > 0 and be in R. Let G be a Geometric Brownian Motion: Gs = exp 2 s + Bs . 20

It holds that
t

P
0

Gs ds dy ; Gt dz

z 1 = e 2y

2 2 t (1 + z 2 ) 2 2 2 y i

2 t 2

z 2 y

dydz,

(9.10)

where iy (z) :=

ze /4y y

exp z cosh u u2 /4y sinh u sin(u/2y)du.


0

(9.11)

Yor has obtained this last result in [16] (see also [5]).

References
[1] S. Achelis. Technical Analysis from A to Z. McGraw Hill, 2000. [2] M. Beibel and H. R. Lerche. A new look at optimal stopping problems related to mathematical nance. Statist. Sinica, 7(1):93108, 1997. [3] C. Blanchet-Scalliet, A. Diop, R. Gibson, D. Talay, and E. Tanr. Technical analysis techniques versus e mathematical models: Boundaries of their validity domains. In Monte Carlo and Quasi-Monte Carlo Methods 2004, H. Niederreiter and D. Talay (Eds), pages 1530. Springer-Verlag, Berlin, 2005. [4] C. Blanchet-Scalliet, A. Diop, R. Gibson, D. Talay, E. Tanr, and K. Kaminski. Technical analysis e compared to mathematical models based methods under misspecication. Working Paper Series 253, NCCR-FINRISK, 2005. http://www.nccr-finrisk.unizh.ch/wp/index.php?action=query&id=253. [5] A. N. Borodin and P. Salminen. Handbook of Brownian Motion Facts and Formulae. Probability and its Applications. Birkhuser Verlag, Basel, second edition, 2002. a [6] W. Brock, J. Lakonishok, and B. LeBaron. Simple technical trading rules and the stochastic properties of stock returns. Journal of Finance, 47(5):17311764, 1992. [7] N. Jegadeesh. Discussion. Journal of Finance, 55(4):17651770, 2000. [8] I. Karatzas. Lectures on the Mathematics of Finance, volume 8 of CRM Monograph Series. American Mathematical Society, Providence, RI, 1997. [9] I. Karatzas. A note on Bayesian detection of change-points with an expected miss criterion. Statist. Decisions, 21(1):313, 2003. [10] I. Karatzas and S. E. Shreve. Methods of Mathematical Finance, volume 39 of Applications of Mathematics (New York). Springer-Verlag, New York, 1998. [11] A. W. Lo, H. Mamaysky, and J. Wang. Foundations of technical analysis: Computational algorythms, statistical inference, and empirival implementation. Journal of Finance, 55(4):17051770, 2000. [12] M. Martinez, S. Rubenthaler, and E. Tanr. e Misspecied ltering theory applied to optimal allocation problems in nance. Working Paper Series 278, NCCR-FINRISK, 2006. http://www.nccr-finrisk.unizh.ch/wp/index.php?action=query&id=278 (submitted to publication). [13] R. C. Merton. Optimum consumption and portfolio rules in a continuous-time model. J. Econom. Theory, 3(4):373413, 1971.

21

[14] A. N. Shiryaev. Quickest detection problems in the technical analysis of the nancial data. In Mathematical Finance Bachelier Congress, 2000 (Paris), Springer Finance, pages 487521. Springer, Berlin, 2002. [15] R. Sullivan, A. Timmermann, and H. White. Data-snooping, technical trading rule performance, and the bootstrap. Journal of Finance, 54(5):16471691, 1999. [16] M. Yor. On some exponential functionals of Brownian motion. Adv. in Appl. Probab., 24(3):509531, 1992.

22

You might also like