Memory Effects in Stock Price Dynamics

21
arXiv:1110.5197v1 [q-fin.ST] 24 Oct 2011 Memory effects in stock price dynamics: evidences of technical trading Federico Garzarelli 1 , Matthieu Cristelli 1,2,, Andrea Zaccaria 1,2 , Luciano Pietronero 1,2 1 Dip. di Fisica, Universit` a “Sapienza”, P.le A. Moro 2, 00185, Roma, Italy 2 ISC-CNR, Via dei Taurini 19, 00185, Roma, Italy Corresponding author: [email protected] October 25, 2011 Abstract Technical trading represents a class of investment strategies for Financial Markets based on the analysis of trends and recurrent pat- terns of price time series. According standard economical theories these strategies should not be used because they cannot be profitable. On the contrary it is well-known that technical traders exist and op- erate on different time scales. In this paper we investigate if technical trading produces detectable signals in price time series and if some kind of memory effect is introduced in the price dynamics. In partic- ular we focus on a specific figure called supports and resistances. We first develop a criterion to detect the potential values of supports and resistances. As a second step, we show that memory effects in the price dynamics are associated to these selected values. In fact we show that prices more likely re-bounce than cross these values. Such an effect is a quantitative evidence of the so-called self-fulfilling prophecy that is the self-reinforcement of agents’ belief and sentiment about future stock prices’ behavior. 1 Introduction Physics and mathematical methods derived from Complex Systems Theory and Statistical Physics have been shown to be effective tools [1, 2, 3, 4] to 1

Transcript of Memory Effects in Stock Price Dynamics

Page 1: Memory Effects in Stock Price Dynamics

arX

iv:1

110.

5197

v1 [

q-fi

n.ST

] 2

4 O

ct 2

011

Memory effects in stock price dynamics:

evidences of technical trading

Federico Garzarelli1, Matthieu Cristelli1,2,∗, Andrea Zaccaria1,2,Luciano Pietronero1,2

1 Dip. di Fisica, Universita “Sapienza”, P.le A. Moro 2, 00185, Roma, Italy2 ISC-CNR, Via dei Taurini 19, 00185, Roma, Italy

∗ Corresponding author: [email protected]

October 25, 2011

Abstract

Technical trading represents a class of investment strategies forFinancial Markets based on the analysis of trends and recurrent pat-terns of price time series. According standard economical theoriesthese strategies should not be used because they cannot be profitable.On the contrary it is well-known that technical traders exist and op-erate on different time scales. In this paper we investigate if technicaltrading produces detectable signals in price time series and if somekind of memory effect is introduced in the price dynamics. In partic-ular we focus on a specific figure called supports and resistances. Wefirst develop a criterion to detect the potential values of supports andresistances. As a second step, we show that memory effects in the pricedynamics are associated to these selected values. In fact we show thatprices more likely re-bounce than cross these values. Such an effectis a quantitative evidence of the so-called self-fulfilling prophecy thatis the self-reinforcement of agents’ belief and sentiment about futurestock prices’ behavior.

1 Introduction

Physics and mathematical methods derived from Complex Systems Theoryand Statistical Physics have been shown to be effective tools [1, 2, 3, 4] to

1

Page 2: Memory Effects in Stock Price Dynamics

provide a quantitative description and an explanation of many social [5, 6, 7]and economical phenomena [8, 9, 10].

In the last two decades Financial Markets have appeared as natural candi-dates for this interdisciplinary application of methods deriving from Physicsbecause a systematic approach to the issues set by this field can be under-taken. In fact since twenty years there exists a very huge amount of highfrequency data from stock exchange which permit to perform experimentalprocedures as in Natural Sciences. Therefore Financial Markets appear asa perfect playground where models and theories can be tested and whererepeatability of empirical evidences is a well-established feature differentlyfrom, for instance, Macro-Economy and Micro-Economy. In addition themethods of Physics have proved to be very effective in this field and haveoften given rise to concrete (and profitable) financial applications.

The major contributions of Physics to the comprehension of FinancialMarkets on one hand are focused on the analysis of financial time series’properties and on the other hand on agent-based modeling [11, 12]. Theformer contribution provides fundamental insights in the non trivial natureof the stochastic process performed by stock price [13, 14, 15] and in the roleof the dynamic interplay between agents to explain the behavior of the orderimpact on prices [14, 16, 17, 18, 19, 20, 21]. The latter approach instead hastried to overcome the traditional economical models based on concepts likeprice equilibrium and homogeneity of agents in order to investigate the roleof heterogeneity of agents and strategies with respect to the price dynamics[12, 22, 23, 24, 25, 26, 27, 28].

In this paper we focus our attention on technical trading. A puzzling is-sue of standard economical theory of Financial Markets is that the strategiesbased on the analysis of trends and recurrent patterns (i.e. known indeed astechnical trading or chartist strategies) should not be used if all agents wererational because prices should follow their fundamental values [29, 30] and noarbitrage opportunities should be present . Consequently these speculativestrategies cannot be profitable in such a scenario.It is instead well-known that chartists (i.e. technical traders) exist and op-erate on different time scales ranging from seconds to months.

In this paper we investigate if a specific chartist strategy produces ameasurable effect on the statistical properties of price time series that is ifthere exist special values on which prices tend to bounce. As we are going tosee the first task that we must address consists in the formalization of thisstrategy in a suitable mathematical framework.Once a quantitative criterion to select potential supports and resistances isdeveloped, we investigate if these selected values introduce memory effectsin price evolution.

2

Page 3: Memory Effects in Stock Price Dynamics

We observe that: i) the probability of re-bouncing on these selected values ishigher than what expected and ii) the more the number of bounces on thesevalues increases, the more the probability of bouncing on them is high. Interms of agents’ sentiment we can say that the more agents observe bouncesthe more they expect that the price will again bounce on that value and theirbeliefs introduce a positive feedback which in turn reinforces the support orthe resistance.

Moving to the paper organization, in the remaining of this section we givea brief introduction to technical trading.In section 2 we introduce a quantitative criterion to select the price valueswhich are potential supports or resistances.In section 3 we show that the probability of bouncing on these selected valuesis higher than expected highlighting a detectable memory effect.In section 4 we discuss the origin of such an effect and we assess the issue ofwhich mechanisms can produces it.In section 5 we give a statistical characterization of the main features of thepattern described by the price when it bounces on supports and resistances.In section 6 we draw the conclusion of our work.

1.1 The classical and the technical approaches

The classical approach in the study of the market dynamics is to build astochastic model for the price dynamics with the so called martingale prop-erty E(xt+1|xt, xt−1, . . . , x0) = xt ∀t [31, 32, 33, 34]. The use of a martingalefor the description of the price dynamics naturally arises from the hypothesisof efficient market and from the empirical evidence of the absence of simpleautocorrelation between price increments. The consequence of this kind ofmodel for the price is that is impossible to extract any information on thefuture price increments from an analysis of the past increments.

The technical analysis is the study of the market behavior underpinnedon the inspection of the price graphs. The technical analysis permits thespeculation of the future value of the price. According to the technical ap-proach the analysis of the past prices can lead to the forecast of the futurevalue of prices. This approach is based upon three basic assumptions [35]:

1 the market discounts everything: the price reflects all the possiblecauses of the price movements (investors’ psychology, political contin-gencies and so on) so the price graph is the only tool to be consideredin order to make a prevision.

2 price moves in trends: price moves as a part of a trend, which canhave three direction: up, down, sideways. According to the technical

3

Page 4: Memory Effects in Stock Price Dynamics

approach, a trend is more likely to continue than to stop. The ultimategoal of the technical analysis is to spot a trend in its early stage andto exploit it investing in its direction.

3 history repeats itself : Thousands of price graphs of the past havebeen analyzed and some figures (or patterns) of the price graphs havebeen linked to an upward or downward trend [35]. The technical anal-ysis argues that a price trend reflects the market psychology. Thehypothesis of the technical analysis is that if these patterns anticipateda specific trend in the past they would do the same in the future.The psychology of the investors do not change over time therefore aninvestor would always react in the same way when he undergoes thesame conditions.

One reason for the technical analysis to work could be the existence ofa feedback effect called self-fulfilling prophecy. Financial markets have aunique feature: the study of the market affects the market itself because theresults of the studies will be probably used in the decision processes by theinvestors1. The spread of the technical analysis entails that a large number ofinvestors have become familiar with the use of the so called figures. A figure isa specific pattern of the price associated to a future bullish or bearish trend.Therefore, it is believed that a large amount of money have been moved inreply to bullish or bearish figures causing price changes. In a market, if alarge number of investors has the same expectations on the future value ofthe price and they react in the same way to this expectation they will operatein such a way to fulfill their own expectations. As a consequence, the theoriesthat predicted those expectation will gain investors’ trust triggering a positivefeedback loop. In this paper we tried to measure quantitatively the trust onone of the figures of technical analysis.

1.2 Supports and Resistances

Let us now describe a particular figure: supports and resistances. The defini-tion of support and resistance of the technical analysis is rather qualitative:a support is a price level, local minimum of the price, where the price willbounce on other times afterward while a resistance is a price level, localmaximum of the price, where the price will bounce on other times afterward.We expect that when a substantial number of investors detect a support ora resistance the probability that the price bounces on the support or resis-tance level is bigger than the probability the price crosses the support or

1Other disciplines such as physics do not have to face this issue.

4

Page 5: Memory Effects in Stock Price Dynamics

resistance level. Whether the investors regard a local minimum or maximumas a support or a resistance or not can be related to: i) the number of pre-vious bounces on a given price level, ii) the time scale. The investors coulda priori look at heterogeneous time scales. This introduces two parameterswhich we allow to vary during the analysis in order to understand if and howthey affect our results.

2 Supports and Resistances: quantitative def-

inition

One has to face two issues trying to build a quantitative definition of supportand resistance:

1 We define a bounce of the price on a support/resistance level as the eventof a future price entering in a stripe centered on the support/resistance andexiting from the stripe without crossing it. Furthermore, we want to developa quantitative definition compatible with the way the investors use to spotthe support/resistances in the price graphs. In fact the assumed memoryeffect of the price stems from the visual inspection of the graphs that comesbefore an investment decision. To clarify this point let us consider the threeprice graphs in fig. 1. The graph in the top panel shows the price tick-by-tickof British Petroleum in the 18th trading day of 2002. If we look to the price atthe time scale of the blue circle we can state that there are two bounces on aresistance, neglecting the price fluctuation in minor time scales. Conversely,if we look to the price at the time scale of the red circle we can state thatthere are three bounces on a resistance, neglecting the price fluctuation ingreater time scales. The bare eye distinguishes between bounces at differenttime scales. Therefore we choose to analyze separately the price bounces atdifferent time scales. To select the time scale to be used for the analysis ofthe bounces, we considered the time series Pτ (ti) obtained picking out a priceevery τ ticks from the time series tick-by-tick 2. The obtained time series is asubset of the original one: if the latter has N terms then the former has [N/τ ]terms3. In this way we can remove the information on the price fluctuationsfor time scales less than τ . The two graphs in fig.1 (bottom panel) showthe price time series obtained from the tick-by-tick recordings respectivelyevery 50 and 10 ticks. We can see that the blue graph on the left shows

2We have a record of the price for every operation.3The square brackets [ ] indicate the floor function defined as [x] = max {m ∈ Z | m ≤

x}

5

Page 6: Memory Effects in Stock Price Dynamics

only the bounces at the greater time scale (the time scale of the blue circle)as the price fluctuations at the minor time scale (the one of the red circle)are absent. Conversely these price fluctuations at the minor time scale areevident in the red graph on the right.

2 The width δ of the stripe centered on the support or resistance at thetime scale τ is defined as

δ(τ) =[ τ

N

]

[ τN ]−1∑

k=1

|Pτ (tk+1)− Pτ (tk)| (1)

that is the average of the absolute value of the price increments at time scaleτ . Therefore δ depends both on the trading day and on the time scale and itgenerally rises as τ does. In fact it approximately holds that δτ ∼ τα whereα is the diffusion exponent of the price in the day considered. The widthof the stripe represents the tolerance of the investors on a given support orresistance: if the price drops below this threshold the investors regard thesupport or resistance as broken.

To sum up, we try to separate the analysis of the bounces of price onsupports and resistances for different time scales. Provided this quantitativedefinition of support and resistance in term of bounces we perform an analysisof the bounces in order to determine if there is a memory effect on the pricedynamics on the previous bounces and if this effect is statistically meaningful.

3 Empirical evidence of memory effects

The analysis presented in this paper are carried out on the high frequency(tick-by-tick) time series of the price of 9 stocks of the London Stock Exchangein 2002, that is 251 trading days. The analyzed stocks are: AstraZeNeca(AZN), British Petroleum (BP), GlaxoSmithKline (GSK), Heritage FinancialGroup (HBOS), Royal Bank of Scotland Group (RBS), Rio Tinto (RIO),Royal Dutch Shell (SHEL), Unilever (ULVR), Vodafone Group (VOD).

The price of these stocks is measured in ticks4. The time is measuredin seconds. We choose to adopt the physical time because we believe thatinvestors perceive this one. We checked that the results are different as weanalyze the data with the time in ticks or in seconds. In addition to this ameasure of the time in ticks would make difficult to compare and aggregatethe results for different stocks. In fact, while the number of seconds of trading

4A tick is the minimum change of the price.

6

Page 7: Memory Effects in Stock Price Dynamics

0 150 300 450 600time (ticks)

536

538

540

542

544

546

Pri

ce (

tick

s)

time scale (50 ticks)

0 100 200 300 400 500 600 700time (ticks)

536

538

540

542

544

546

Pri

ce (

tick

s)

BP day 18

0 150 300 450 600time (ticks)

time scale (10 ticks)

Figure 1: The graph above illustrates the price (in black) tick-by-tick ofthe stock British Petroleum in the 18th trading day of 2002. The blue andred circles define two regions of different size where we want to look forsupports and resistances. The graph below in the left shows the price (inblue) extracted from the time series tick-by-tick picking out a price every 50ticks in the same trading day of the same stock. The graph below in the rightshows the price (in red) extracted from the time series tick-by-tick pickingout a price every 10 ticks. The horizontal lines represent the stripe of theresistance to be analyzed.

does not change from stock to stock the number of operation per day can bevery different.

We measure the conditional probability of bounce p(b|bprev) given bprevprevious bounces. This is the probability that the price bounces on a localmaximum or minimum given bprev previous bounces. Practically, we recordif the price, when is within the stripe of a support or resistance, bouncesor crosses it for every day of trading and for every stock. We assume thatall the supports or resistances detected in different days of the considered

7

Page 8: Memory Effects in Stock Price Dynamics

year are statistically equal. As a result we obtain the bounce frequencyf(b|bprev) =

nbprev

Nfor the total year. Now we can estimate p(b|bprev) with

the method of the Bayesian inference: we infer p(b|bprev) from the numberof bounces nbprev and from the total number of trials N assuming that n isa realization of a Bernoulli process because when the price is contained intothe stripe of a previous local minimum or maximum it can only bounce onit or cross it.

Using this framework we can evaluate the expected value and the varianceof p(b|bprev) using the Bayes theorem [36, 37]:

E[p(b|bprev)] =nbprev + 1

N + 2(2)

V ar[p(b|bprev)] =(nbprev + 1)(N − nbprev + 1)

(N + 3)(N + 2)2(3)

In fig.2 and fig.3 the conditional probabilities are shown for different timescales. The data of the stocks have been compared to the time series of theshuffled returns of the price. In this way we can compare the stock data witha time series with the same statistical properties but without any memoryeffect. As shown in the graphs, the probabilities of bounce of the shuffledtime series are nearly 0.5 while the probabilities of bounce of the stock dataare well above 0.5. In addition to this, it is noticeable that the probabilityof bounce rises up as bprev increases. Conversely, the probability of bounceof the shuffled time series is nearly constant. The increase of p(b|bprev) of thestocks with bprev can be interpreted as the growth of the investors’ trust onthe support or the resistance as the number of bounces grows. The more thenumber of previous bounces on a certain price level the stronger the trustthat the support or the resistance cannot be broken soon. As we outlinedabove, a feedback effect holds therefore an increase of the investors’ trust ona support or a resistance entails a decrease of the probability of crossing thatlevel of price.

We have performed a χ2 test to verify if the hypothesis of growth ofp(b|bprev) is statistically meaningful. The independence test ( p(b|bprev) = c) is performed both on the stock data and on the data of the shuffled timeseries and we compute

χ2 =

4

bprev=1[p(b|bprev)− c]2

4

bprev=1σ2bprev

.

Then we compute the p-value associated to a χ2 distribution with 2 degrees offreedom. We choose a significance level α = 0.05. If p-value < α the indepen-dence hypothesis is rejected while if p-value > α it is accepted. The results

8

Page 9: Memory Effects in Stock Price Dynamics

are shown in table 1. The green cells indicate independence of p(b|bprev) onthe value of bprev while the red cells indicate dependence of p(b|bprev). Theresults show that there is a clear increase of the investors’ memory on thesupports/resistances as the number of previous bounces increases for the timescales of 45, 60 and 90 seconds. Conversely, this memory do not increase atthe time scale of 180 seconds.

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

45 secondsResistance

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

45 secondsSupport

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

60 secondsResistance

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

60 secondsSupports

Figure 2: Graphs of the conditional probability of bounce on a resis-tance/support given the occurrence of bprev previous bounces. Time scale:τ=45, 60 seconds. The data refers to the 9 stocks considered. The data ofthe stocks are shown as red circles while the data of the time series of theshuffled returns of the price are shown as black circles. The graphs in theleft refer to the resistances while the ones on the right refer to the supports.

9

Page 10: Memory Effects in Stock Price Dynamics

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

90 secondsResistances

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

90 secondsSupports

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

180 secondsResistances

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

StocksShuffled returns

180 secondsSupports

Figure 3: Graphs of the conditional probability of bounce on a resis-tance/support given the occurrence of k previous bounces. Time scale: τ=90,180 seconds. The data refers to the 9 stocks considered. The data of thestocks are shown as red circles while the data of the time series of the shuffledreturns of the price are shown as black circles. The graphs in the left referto the resistances while the ones on the right refer to the supports.

4 Long memory of the price

The analysis of the conditional probability p(b|bprev) proves the existence ofa long memory in the price time series. We used the Hurst exponent H as ameasure of a such long term memory or autocorrelation. The Hurst exponentis estimated via the detrended fluctuation method [38, 39]. It is useful torecall that the Hurst exponent provides about the autocorrelation of the timeseries:

• if H < 0.5 one has negative correlation and antipersistent behavior

10

Page 11: Memory Effects in Stock Price Dynamics

45 sec. 60 sec. 90 sec. 180 sec.

Stocksresistances < 0.0001 < 0.0001 < 0.0001 0.077supports < 0.0001 < 0.0001 < 0.0001 0.318

Shuffled returnsresistances 0.280 0.051 0.229 0.583supports 0.192 0.229 0.818 0.085

Table 1: The table shows the p-values for the stock data and for the timeseries of the shuffled returns for different time scale and for the supportsand resistances. The red cells indicate independence of p(b|bprev) to the bprevvalue. The green cells indicate a non trivial dependence of p(b|bprev) to thebprev value.

• if H = 0.5 one has no correlation

• if H > 0.5 one has positive correlation and persistent behavior

4.1 Empirical evidence of the anticorrelation

If we consider the graph in figure 4(a) it is noticeable that the price incrementsare anticorrelated in the given day being the slope of the linear fit H =0.44 < 0.5. The process is not anticorrelated every day: we find H > 0.5 insome days and H < 0.5 in others. However the average Hurst exponent is〈H〉 < 0.5 therefore the price increments are anticorrelated on average. Thegraph 4(b) shows the histogram of H measured in the 251 trading days of2002 for RIO. The table 2 shows the average values of the Hurst exponent forall the 9 stocks analyzed in this paper. The table shows that 〈H〉 is alwaysless than 0.5 therefore there is anticorrelation effect of the price incrementsfor the 9 stocks analyzed.

The anticorrelation of the price increments could lead to an increase ofthe bounces and therefore it could mimic a memory of the price on a supportor resistance. We perform an analysis of the bounces on a antipersistentfractional random walk to verify if the memory effect depends on the an-tipersistent nature of the price in the time scale of the day. We choose afractional random walk with the Hurst exponent H = 〈Hstock〉 given by theaverage over the H exponents of the different stocks shown in table 2. Theresult is shown in fig. 5. The conditional probabilities p(b|bprev) are very closeto 0.5 although above this value. In addition to this it is clear that p(b|bprev)is constant. These two results prove that the memory effect of the price doesnot depend on its antipersistent properties, or at least the antipersistence isnot the main source of this effect.

11

Page 12: Memory Effects in Stock Price Dynamics

1 1.5 2 2.5 3ln(n)

-0.4

-0.2

0

0.2

0.4

0.6

ln σ

(n)

slope = 0.44slope = 0.5

H estimationRIO 143th day

(a) Graph of lnσ(n) against n of a trad-ing day of RIO. The red line is a linear fitof the data. Its slope gives an estimationof the Hurst exponent. The black linerepresents the linear fit that one wouldobtain for an uncorrelated time series.

0 0.1 0.2 0.3 0.4 0.5 0.6H

0

10

20

30

40

Cou

nts

H = 0.5<H> = 0.44

Histogram of the Hurst exponentRIO

(b) Histogram of H measured in the 251trading days of 2002 for RIO. The dottedline is the average Hurst exponent overthe year 2002 while the red line indicatesH = 0.5

Figure 4

Stock H

AZN 0.471BP 0.440GSK 0.464HBOS 0.472RBS 0.483RIO 0.440SHEL 0.445ULVR 0.419VOD 0.419

Table 2: Average values of the Hurst exponent over the year 2002 for all the9 stocks analyzed in this paper.

12

Page 13: Memory Effects in Stock Price Dynamics

1 2 3 4b

prev

0.475

0.5

0.525

0.55

0.575

0.6

0.625

0.65

p(b

| bpr

ev )

resistancesupport

Fractional Brownian MotionH = <H

stocks>

Figure 5: Graph of the conditional probability of bounce on a resis-tance/support given the occurrence of bprev previous bounces for a fractionalrandom walk. The red circles refers to supports, the black ones to resistances.

13

Page 14: Memory Effects in Stock Price Dynamics

time

pric

e δ

τ

Figure 6: Sketch of the price showing how we defined τ , the time betweentwo bounces and δ, the maximum distance between the price and the supportor resistance level between two bounces.

5 Features of the bounces

Now we want to describe two features of the bounces: the time τ occurringbetween two consecutive bounces and the maximum distance δ of the pricefrom the support or the resistance between two consecutive bounces.

The time of recurrence τ is defined as the time between an exit of theprice from the stripe centered on the support or resistance and the return ofthe price in the same stripe, as shown in fig.6. We study the distribution ofτ for different time scales (45, 60, 90 and 180 seconds) and for the normaland the shuffled time series (fig.7). We find no significant difference betweenthe two histograms. We point out that, being τ measured in terms of theconsidered time scale, we can compare the four histograms. We find that apower law fit describes well the histograms of τ .

We call δ the maximum distance reached by the price before the nextbounce. We show in fig.6 how the maximum distance δ is defined. We studythe distribution of δ for different time scales (45, 60, 90 and 180 seconds)and for the normal and the shuffled time series is shown in fig.8. In this

14

Page 15: Memory Effects in Stock Price Dynamics

case a power law fit does not describe accurately the histogram of δ. Thehistograms have a similar shape, but the tail of the distributions of the stockdata is thinner for both quantities τ and δ. According to this two evidencesthe memory effect of the price due to supports and resistances leads to smallerand more frequent bounces.

1 10 100 1000τ

0.0001

0.001

0.01

0.1

Cou

nts

τStocks

τShuffled

τStocks

~ τ-1.54

τShuffled

~ τ-1.38

Histogram of the τ45 seconds

1 10 100 1000τ

0.0001

0.001

0.01

0.1

Cou

nts

τStocks

τShuffled

τStocks

~ τ-1.48

τShuffled

~ τ-1.41

Histogram of τ60 seconds

1 10 100 1000τ

0.0001

0.001

0.01

0.1

Cou

nts

τStocks

τShuffled

τStocks

~ τ-1.51

τShuffled

~ τ-1.37

Histogram of τ90 seconds

1 10 100 1000τ

0.0001

0.001

0.01

0.1

Cou

nts

τStocks

τShuffled

τStocks

~ τ-1.41

τShuffled

~ τ-1.30

Histogram of the τ180 seconds

Figure 7: Graphs of the histograms of τ for the time scales of 45, 60, 90,180 seconds. We obtained the histograms from the data of all the 9 stocksanalyzed in this paper. We do not make any difference between supports andresistances in this analysis. The red circles are related to the stocks whilethe black ones are related to the shuffled time series. The red dotted line is apower law fit of the stocks data, the black dotted line is a power law fit of theshuffled time series data. The time τ is measured in terms of the consideredtime scale.

15

Page 16: Memory Effects in Stock Price Dynamics

1 10δ

0.001

0.01

0.1

1

Cou

nts

δStocks

δShuffled

Power law fit δStocks

Power law fit δShuffled

Histogram of δ45 seconds

1 10δ

0.001

0.01

0.1

1

Cou

nts

δStocks

δShuffled

Power law fit δStocks

Power law fit δShuffled

Histogram of δ60 seconds

1 10δ

0.001

0.01

0.1

1

Cou

nts

δStocks

δShuffled

Power law fit δStocks

Power law fit δShuffled

Histogram of δ90 seconds

1 10δ

0.001

0.01

0.1

1

Cou

nts

δStocks

δShuffled

Power law fit δStocks

Power law fit δShuffled

Histogram of δ180 seconds

Figure 8: Graphs of δ for the time scales of 45, 60, 90, 180 seconds. Weobtained the histograms from the data of all the 9 stocks analyzed in thispaper. We do not make any difference between supports and resistances inthis analysis. The red circles are related to the stocks while the black onesare related to the shuffled time series. The red dotted line is a power lawfit of the stocks data, the black dotted line is a power law fit of the shuffledtime series data. The price δ is measured in ticks.

16

Page 17: Memory Effects in Stock Price Dynamics

6 Conclusion

In this paper we perform a statistical analysis of the price dynamics of severalstocks traded at the London Stock Exchange in order to verify if there existsan empirical and detectable evidence for technical trading. In fact it is knownthat there exist investors which use technical analysis as trading strategy(also known as chartists). The actions of this type of agents may introducea feedback effect, the so called self-fulfilling prophecy, which can lead todetectable signals and in some cases to arbitrage opportunities, in details,these feedbacks can introduce some memory effects on the price evolution.The main goal of this paper is to determine if such memory in price dynamicsexists or not and consequently if it it possible to quantify the feedback onthe price dynamics deriving from some types of technical trading strategies.In particular we focus our attention on a particular figure of the technicalanalysis called supports and resistances. In order to estimate the impact onthe price dynamics of such a strategy we measure the conditional probabilityof the bounces p(b|bprev) given bprev previous bounces on a set of suitablyselected price values to quantify the memory introduced by the supports andresistances.We find that the probability of bouncing on support and resistance values ishigher than 1/2 or, anyway, is higher than an equivalent random walk or ofthe shuffled series. In particular we find that as the number of bounces onthese values increases, the probability of bouncing on them becomes higher.This means that the probability of bouncing on a support or a resistance isan increasing function of the number of previous bounces, differently froma random walk or from the shuffled time series in which this probability isindependent on the number of previous bounces. This features is a veryinteresting quantitative evidence for a self-reinforcement of agents’ beliefs, inthis case, of the strength of the resistance/support.

As a side result we also develop a criterion to select the price valuesthat can be potential supports or resistances on which the probability of thebounces p(b|bprev) is measured.

We point out that this finding is, in principle, an arbitrage opportunitybecause, once the support or the resistance is detected, the next time theprice will be in the nearby of the value a re-bounce will be more likely thanthe crossing of the resistance/support. However, when transaction costs andfrictions (i.e. the delay between order submissions and executions) are takeninto account, these minor arbitrage opportunities are usually no more prof-itable.

17

Page 18: Memory Effects in Stock Price Dynamics

Acknowledgements

This research was partly supported by EU Grant FET Open Project 255987FOC.

18

Page 19: Memory Effects in Stock Price Dynamics

References

[1] Golub T (2010) Counterpoint: data first. Nature 464: 679.

[2] Mitchell T (2009) Mining our reality. Science 326: 1644.

[3] Vespignani A (2009) Predicting the behavior of techno-social systems.Science 325: 425.

[4] Lazer D, Pentland A, Adamic L, Aral S, Barabasi A, et al. (2009) Lifein the network: the coming age of computational social science. Science323: 721.

[5] Goel S, Hofman J, Lahaie S, Pennock D, Watts D (2010) Predictingconsumer behavior with web search. Proc Natl Acad Sci USA 107:17486.

[6] Golder S, Macy M (2011) Diurnal and seasonal mood vary with work,sleep, and daylength across diverse cultures. Science 333: 1878.

[7] Ginzberg J, Mohebi M, Patel R, Brammer L, Smolinski M, et al. (2009)Detecting influenza epidemics using search engine query data. Nature457: 1012.

[8] Choi H, Varian H (2009) Predicting the present with google trends.Technical report .

[9] Bordino I, Battiston S, Caldarelli G, Cristelli M, Ukkonen A, Weber I(2009) Web search queries can predict stock market volumes. (submittedto PLoS ONE) arXiv:1110.4784.

[10] Saavedra S, Hagerty K, Uzzi B (2011) Synchronicity, instant mes-saging, and performance among financial traders. PNAS doi:10.1073/pnas.1018462108.

[11] Chakraborti A., Toke I. M., Patriarca M., Abergel F. Econophysics: Em-

pirical facts and agent-based models.. Quantitative Finance (in press),(2011). arXiv:0909.1974v2.

[12] Cristelli, M., Zaccaria, A., and Pietronero, L. Critical overview of agent-based models for economics. In Proceedings of Varenna School 2010

(2011). arXiv:1101.1847.

[13] Bouchaud, J.-P., Farmer, J. D., and Lillo, F. How Markets Slowly Digest

Changes in Supply and Demand. Elsevier: Academic Press (2008).

19

Page 20: Memory Effects in Stock Price Dynamics

[14] Bouchaud, J.-P., Mezard, M., and Potters., M. Statistical properties ofstock order books: empirical results and models. Quant. Fin., 2 (2002),251.

[15] Lillo, F. and Farmer, J. The long memory of the efficient market. Studiesin Nonlinear Dynamics & Econometrics, 8 (2004), 1226.

[16] Potters, M. and Bouchaud., J.-P. More statistical properties of orderbooks and price impact. Physica A, 324 (2003), 133.

[17] Wyart, M., Bouchaud, J.-P., Kockelkoren, J., Potters, M., and Vet-torazzo., M. Relation between bid-ask spread, impact and volatility inorder-driven markets. Quant. Fin., 8 (2008), 41.

[18] Lillo, F., Farmer, J. D., and Mantegna, R. N. Master curve for price-impact function. Nature, 421 (2003), 129.

[19] Farmer, J. D., Gillemot, L., Lillo, F., Mike, S., and Sen., A. What reallycauses large price changes?. Quant. Fin., 4 (2004), 383.

[20] Weber, P. and Rosenow, B. Large stock price changes: volume andliquidity. Quant. Fin., 6 (2006), 7.

[21] Cristelli, M., Alfi, V., Pietronero, L., and Zaccaria, A. Liquidity crisis,granularity of the order book and price fluctuations. Eur. Phys. J. B,73 (2010), 41.

[22] Alfi, V., Cristelli, M., Pietronero, L., and Zaccaria, A. Mechanisms ofself-organization and finite size effects in a minimal agent based model.J. Stat. Mech., (2009), P03016.

[23] Samanidou, E., Zschischang, E., Stauffer, D., and Lux, T. Microscopicmodels of financial markets. Reports on Progress in Physics, 70 (2007).

[24] Lux, T. and Marchesi, M. Scaling and criticality in a stochastic multi-agent model of a financial market. Nature, 397 (1999), 498.

[25] Giardina, I. and Bouchaud, J.-P. Bubbles, crashes and intemittency inagent based market. Eur. Phys. J. B, 31 (2003), 421.

[26] Caldarelli, G., Marsili, M., and Zhang, Y.-C. A prototype model ofstock exchange. Eurphys. Lett., 40 (1997), 479.

[27] Alfi, V., Cristelli, M., Pietronero, L., and Zaccaria, A. Minimal agentbased model for financial markets I: origin and self-organization of styl-ized facts. Eur. Phys. J. B, 67 (2009), 385.

20

Page 21: Memory Effects in Stock Price Dynamics

[28] Alfi, V., Cristelli, M., Pietronero, L., and Zaccaria, A. Minimal agentbased model for financial markets II: statistical properties of the linearand multiplicative dynamics. Eur. Phys. J. B, 67 (2009), 399.

[29] Buchanan M (2008) Why economic theory is out of whack. New Scien-tist, 2665 (2008), 32.

[30] Kreps D. M. A course in microeconomic theory. Princeton UniversityPress, (1990).

[31] J. C. Hull Options, Futures, and Other Derivatives. Prentice Hall,(2002).

[32] J. P. Bouchaud, M. Potters Theory of Financial Risk and Derivative

Pricing. Cambridge university press, (2003).

[33] J. Voit The Statistical Mechanics of Financial Markets. Springer, (2005).

[34] R. N. Mantegna, H. E. Stanley An Introduction to Econophysics. Cam-bridge university press, (2000).

[35] J.J. Murphy Technical Analysis of the Financial Markets New Yorkinstitute of finance, (1999).

[36] W. Feller An Introduction to Probability Theory and Its Applications

Wiley 3th edition (1968).

[37] G. D’Agostini Bayesian reasoning in data analysis

A critical introduction World Scientific Publishing (2003).

[38] C.-K. Peng, S.V. Buldyrev, S. Havlin, M. Simons, H.E. Stanley, A.L.Goldberger, Phys. Rev. E 49 1685 (1994).

[39] C.K Peng, S. Havlin, H.E. Stanley A.L. Goldberger Quantification of

scaling exponents and crossover phenomena in nonstationary heartbeat

time series. CHAOS 5 (1), (2005).

21