oliver poolman mathematical finance thesis 2016

39
DYNAMICAL SYSTEMS IN TRADING PRACTICES OLIVER POOLMAN Dissertation submitted for the MSc in Mathematical Finance Department of Mathematics University of York 22nd June 2016 Supervisor: Professor Maciej Capinski 1

Upload: oliver-laurence-poolman

Post on 15-Apr-2017

62 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES

OLIVER POOLMAN

Dissertation submitted for the MSc in Mathematical Finance

Department of MathematicsUniversity of York

22nd June 2016

Supervisor: Professor Maciej Capinski

1

Page 2: Oliver Poolman Mathematical Finance Thesis 2016

2 OLIVER POOLMAN

For Claire, Charles and Alice.

Page 3: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 3

Abstract

This paper evaluates the use of Technical Analysis as a tool for the prediction offuture stock prices using non-linear Dynamical equations. A function of the mov-ing averages of stock prices is used to generate a technical signal, a collection ofIF-THEN rules are applied to the signal within some pre-defined membership sets,the combined output from these sets is then applied to an excess demand function,which in turn drives the dynamics of the pricing model; translation of the signalinto membership sets serves to clear up any apparent ambiguities. In addition tothe breakdown of the excess demand function and study of the relationship betweentrend following and contrarian traders, the output of simulated prices when sub-jected to an adjusted trader strength parameter takes into account subtle changesthat can transform price action into a converging, oscillating or chaotic price series.Discussion of the equilibrium of price points within the dynamical model revealsthat there are an infinite number of equilibrium points of which all are unstable.Two simulated trading strategies take the final step in the application of the dy-namical model with the first strategy comparing the price series generated by thetrading signal against the actual price series of a single stock. In the second strat-egy we use the Dynamical model to predict short term prices which in turn drives acontrarian trend trading strategy. While examination of the comparative results re-veal that consistent returns are not achievable when predicting medium term priceseries, the short term prediction of prices yields positive results which warrantsfurther research into the possible calibration and optimisation of parameters alongwith the application of other technical signals within the model.

Page 4: Oliver Poolman Mathematical Finance Thesis 2016

4 OLIVER POOLMAN

Contents

Abstract 31. Introduction 52. Black Scholes Model 62.1. Black Scholes formula 62.2. A Simulation example of stock prices under the Black Scholes model 63. Computational Black Scholes Simulation 73.1. C++ algorithm using the Black Scholes formula 84. Dynamical Models of Stock Prices 94.1. Dynamical formula 104.2. Moving average 105. Example of the Dynamical Model Simulation 125.1. The intuition behind the moving average Dynamical model 156. Comparing the Black Scholes Model and Dynamical Model 167. Numerical Examples of Simulations and Results 178. Option Pricing 198.1. Option prices based on the Dynamical model 219. Chaos Model 229.1. Battle between trend follows and contrarians 2210. Simulation of Dynamical Model with Variance in Strength Paramter 2411. Equilibrium Points 2612. Numerical Results of Equilibrium Points 2813. Short Term Prediction using the Dynamical Model 2913.1. Correlation between predicted prices and actual prices 3013.2. Correlation results 3214. Trading Strategy using the Dynamical Model 3515. Conclusion 38References 39

Page 5: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 5

1. Introduction

The successful modelling of stock dynamics is one of the hardest things to achievewith many different approaches available to interpret how stock prices evolve overtime.

We first discuss the Black Scholes model an option pricing tool that holds theassumption that stock returns are random and independent. While past prices canbe irrelevant in predicting the future price changes, the advantage of the BlackScholes model is that it offers an Industry benchmark for option pricing. Its useful-ness, with regard to predictive pricing for options or more importantly predictingthe future price of the underlying stock is however negligible.

A second approach to stock modelling is the use of Fundamental Analysis thatmaintains that markets may misprice a security in the short run but that the "cor-rect" price will eventually be reached. Profits are made by purchasing a mispricedsecurity and then waiting for the market to recognize its "mistake" and reprice it.While this allows macroeconomic and microeconomic analysis to be applied to pre-dict future stock dynamics, it is of limited use, and its usefulness for short termprediction is questionable because markets are irrational and may not respond in apredictable way to market news.

The third approach, Technical Analysis, maintains that all information is re-flected already in the price. Technical analysts also analyse historical trends topredict future price movement. Technical analysts believe that sentiment changespredate and predict trend changes, therefore investors’ emotional responses to pricemovements lead to recognizable price chart patterns. While the use of TechnicalAnalysis is generally dismissed by academia because it is inconsistent with mostmodels of mathematical finance, in practice it is often used in trading and there-fore should not be entirely dismissed. The main objection to Technical Analysis isthat most technical rules are subjective and this makes it difficult to quantify thesignals they produce. This is where we can try to make sense of these signals andcategorise them into a format that we can work with.

This paper takes technical trading rules and converts them into excess demandfunctions which are functions that output the sum of demand minus supply for thestock in question. These functions are then applied to the stock model which inturn drives the stock dynamics. For example take a stock whose price at time t ispt where t = 0, 1, 2, ...N . If there are M number of groups of traders, each with aspecific set of trading rules, by converting these trading rules for each group intoan excess demand function edi (xt), the price dynamical model will be as follows.

ln pt+1 = ln pt +M∑i

ai (t) edi (xt)

where ai(t) accounts for the strength of the traders in group i and xt denotesvariables computed from the previous prices.

To produce the excess demand function, take the signal from the trading rulesand insert into a group of membership sets belonging to the excess demand function.These sets incorporate IF-THEN rules that output a final set of values that we canuse in the excess demand function in our Dynamical model.

In section 9 option pricing will be discussed with the use of the Black Scholesformula. As an alternative to the Black Scholes formula, the Dynamical formulausing the moving average signal will be used to price options, a comparison ofresults between models will be examined. In section 10 we will touch on chaostheory and how chaos is generated by our Dynamical model, with a focus on thestrength parameter ai we adjust our value to find the difference in price action.Finally in the last two sections, medium and short term predictions of stock prices

Page 6: Oliver Poolman Mathematical Finance Thesis 2016

6 OLIVER POOLMAN

from our Dynamical model using the moving average signal are compared to actualprices with the use of statistical relationship coefficients such as the covarianceand correlation coefficient. Four examples are given including single and multiplesimulations of stock prices. Once this relationship study has taken place two basictrading strategies are implemented using a single stock and aportfolio of stocksto see if we can capitalise on our research. After analysing our simulation resultswe find that there is little correlation between medium term predicted price seriesand actual price series when using the Dynamical model with the moving averagesignal. Having said this our paper reveals the model is useful in short term pricepredictions, especially in terms of the immediate short term trend therefore fromour findings we suggest further research into the subject.

2. Black Scholes Model

Using the notation (Ω,F , P ) to denote a probability space. The Ω is the set ofevents, F is the σ-field and P : F → [0, 1] is the probability measure.

Definition 2.1. We say that X(t)Nt=0 is a discrete stochastic process if for anyt ∈ 0, ..., N, X (t) : Ω→ R is a random variable.

The introduction of continuous stochastic processes is an extension of the discreteexample given in Definition (2.1). Let W (t) be a discrete function with domain,

W (t) : Ω→ R

Definition 2.2. [2] A standard (one-dimensional) Wiener process is a stochasticprocess W (t) , t ≥ 0 indexed by non-negative real numbers with the followingproperties:

(1) W (0) = 0.(2) With probability 1, the function t→W (t) is continuous in t.(3) The process W (t), t ≥ 0 has stationary, independent increments.(4) The increment W (tn) −W (tn−1) has normal distribution with mean 0 and

standard deviation√tn − tn−1

2.1. Black Scholes formula. In the Black Scholes model [4], stock prices aremodelled as a continuous stochastic process. Using the notation S(u) to denote thestock price at time

u ≥ 0,where u ∈ R measures time, and u = 1 is interpreted as one year. Let σ, µ ∈ R betwo fixed numbers and assume that the stock price dynamics evolves according toFormula (2.1)

(2.1) S (u) = S (0) e(µ−σ2

2

)u+σW (u)

,

where W represents the Wiener process, µ represents the drift component and σrepresent the volatility parameter. The volatility parameter σ can be calibrated byusing recent historical data or taken directly from the option price implied volatility.The drift component µ can be also calibrated using recent historical data or simplytaking the current risk free rate of interest. In the model the values µ and σ arekept constant which doesn’t account for changing volatility or interest rates.

2.2. A Simulation example of stock prices under the Black Scholes model.To break down the random component of Formula (2.1) which represents the Wienerprocess, take W (u) where W (u)u∈R+ and

W (u1)−W (u0) =√u1 − u0Z.

Page 7: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 7

Z denotes the normally distributed random variable

Z ∈ N(0, 1).

To simulate an example of the Wiener process for steps W (u1),W (u2), where u0 =0, and

W (u0) = 0,and so

W (u1) =√u1 − u0Z1 +W (u0) =

√u1 − u0Z1.

The above equality should be understood in terms of distribution. Thus,

W (u2) =√u2 − u1Z2 +W (u1).

In each step of the process the letter Z denotes the random variable which isindependent of the previous random variable. This denotes a process using Formula(2.2). Where S(ti) and Zi denotes our sampled stock price and random variable atstep ti

(2.2) S(ti+1) = S(ti) exp((

µ− σ2

2

)(ui+1 − ui) + σ

√ui+1 − uiZi+1

)To simulate the Black Scholes model using Formula (2.1), simulate a single step inthe process for S (u1) where u1 is denoted as time after 1 day with S(u0) = 100,time u0 = 0, u1 = 1, u1 − u0 = 1,using fixed parameters

µ = 0.02,

σ = 0.3.Start with the unique solution in formula (2.1) and then substitute in the parame-ters,

S (u1) = S (u0) e(µ−σ2

2

)(u1−u0)+σ

√u1−u0Z0+W (u0)

= 100e−0.0125+0.21213 Z0

Then generate the standard normal distributed random variable Z ∈ N(0, 1) andsubstitute into the formula. The random generation result is Z0 = 0.056587, and,the result is,

S (u1) = 100e−0.0125+(0.21213)(0.056587),= 99.9504023.

The next step involves a method of numerically simulating this process many timesand for multiple paths (ω′s ∈ Ω) in the programming language C++

3. Computational Black Scholes Simulation

This simulation uses C++ and the Kool Plot C++ library to output a graphof multiple processes using the Black Scholes model. There are multiple ways ofgenerating a random variable for such a simulation, the Box-Muller method hasbeen chosen due to its common use.

Theorem 3.1. Box-Muller Method. If U1, U2 are independent random variableswith uniform distribution on an interval [0, 1], then the random variable

Z =√−2ln(U1)cos(2πU2)

has distribution N(0, 1)

Page 8: Oliver Poolman Mathematical Finance Thesis 2016

8 OLIVER POOLMAN

3.1. C++ algorithm using the Black Scholes formula. Our code is as follows:

#i n c l u d e " k o o l p l o t . h "#i n c l u d e <iostream>

double boxMuller ( void )

double U1 = ( rand ( ) + 1 . 0 ) / (RAND_MAX+ 1 . 0 ) ;double U2 = ( rand ( ) + 1 . 0 ) / (RAND_MAX+ 1 . 0 ) ;

r e t u r n s q r t (−2.0∗ l o g (U1 ) ) ∗ cos ( 2 . 0 ∗ pi ∗U2 ) ;/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗ Above we have our Box−Muller f u n c t i o n ∗∗ to r e t u r n a standard normal random ∗∗ v a r i a b l e ( 0 , 1 ) ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/i n t main ( )double timeT =1;double t = 0 ;i n t s t e p s = 50 0 ;double d r i f t = 0 . 0 0 5 ;double vo l = 0 . 0 1 ;double s t o c k P r i c e = 1 00 ;i n t numOfProcesses = 5 0 ;double model [ numOfProcesses ] [ s t e p s ] ;double x a x i s [ s t e p s ] ;double increment = timeT/ s t e p s ;double s q i n c = s q r t ( i n c ) ;x a x i s [ 0 ] = 0 ;/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗ Above we have our v a r i a b l e s to s t o r e ∗∗ model paramters ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/cout << " Enter Stock at time 0 : " ; c i n >> stock ;cout << " Enter D r i f t (Mu) : " ; c i n >> d r i f t ;cout << " Enter V o l a t i l i t y ( Sigma ) : " ; c i n >> vol ;cout << " Enter number o f I t o p r o c e s s e s : " ; c i n >> numOfProcesses ;/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗ Above our program asks f o r data input ∗∗ We input data to be s t o r e d in our ∗∗ v a r i a b l e s ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/f o r ( i n t j =0; j<numOfProcesses ; j++)f o r ( i n t i =1; i<s t e p s ; i ++)

model [ j ] [ 0 ] = s t o c k P r i c e ;t =+ increment ;double wt =+ ( boxMuller ( ) ∗ s q i n c ) ;double z = ( ( d r i f t )− (pow( vol , 2 ) ) / 2 ) ∗ t + vo l ∗wt ;model [ j ] [ i ]=model [ j ] [ i −1]∗ exp ( z ) ;x a x i s [ i ]= increment+x a x i s [ i −1] ;

/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗ Above we s i m u l a t e the Black S c h o l e s ∗∗ formula f o r each step and s t o r e each ∗∗ p r i c e in our model array . ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/

Page 9: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 9

p l o t d a t a x ( xaxis , s t e p s ) , y = p l o t d a t a ( model [ 0 ] , s t e p s ) ;c l e a r ( x ) ;c l e a r ( y ) ;

f o r ( i n t i =1; i<numOfProcesses ; i ++)p l o t d a t a b = p l o t d a t a ( model [ i ] , s t e p s ) ;s e t C o l o r ( x , y , CRIMSON) ;x << p l o t d a t a ( xaxis , s t e p s ) ;y << b ;/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗ Above we add each p r o c e s s ∗∗ to our p l o t d a t a v a r i a b l e ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/

p l o t ( x , y , COLOR( 0 , 1 6 0 , 0 ) , " Stock ( t)= Stock ( 0 ) exp ( (Mu−(sigma ^2)/2) t +sigma ∗Wt ) ) " ) ;r e t u r n 0 ;/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗ We output a p l o t o f r e s u l t s ∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/

In figure (3.1) we can see the output of 50 processes with parameters S(0) = 100,µ = 0.05, and σ = 0.02. This is a good illustration of 50 possible ω′s ∈ Ω.

Figure 3.1. Output of 50 processes using the Black Scholes formula.

4. Dynamical Models of Stock Prices

Another angle on modelling stock prices is to incorporate data variables obtainedfrom Technical Analysis. We now introduce the Dynamical model as an alternativeto the Black Scholes model. In this model we show how the price dynamics aredriven by the implementation of technical trading rules by traders. The Dynamicalstock model is made up of 3 main components. These are the current price, tradingactions carried out by the groups of traders based on the technical trading rulesand finally the strength of each group of traders.

Page 10: Oliver Poolman Mathematical Finance Thesis 2016

10 OLIVER POOLMAN

4.1. Dynamical formula. The Dynamical model [3], assumes that stock prices aremodelled as a continuous deterministic process. We assume that we have a finitenumber of groups of traders and that we index each group by i, where i ∈ M , forsome finite setM . We define the Dynamical model of stock prices as a mathematicalmechanism to simulate the behaviour of stock prices over time. In our model letai(t), edi(xt) ∈ R be two functions defined at time t for all i ∈M . We assume thatthe stock price dynamics evolve according to the formula:

(4.1) ln pt+1 = ln pt +M∑i=1

ai (t) edi (xt)

Where Pt is our stock price at time t, M denotes the number of separate groupsof traders who are trading the stock, ai accounts for the strength of each groupof traders for all i ∈ M , where edi(xt) is the excess demand function for eachM group of traders at time t and xt denotes a variable from the past prices andother information at time t. Therefore xt = xt(pt−k, pt−k+1, . . . , pt), and thusxt : Rk → R for all k number of past prices.

An excess demand function [9] is a function expressing excess demand for aproduct. As it is the excess of quantity demanded over quantity supplied, it can bepositive or negative (demand minus supply). Where there is strength in a stock itwill have a positive excess demand function, and weakness in the stock a negativeexcess function. A third scenario is if the stock price is at an equilibrium, in whichcase the excess demand function will be around zero.

In different contexts, different approaches can be taken for the computations ofxt. Each of these different approaches may be referred to as a trading strategy,where each strategy produces an excess demand function edi (xt) that is calculatedfrom past prices and information at time t, which we call xt. For each approach trefers to a trading day and the closing price on each trading day of a stock.

We can start with the moving average trading strategy:

4.2. Moving average. The moving average strategy is very commonly used bytechnical traders, and is based on the short term and long term moving averagegenerated from historical prices. When the short term crosses the long term up-wards, it generates a buy signal that indicates to the trader that they should followthe upward trend, and in the opposite case, generates a sell signal to the trader tofollow the downward trend.

Example 4.1. If we take a current price pt = 100 where t = 0 along with k numberof previous prices where k = 4, we have

(pt−k, pt−k+1, pt−k+2,pt−k+3) = (97, 95, 96, 98).If the average of the last 2 prices (the short term) is denoted as µs and the averageof the past 5 prices (the long term), is denoted as µl, the short term average pricewill be

µs = (100 + 98)/2 = 99and the long term average price will be

µl = (100 + 98 + 96 + 95 + 97)/2 = 97.2Given that the short term average price is greater than the long term averageprice, this indicates strength in the upward trend, in which case the positive valuegenerated by the difference of the two averages µs−µl = 99− 97.2 = 1.8 generatesa buy signal.

The strength of the buy (sell) signals depends on the difference between the twomoving averages. If the strength of the buy signal is too large it may suggest the

Page 11: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 11

stock is overbought and the trader should sell, or taking a contrarian approach, ifthe strength of the sell signal is too large it may suggest the stock is oversold andthe trader should buy. This explains the interaction between the trend followingand the contrarian traders.

Definition 4.2. The moving average signal is given as the log-ratio (relativechange) of the moving average of stock prices where m is the shorter term averageand n is the longer term average.

(4.2) x(m,n)1,t = ln pt,m

pt,n

The moving average for m prices is given as

(4.3) pt,m = 1m

m−1∑i=0

pt−i

The moving average x(m,n)1,t value becomes categorized into one of 7 membership sets

denoted as µAi(x(m,n)1,t ) for i = 1....7. Each set labeled Ai represents a description

determining the relative size of the moving average signal. Each membership func-tion outputs a value to be used in the excess demand function, and the membershipset descriptions and shorthand notations are shown in Table 1

A1 = Positive Small = PSA2 = Positive Medium = PMA3 = Positive Large = PLA4 = Negative Small = NSA5 = Negative Medium = NMA6 = Negative Large = NLA7 = Around Zero = AZ

Table 1. Excess demand function membership sets

Each set function µAi(x(m,n)1,t ) is detailed in Figure (4.4-4.10). The variable w

can be interpreted as the frequency parameter depicting how frequent interchangesbetween the trend following and contrarian trader strategies occur, and where smallw implies more frequent interchanges and large w implies less frequent interchanges.Each x(m,n)

1,t ) is multiplied by w to produce a percentage, and w can be calibratedto the particular stock. We can see for each µi defined in (4.4-4.10) that the signalvalue falls between specific bounds of the membership set.

(4.4) µPS(x(m,n)1,t ) =

1− |x(m,n)

1,t − w|/w if x(m,n)1,t ∈ [0, 2w],

0 otherwise.

(4.5) µPM (x(m,n)1,t ) =

1− |x(m,n)

1,t − 2w|/w if x(m,n)1,t ∈ [w, 3w],

0 otherwise.

(4.6) µPL(x(m,n)1,t ) =

0 if x(m,n)

1,t < 2w,(x(m,n)

1,t − 2w)/w if x(m,n)1,t ∈ [2w, 3w],

1 if x(m,n)1,t > 3w

(4.7) µNS(x(m,n)1,t ) =

1− |x(m,n)

1,t + w|/w if x(m,n)1,t ∈ [−2w, 0],

0 otherwise.

Page 12: Oliver Poolman Mathematical Finance Thesis 2016

12 OLIVER POOLMAN

(4.8)

µNM (x(m,n)1,t ) =

1− |[|x(m,n)

1,t |]− 2w|/w if x(m,n)1,t ∈ [−3w,−w],

0 otherwise.

(4.9)

µNL(x(m,n)1,t ) =

0 if x(m,n)

1,t > −2w,|x(m,n)

1,t + 2w|/w if x(m,n)1,t ∈ [−3w,−2w],

1 if x(m,n)1,t < −3w

(4.10) µAZ(x(m,n)1,t ) =

1− w/|x(m,n)

1,t if x(m,n)1,t ∈ [−w,w],

0 otherwise.

The relationship between the relative size of the moving average signal and thesignal value is shown in figure (4.1)

Figure 4.1. Moving average signal(x) relationship to relative value

The excess demand function ed1(x(m,n)1,t ) derived from the membership set func-

tions is defined in Formula (4.11)

(4.11) ed1(x(m,n)1,t ) =

∑Ni=1 ciµAi(x

(m,n)1,t )∑N

i=1 µAi(x(m,n)1,t )

,

where ci denotes the percentage of buying power of the group of traders applied tothe trade in the model.

5. Example of the Dynamical Model Simulation

In this section we show an example of how we simulate prices using the dynamicalmodel. We first discuss our excess demand parameter ci, for each value ci wherei = 1..N, N = 7 the value corresponds to the percentage strength of buying andselling power of the group of traders, therefore we have.

c1 = 0.1, c2 = 0.4, c3 = −0.2, c4 = −0.1, c5 = −0.4, c6 = 0.2, c7 = 0

Where the value 0.4 equates to 40% buying power and −0.4 equates to 40% sellingpower. This is the percentage of the trading groups available per trade equity toput towards a single trade. Each ciis paired to its corresponding Ai under themoving average strategy as depicted in Table 2

Page 13: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 13

A1 A1 description ci ActionPS positive small 0.1 buy smallPM positive medium 0.4 buy bigPL positive large -0.2 sell mediumNS negative small -0.1 sell smallNM negative medium -0.4 sell bigNL negative large 0.2 buy mediumAZ around zero 0 do nothing

Table 2. Moving average strategy relationship between signal de-scription, strength and action

We can see this relationship illustrated in Figure 5.1 where the trading actiontaken is a function of the excess demand function.

Figure 5.1. Excess demand values (ed) relationship to action (µ)

Example 5.1. We use Formula (5.1) for a single group of traders denoted as group1 to show the working of a simulation of future prices.

(5.1) ln pt+1 = ln pt + a1 (t) ed1(x(m,n)1,t )

where a1denotes the relative strength of a single group of traders and ed1(x(m,n)1,t )

is a single excess demand function. We take our current price pt = 100 where t = 0and simulate the next N future prices where we have available to us the past knumber of historical prices, using parameters

k = 4N = 2

[m,n] = [1, 5]a1 = 0.32w = 0.01

Our historical prices are denoted as(pt−k, pt−k+1, pt−k+2,pt−k+3) = (97, 95, 96, 98)

and we have our short term and long term moving averages

pt,m = 1m

m−1∑i=0

pt−i = 100

and

pt,n = 1n

n−1∑i=0

pt−i = 97.2.

The moving average signal function is

Page 14: Oliver Poolman Mathematical Finance Thesis 2016

14 OLIVER POOLMAN

x(m,n)1,t = ln pt,m

pt,n

= 10097.2 = 0.02839.

The membership sets defined in formula (??) to retrieve the µAi(x(m,n)1,t ) values for

each 7 sets.

(5.2)

µPS(x(m,n)1,t ) =

1− |x(m,n)

1,t − w|/w if x(m,n)1,t ∈ [0, 2w],

0 otherwise.= 0

µPM (x(m,n)1,t ) =

1− |x(m,n)

1,t − 2w|/w if x(m,n)1,t ∈ [w, 3w],

0 otherwise.= 0.161

µPL(x(m,n)1,t ) =

0 if x(m,n)

1,t < 2w,(x(m,n)

1,t − 2w)/w if x(m,n)1,t ∈ [2w, 3w],

1 if x(m,n)1,t > 3w

= 0.839

µNS(x(m,n)1,t ) =

1− |x(m,n)

1,t + w|/w if x(m,n)1,t ∈ [−2w, 0],

0 otherwise.= 0

µNM (x(m,n)1,t ) =

1− |[|x(m,n)

1,t |]− 2w|/w if x(m,n)1,t ∈ [−3w,−w],

0 otherwise.= 0

µNL(x(m,n)1,t ) =

0 if x(m,n)

1,t > −2w,|x(m,n)

1,t + 2w|/w if x(m,n)1,t ∈ [−3w,−2w],

1 if x(m,n)1,t < −3w

= 0

µAZ(x(m,n)1,t ) =

1− w/|x(m,n)

1,t if x(m,n)1,t ∈ [−w,w],

0 otherwise.= 0

Using our excess demand function

ed1(x(m,n)1,t ) =

∑7i=1 ciµAi(x

(m,n)1,t )∑7

i=1 µAi(x(m,n)1,t )

with strength values

c1 = 0.1, c2 = 0.4, c3 = −0.2, c4 = −0.1, c5 = −0.4, c6 = 0.2, c7 = 0

we substitute in the values to get

ed1(x(m,n)1,t ) = 0.1(0)+0.4(0.161)+−0.2(0.839)+−0.1(0)+−0.4(0)+0.2(0)+0(0)

0+0.161+0.839+0+0+0+0= −0.1034.

Therefore the lnpt+1 price is given as

ln pt+1 = ln pt + a1 (t) ed1(x(m,n)1,t )

= ln(100) + (0.35 ∗ −0.1034) = 4.56891,and so our pt+1 price is given as

pt+1 = 96.43.

We now iterate through this whole process for t = 1, again using formula (5.1)

ln pt+1 = ln pt + a1 (t) ed1(x(m,n)1,t ).

We take our price pt = 96.43 and shifted historical prices denoted as

(pt−k, pt−k+1, pt−k+2,pt−k+3) = (95, 96, 98, 100).

Page 15: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 15

We again use the moving average signal and retrieve the µAi(x(m,n)1,t ) values for

each of the 7 sets. Using the excess demand function as in Formula (4.11) andsubstituting in the values we get

ed1(x(m,n)1,t ) = −0.067.

Therefore the lnpt+1 price for t = 1 is given as

ln pt+1 = ln pt + a1 (t) ed1(x(m,n)1,t )

= ln(93.3) + (0.35 ∗ −0.067) = 4.51235,

and our pt+1 price is given as

pt+1 = e4.51235 = 91.13

We have therefore simulated two new future prices p1 = 93.3 & p2 = 91.13 fromthe historical dataset at time t = 0.

5.1. The intuition behind the moving average Dynamical model. One ofthe main issues with Technical Analysis is that it can be highly subjective and thiscontributes to ambiguity for the trader on how to interpret results. A useful wayto clear up this ambiguity is to use Fuzzy Logic systems.

5.1.1. Fuzzy Logic systems. Fuzzy Logic systems [10] take signals from a tradingstrategy and convert them into excess demand functions. The application of FuzzyIF, THEN rules to the moving average strategy signal x(m,n)

1,t results in the outputof a weight and direction of trade value denoted as

BS = BuySmall, BM = BuyMedium,BL = BuyLarge,N = Neutral,

SS = SellSmall, SM = SellMediumandSB = SellBig

.Under this strategy the group of traders, presents as trend followers, contrarians

or undecided, in response to the signal generated.

ed1(x(m,n)1,t ) Information derived Attitude Action

positive small possible uptrend trend followers buy smallpositive medium definite uptrend trend followers buy bigpositive large over bought contrarian sell mediumnegative small possible down trend trend followers sell small

negative medium definite down trend trend followers sell bignegative large over sold contrarian buy mediumaround zero oscillating horizontally undecided do nothing

Table 3. Moving average strategy attitude

In Table 3 the reasoning behind the strategy is supplemented by a descriptionfor the excess demand value, interpretation, attitude and action to be taken.

Our Fuzzy IF-THEN rules follow the example in Table 4.

Page 16: Oliver Poolman Mathematical Finance Thesis 2016

16 OLIVER POOLMAN

IF x(m,n)1,t is PS THEN ed1 is BS

IF x(m,n)1,t is PM THEN ed1 is BB

IF x(m,n)1,t is PL THEN ed1 is SM

IF x(m,n)1,t is NS THEN ed1 is SS

IF x(m,n)1,t is NM THEN ed1 is SB

IF x(m,n)1,t is NL THEN ed1 is BM

IF x(m,n)1,t is AZ THEN ed1 is N

Table 4. Moving average IF THEN rules

These actions can be applied within the Dynamical model for price simulation.

6. Comparing the Black Scholes Model and Dynamical Model

An interesting idea is to compare the prices generated from two different models,therefore we first source historical data, in this case the adjusted closing price ofthe S&P 500 for the last 500 trading days, the historical prices are denoted as

S&P (t), t = t0.......tN , N = 500.We can take this data and apply to the Black Scholes model and Dynamical model,to produce two series of simulated stock prices, we then compare the results.

To simulate a time series of stock prices S (u1) , ..., S (uN ) using the Black Scholesmodel as in Formula (2.1), the parameters need to be obtained from the historicaldata set. First calculate the return on each historical stock price in the series, thendenote the return as xi as seen in Formula (6.1)

(6.1) xi = S&P (i)− S&P (i− 1)S&P (i− 1) ,

then calculate σ using Formula (6.2)

(6.2) σ =

√√√√ 1N − 1

N−1∑i=0

(xi −1N

N−1∑i=0

xi)2.

To calculate our drift value use Formula (6.3)

(6.3) µ = 1N

N−1∑i=0

xi .

Then apply these parameters into Formula (2.1) and simulate for stock pricesS (u1) , ..., S (uN ) .

To simulate a time series of stock prices using the Dynamical model, we useFormula (6.4) which represents the stock dynamics for a single group of tradersemploying the moving average strategy.

(6.4) ln pt+1 = ln pt + a1 (t) ed1(x(m,n)1,t )

wherep(t), t = t1.......tN,

using parametersm = 1, n = 5, w = 0.01.

Take the initial value p0 from the first historical closing price where p0 = S&P (0)and compute the first initial value x(m,n)

1,t from the historical data where t = 0.

Page 17: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 17

Then calculate the moving average derived excess demand function ed1(x(m,n)1,t ) as

in formula (4.11) with weights

c1 = 0.1, c2 = 0.4, c3 = −0.2, c4 = −0.1, c5 = −0.4, c6 = 0.2, c7 = 0

for all µAi as detailed below

ed1(x(m,n)1,t ) =

c6µNL = 0.2 if x(m,n)1,t ≤ −3w,

c5µNM = − 0.6x(m,n)1,tw − 1.6 if −3w ≤ x(m,n)

1,t ≤ −2w,

c4µNS = 0.3x(m,n)1,tw + 0.2 if −2w ≤ x(m,n)

1,t ≤ −w,

c7µAZ = 0.1x(m,n)1,tw if −w ≤ x(m,n)

1,t ≤ w,

c1µPS = 0.3x(m,n)1,tw − 0.2 if w ≤ x(m,n)

1,t ≤ 2w,

c2µPM = − 0.6x(m,n)1,tw + 1.6 if 2w ≤ x(m,n)

1,t ≤ 3w,c3µPL = −0.2 if x

(m,n)1,t ≥ 3w.

Repeat the process for all t ∈ N.

7. Numerical Examples of Simulations and Results

In each simulation we plot 500 data points, these are denoted as

p(t), t = t1.......tN , N = 500.

Prices are simulated using the Black Scholes model

S (u) = S (0) e(µ−σ2

2

)u+σW (u)

,

fort ∈ [1....100],

with t = i and u = i T100 for terminal date T , and volatility parameter σ taken fromour historical data set

σ = 0.02.

The S&P historical dataset’s initial price is used as a starting price with

S&P (0) = 2045 = S(0).

Prices are then simulated from our Dynamical model for

t ∈ [101....500],

where p(100) is our last price in the Black Scholes simulation, this is so we canseamlessly continue from the Black Scholes simulation to the dynamical simulation.The Dynamical model parameters are

(m,n) = (1, 5), w = 0.01, a1 = 0.15.

This scenario is repeated three times. The results are plotted in Figure 7.1-7.3.

Page 18: Oliver Poolman Mathematical Finance Thesis 2016

18 OLIVER POOLMAN

Figure 7.1. Black Scholes and Dynamical model simulation 1

Figure 7.2. Black Scholes and Dynamical model simulation 2

Figure 7.3. Black Scholes and Dynamical model simulation 3

As the figures illustrate, the price data remains consistant even though two verydifferent models one stochastic and the deterministic are being used.

The next step is to compare the simulation of the Dynamical and Black Scholesmodel series data with actual data series. The Black Scholes model and the Dynam-ical model are simulated for 500 future prices with S(u0) = 2000 and p0 = 2000.These results are then plotted alongside the actual price data.

Page 19: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 19

Figure 7.4. Historical, Dynamical and Black Scholes prices

As Figure (7.4) illustrates each price series takes a different path with

pt 6= S&P (t) 6= S(t),for almost all

t ∈ [0...N ].This leads to a discussion on option pricing in order to compare our stock simula-tions within a real world scenario.

8. Option Pricing

A European call option is a contract that gives the investor the right (but not theobligation) to buy a security at a certain strike price on a certain expiry date. Thepremium paid to enter into the contract is calculated from certain variables at thetime. The intuition behind a call option is described as follows. Imagine we have astock at time0 denoted as S(0), our strike price is then a predetermined value thatis fixed for the life of the contract. If on expiry of the contract the stock price isgreater than the fixed strike price we can exercise our right to exercise the contractand buy the stock at the strike price, we can then re-sell the stock at market price,therefore yielding a profit. On the other hand if the stock price on expiry is lessthan the strike price we do nothing. In the latter case the downside risk has beenreduced to the premium paid for the contract. We denote the option contract asH(u), the expiry time is uN where ui = i TN for terminal date T , and X representsthe strike price. The call option value on expiry is denoted as H(uN ) where

(8.1) H(uN ) = (S(uN )−X)+,

and the value received on expiry is the maximum of 0 and S(uN )−X. The stockprice is simulated using the Black Scholes model.

S (uN ) = S (0) e(µ−σ2

2

)uN+σW (uN )

,

whereW represents the Wiener process. This is substituted into the formula to get

(8.2) H(uN ) = (S (0) e(µ−σ2

2

)uN+σW (uN ) −X)+.

We want to compute the expected value of the option price on expiry, moreover,we want to calculate the expected value under the risk neutral probability.

Page 20: Oliver Poolman Mathematical Finance Thesis 2016

20 OLIVER POOLMAN

We now discuss the Risk neutral probability. To formulate the notation for adiscounted stock, take

S(t) = e−rtS(t),where r represents the risk free rate.

The risk neutral probability is the probability measure such that each stock priceis exactly equal to the discounted expectation of the share price under this measure,therefore

S(0) = e−rtE(S(t))

Definition 8.1. A probability measure Q is said to be a risk neutral measure ifS(t) is a martingale under Q and Q is equivalent toP .

Theorem 8.2. [4]In the Black Scholes model we have

S(t) = S(0)e(µ−σ2

2

)t+σW (t)

.

There exists a risk neutral measure Q, such that

WQ (t) = µ− rσ

t+W (t)

is a Brownian motion under Q. The r value denotes the risk free rate [1], and thestock dynamics under Q is denoted as

S(t) = S(0)e(r−σ2

2

)t+σW (t)

,

where µ is replaced by r.For any option with payoff H(T ) its price is given by

H(t) = EQ(H(T )|Ft

),

where Ft is a filtration generated by Brownian motion and Ft is a sigma field.

We will now discuss the Black Scholes formula used for option pricing.

Theorem 8.3. [4]The Black Scholes formula for the Call option is seen in For-mula (8.3) where the normal cumulative distribution function denoted as N(),isincorporated.

(8.3) C(r, T,X, S(0), σ) = S(0)N(d+)−Xe−rTN(d−)

where

(8.4) d+ =lnS(0)

X + (r + 12σ

2)Tσ√T

(8.5) d− =lnS(0)

X + (r − 12σ

2)Tσ√T

The standard normal cumulative distribution function is seen here in Formula(8.6)

(8.6) N(x) = 1√2π

x∫−∞

e−z22 dz

Theorem 8.4. The Black Scholes formula to calculate the put option price at time0 is seen in Formula (8.7) using d+ and d−as seen in Formulas (8.4) and (8.5)respectively.

Page 21: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 21

(8.7) P (r, T,X, S(0), σ) = Xe−rTN(−d−)− S(0)N(−d+)

Another method of pricing our call and put options is by using the Monte Carlosimulation method. A Monte Carlo simulation is the process of taking the arith-metic average of a large number of simulations to find the value close to the expectedvalue. We see in Formula (8.8) the expected value of the stock price is roughly equalto the arithmetic average of K number of simulations under the risk neutral prob-ability as K becomes very large. We denote Wi(uN ) as our Wiener process at timeuN for each process i..k.

(8.8) E(S (uN )) ≈ 1K

(K∑i=0

S (0) e(r−σ2

2

)uN+σWi(uN ))

We can then find E(H(uN )) using the following formula.

(8.9) E(Hc (uN )) ≈ 1K

(K∑i=0

S (0) e(r−σ2

2

)uN+σWi(uN ) −X)+

We now want to price the call option at time 0 denoted as Hc(0). To do this wecan discount the Hc(T ) value at the given risk free rate to find the time zero value.

(8.10) Hc (0) = E(Hc(uN ))e−ruN

Of course we can use a similar process for pricing put options using Formula (8.11)

(8.11) Hp (0) = E(Hp(uN ))e−ruN ,

where

(8.12) Hp(uN ) = (X − S(uN ))+.

8.1. Option prices based on the Dynamical model. We now look at optionpricing using stock prices p1, ..., pN simulated in the Dynamical model. If the modelis correct, then we are “certain" that a payoff of a call option will be

H (uN ) = (pN −X)+

Then the price of this option at time 0 should be

H (0) = e−uNr (pN −X)+

Example 8.5. Using the stock prices from the Dynamical simulation in figure 7.4we take the final simulated prices as pN = 1952. We use parameters

X = 1900, T = 1.38, r = 0.02

and compute H (0) as

H (0) = e−rT (pN −X)+ = e−(0.02)(1.38)52 = 50.58

We then compute the actual call option price at time 0 using the Black Scholesequation as in Formula (8.3)

C(r, T,X, S(0), σ) = S(0)N(d+)−XerTN(d−)

substituting in our parameters we get

C(r, T,X, S(0), σ) = C(0.02, 1.38, 1900, 2045, 0.24)

Page 22: Oliver Poolman Mathematical Finance Thesis 2016

22 OLIVER POOLMAN

Our result is as follows

C(0) = 330.19

We can see that

50.58 6= 330.19

We can conclude that for option pricing when using the Dynamical model for ourexpected stock price at time T we are not computing an accurate result. This maybe due to the fact that we are returning a single state from the deterministic modelopposed to the arithmetic average of infinite possible states in the Black Scholesmodel under the risk neutral probability. The length of time of the simulation mayhave a great impact on its accuracy for option pricing therefore we now discussChaos theory to try and find a use for the deterministic model.

9. Chaos Model

We now study the chaos generated in our Dynamical model.Chaos [7] is the behaviour and condition of dynamical systems that are highly

sensitive to initial conditions popularly referred to as the butterfly effect. This isthe sensitive dependence on initial conditions in which a small change in one stateof a deterministic nonlinear system can result in large differences in a later state.The name, coined by Edward Lorenz for the effect which had been known longbefore, is derived from the metaphorical example of the details of a hurricane (ex-act time of formation, exact path taken) being influenced by minor perturbationssuch as the flapping of the wings of a distant butterfly several weeks earlier. Smalldifferences in initial conditions yield widely diverging outcomes for such dynamicalsystems, rendering long-term prediction impossible in general, even though thesesystems are deterministic, meaning that their future behaviour is fully determinedby their initial conditions, with no random elements involved. In other words, thedeterministic nature of these systems does not make them predictable. Chaos the-ory concerns deterministic systems whose behaviour can in principle be predicted.Chaotic systems are predictable for a while and then ’appear’ to become random.The amount of time for which the behaviour of a chaotic system can be effectivelypredicted depends on three things: How much uncertainty we are willing to toleratein the forecast, how accurately we are able to measure its current state, and a timescale depending on the dynamics of the system.

9.1. Battle between trend follows and contrarians. We firstly study the bat-tle between the trend followers and contrarians within the Dynamical model anddiscuss how our excess demand function is generated whilst using the moving aver-age strategy. We start by looking at the plot in figure (9.1). The plot depicts thea1ed1(x(m,n)

1,t ) values for all x(m,n)1,t values contained in [−4w, 4w] where [−4w, 4w]

are the horizontal bounds for (x(m,n)1,t )in our plot.

Page 23: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 23

Figure 9.1. Oscillation generated from the contrarian and trendfollowing traders

In the excess demand function there are 4 parameters m, n, w and a1, wherem and n are the lengths of the shorter and longer moving averages, w is the coef-ficient used to measure the frequency of interchanges between trend following andcontrarian traders and a1 is the strength of the group of traders. In Figure (9.1)all possible values of the function a1ed1(x(m,n)

1,t ), created from our moving aver-age signal x(m,n)

1,t , are plotted on the graph, and a1ed1(x(m,n)1,t ) intersects with the

horizontal axis whenx

(m,n)1,t ∈ [−3w,−2w],

andx

(m,n)1,t ∈ [2w, 3w].

To find the exact point on the horizontal axis where the value of a1ed1(x(m,n)1,t ) = 0,

we look at the formula for ed1(x(m,n)1,t ) in Formula (4.11) and find the appropriate

sets that are used when x(m,n)1,t ∈ [−3w,−2w] and x(m,n)

1,t ∈ [2w, 3w].The sets are as follow.

ed1(x(m,n)1,t ) = − 0.6x(m,n)

1,tw − 1.6 if −3w ≤ x(m,n)

1,t ≤ −2w,

ed1(x(m,n)1,t ) = − 0.6x(m,n)

1,tw + 1.6 if 2w ≤ x(m,n)

1,t ≤ 3w.

To find x(m,n)1,t when a1ed1(x(m,n)

1,t ) = 0 we compute the sums from the above sets:

−0.6x(m,n)

1,tw

− 1.6 = 0,

and

−0.6x(m,n)

1,tw

+ 1.6 = 0.

The intersected points are computed as −2.66w and 2.66w respectively, and ,as

Page 24: Oliver Poolman Mathematical Finance Thesis 2016

24 OLIVER POOLMAN

Figure 9.1 shows whenx

(m,n)1,t ∈ [−2.66w, 2.66w]

the excess function ed1(x(m,n)1,t ) has the same sign as the moving average signal

x(m,n)1,t . Therefore the trend continues and the trend followers dominate trading.

Whenx

(m,n)1,t /∈ [−2.66w, 2.66w],

we find that ed1(x(m,n)1,t ) has a different sign to x

(m,n)1,t and the trend starts to

reverse, in this case the contrarians have the upper hand. This to and fro betweencontrarians and trend followers creates the back and forth price movement. Using

this understanding of the relationship between the moving average signal and theexcess demand function, we can analyse with numerical examples what happensto the dynamical price series as the a1parameter decreases and increases and theremaining parametersm,n and w remain fixed. This change in the initial conditionsof a1 will have a dramatic effect on the dynamics of the simulation.

10. Simulation of Dynamical Model with Variance in StrengthParamter

The simulation of stock prices using the Dynamical model allows the study ofdifferent outcomes according to the relative strength of traders for each scenario.Begin by simulating prices using the moving average Dynamical model

ln pt+1 = ln pt + a1 (t) ed1(x(m,n)1,t ),

using the excess demand function from the moving average strategy with parameters

(m,n) = (1, 5), w = 0.01,

forp(t), t = [1....500],

and initial pricep0 = 2000.

We study what happens to the simulation when the above parameters are fixedand parameter a1is changed. This value denotes the relative strength of our traders,so by changing the value in each example it is possible to model the impact thishas on the process, and show how convergence, chaos and oscillation in the priceseries can result from the small change in initial conditions.

In 3 scenarios using the values

a1 = 0.032, a1 = 0.32, a1 = 0.5,

and incorporating the historical data

[p−4, p−3, p−2, p−1] = [1981, 1985, 1966, 1965],

we calculate x(m,n)1,t where t = 0

x(m,n)1,t = ln pt,m

pt,n= ln 2000

1979.40 = 0.01035.

We substitute this initial value into the model to simulate the prices for p(t), t =[1....500] using the dynamical model formula and plot the simulations for eachscenario. The first scenario simulates the dynamical process with parameter a1 =0.032. See in Figure 10.1 which shows that with a small a1 value, the price beginsto converge to a fixed value after some time.

Page 25: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 25

Figure 10.1. a1= 0.032

Remark 10.1. In the moving average Dynamical model of stock prices ln pt+1 =ln pt + a1 (t) ed1(x(m,n)

1,t ) for t = 0...N we can see that when a1 is small enoughln pN converges to a finite number as ed1(x(m,n)

1,t )→ 0.

By looking at the value lnpt+1pt

which is the logarithmic change in price increment,when a1 is small, lnpt+1

ptis also small. Therefore

lnpt+1pt

= a1ed1(x(m,n)t )

as long as x(m,n)t remains in the trend following zone seen in Figure 9.1. The zone

being all x(m,n)1,t ∈ [−2.66w, 2.66w].

As ed1(x(m,n)1,t )→ 0, our price will converge to a finite number, because

ln pt+1 = ln pt + a1 (t) ed1(x(m,n)1,t ) = ln pt,

whened1(x(m,n)

1,t )→ 0.In this next scenario the simulation is repeated, instead using a1 = 0.32. As seen

in Figure (10.2) this deterministic process now resembles a stochastic process, andwhereby even the slightest change in a1 this leads to a very different outcome.

Figure 10.2. a1= 0.32

When a1 becomes larger, but not too large, lnpt+1pt

becomes gradually larger untilx

(m,n)t enters the contrarian zone as the trend is reversed. The contrarians push

back x(m,n)t to the trend following zone where the trend followers once again push

back x(m,n)t to the contrarian zone, this simulates a chaotic price series similar to a

random walk.

Page 26: Oliver Poolman Mathematical Finance Thesis 2016

26 OLIVER POOLMAN

In scenario 3 simulates the Dynamical process is simulated using parameter a1 =0.4. As Figure (10.3) reveals the process this causes starts to oscillate between twofixed points.

Figure 10.3. a1=0.4

We can see that when a1 becomes much larger lnpt+1pt

will become so large thatx

(m,n)t will oscillate back and forth between the two contrarian zones

x(m,n)1,t ∈ [∞,−2.66w]

x(m,n)1,t ∈ [2.66w,∞]

The resulting large swings, back and forth in price, create a sideways motionsimilar to a consolidation of stock prices. This is where the price cannot finddirection so neither the trend followers nor the contrarians have the upper hand.Such a big up swing up or down swing in stock prices usually occurs in response toan important economic data announcement.

11. Equilibrium Points

Equilibrium price points are where neither the trend followers nor contrarianshave the upper hand resulting in an equal balance between supply and demand. Weknow that the value p is dependent on the previous prices in the model, therefore,

pt+1 = f(pt, pt−1, ..., pt−n),with

f : Rn → RIn Dynamical systems we have

vt+1 = F (vt),with

F : Rn → Rn.We have vt and vt+1 as vectors of prices in our model with

(11.1) vt =

ptpt−1...pt−n

,

and

vt+1 =

pt+1pt...

pt−n+1

.

Page 27: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 27

Therefore we have

F (v) =

f(pt−n, . . . , pt)

pt...

pt−n+1

.

From this point of view, an equilibrium point would be a path

(11.2) v∗ =

p∗tp∗t−1...p∗t−n

where(11.3) F (v∗) = v∗

Theorem 11.1. For any positive value p∗ ∈ R, v∗ = (p∗, ....., p∗)T is an equilibriumpoint of the dynamical model vv+1 = F (vt) with

(11.4) F (vt) =

ptpt−1...pt−n

Proof. Let vt = v∗ = (p∗, ....., p∗)T for some t. We need to show vt+1 = F (v∗) = v∗,since vt = (pt, pt−1, ..., pt−n) = (p∗, ....., p∗)T implies vti = p∗for i = 1, 2, ...., n in

x(m,n)1,t = ln pt,m

pt,n.

The moving average signal is calculated as follows

x(m,n)1,t = ln( 1

m

n∑i=n−m+1

pi)− ln( 1n

n∑i=1

pi).

By calculating the logarithm of the short term moving average as

ln( 1m

n∑i=n−m+1

pi) = p∗,

and the logarithm of the long term moving average as

ln( 1n

n∑i=1

pi) = p∗,

we get a signalx

(m,n)1,t = 0.

From Figure (9.1) we find thated1(x(m,n)1,t ) = 0 when x(m,n)

1,t = 0 therefore,

ptea1(t)ed1(x(m,n)

1,t ) = pt,

and, as a result, we haveF (v∗) = (p∗, ..., p∗)T = v∗

Finally as Theorem 11.1 shows, any price can be an equilibrium point if

ln( 1n

n∑i=1

pi) = ln( 1m

n∑i=n−m+1

pi).

Therefore there are an infinite number of equilibrium points for our moving averagedynamical model vt+1 = F (vt).

Page 28: Oliver Poolman Mathematical Finance Thesis 2016

28 OLIVER POOLMAN

12. Numerical Results of Equilibrium Points

In this section we examine some numerical examples of Theorem 11.1

Example 12.1. Let us imagine a vector of historical prices at time t = 0

(12.1) vt =

pt=100pt−1=100pt−2=100pt−3=100pt−4=100

We know that

vt+1 = F (vt)

Therefore

F (vt) = vt+1 =

pt+1=f(pt,pt−1,pt−2,pt−3,pt−4)

pt=100pt−1=100pt−2=100pt−3=100

Using the dynamical model

pt+1 = ptea1(t)ed1(x(m,n)

1,t ),

where(m,n) = [1, 5],

we calculate1m

n∑i=n−m+1

pi = 100,

and1n

n∑i=1

pi = 100,

so that

x(m,n)1,t = ln(100

100) = 0.

Thereforepte

a1(t)ed1(x(m,n)1,t ) = pte

0.03(0) = pt,

and the equilibrium point is

F (pt−k, pt−k+1, . . . , pt) = (pt−k+1, . . . , pt, f(pt−k, pt−k+1, . . . , pt))

We now show a numerical example of how each equilibrium point is unstable.

Exercise 12.2. In this example we include a vector of historical prices denoted vtwhere t = 0

vt =

pt=100pt−1=100pt−2=100pt−3=100pt−4=100

Page 29: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 29

At t = 1 we have vt+1 = (pt−3, . . . , pt, f(pt−3, pt−2, . . . , pt)) but this time we slightlypurturb our pt + 1 value by adding the value 0.02 so that we acheive the following

F (vt) = vt+1 =

pt+1=f(pt,pt−1,pt−2,pt−3,pt−4)+0.02

pt=100pt−1=99pt−2=101pt−3=98

=

pt+1=100.02pt=100pt−1=99pt−2=101pt−3=98

Using our dynamical model

pt+1 = ptea1(t)ed1(x(m,n)

1,t )

where(m,n) = [1, 5]

we calculate

1m

n∑i=n−m+1

pi = 100

and1n

n∑i=1

pi = 100.004

so thatx

(m,n)1,t = ln( 100

100.004) = −0.001

Thereforepte

a1(t)ed1(x(m,n)1,t ) = pte

0.03(−0.001) = 100.003 6= pt

We find with just the slightest perturbation the equilibrium at a fixed pointceases and allows the price to float away. Therefore, this shows us that the priceseries is chaotic.

13. Short Term Prediction using the Dynamical Model

This section considers a scenario where using our historical dataset prices aregenerated from the Dynamical model which are then compared to actual data. Inmathematical finance it is a common belief that one cannot predict the future stockprices, therefore the focus will be on the very short and medium term prediction ofstock prices, with the series limited to the prediction of 10 future prices.

Firstly, consider the historical data:p (t0) , ..., p(tn)

Where p(t) denotes our sampled stock price at time t. We take our data p (t0) , ..., p (tn)as initial data and use it in the moving average excess demand function within theDynamical model as in Formula (13.1).

(13.1) pt+1 = ptea1(t)ed1(x(m,n)

1,t )

The predicted future price is denoted as pf (tn+1), and it remains therefore its priceis a function of the historical prices with

pf (tn+1) = f (p (t0) , ..., p(tn)) .We iterate through the process again to compute pf (tn+2) , this time we includethe last predicted price within the function where

pf (tn+2) = f (pf (tn+1) , p (t1) , ..., p(tn)) .

Page 30: Oliver Poolman Mathematical Finance Thesis 2016

30 OLIVER POOLMAN

After N number of iterations a process of new predicted prices is generated

(pf (t0) , ..., pf (tN )) .

We then compare these with the actual prices denoted as (p (t0) , ..., p(tN )).To test out our models predictions, we carry out this simulation on 20 different

companies on the NYSE using 20 stocks. To see if our results are of any value weexamine various aspects.

1. Is there any correlation between (p (t0) , ..., p(tN )) and (pf (t0) , ..., pf (tN )).2. If we were to follow some strategy based on these predictions, would we make

any money and would these returns be consistent enough to apply to a live account.

13.1. Correlation between predicted prices and actual prices. To comparethe actual prices(p (t0) , ..., p(tN )) and predicted prices (pf (t0) , ..., pf (tN )). To findcorrelation we calculate the correlation coefficient for the two series of prices.

This determines the degree to which two variables movements are associated.The range of values for the correlation coefficient is -1.0 to 1.0, a value of -1.0indicates a perfect negative correlation, and a value of 1.0 indicates a perfect positivecorrelation. A value of 0 gives zero correlation.

To measure the correlation coefficient, the covariance of the two series of pricesis required in order to describe how two stocks will move together. This is denotedin Formula (13.2) where x represents the predicted values and y denotes the actualvalues. A positive covariance indicates that both tended to move in the samedirection at the same time, while a negative, covariance means they moved counterto each other.

(13.2) Cov(x, y) = 1N

N∑i=1

[(xi −1N

N−1∑i=0

xi)(yi −1N

N−1∑i=0

yi)]

The variance of each price series is found by using Formula (13.3)

(13.3) σx =

√√√√ 1N − 1

N−1∑i=0

(xi −1N

N−1∑i=0

xi)2

The correlation coefficient of the two series of random variables x and y where itsvalue is denoted as pxy is expressed in Formula (13.4).

(13.4) pxy = Cov(x, y)σxσy

13.4

Taking this final value pxy allows us to value how well our predicted pricescorrelate to actual prices. We now show a worked example.

Example 13.1. This example for the prediction of future prices on a single stockis derived from using our dynamical model, which simulates a process to predictthe next 10 daily closing prices. In this case we take the closing price of the S&P500 stock index. Take end of day closing historical prices for N number of days,where N = 10 and p(tN ) is the latest price available to us.

p (t0) , ..., p(tN ),

The historical prices are as follows

p (t0) , ..., p(tN ) = [2090.10, 2090.54, 2090.54, 2076.06, 2048.04, 2040.04,2047.63, 2047.20, 2066.65, 2046.60].

Page 31: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 31

Figure 13.1. Graph to show predicted prices against actual prices

Using the Dynamical model

pt+1 = ptea1ed1(x(m,n)

1,t ),

where(m,n) = [3, 10],

anda1 = 0.15,

We calculate the parameters for our excess demand function as in Formula (4.11).We then compute our moving average signal value from Formula (4.2) and insert itsvalue into the membership sets seen in Formula (5.2). The resulting set functionsare inserted into the excess demand function to retrieve our final excess demandvalue.

ed1(x(m,n)1,t ) =

∑7i=1 ciµAi(x

(m,n)1,t )∑7

i=1 µAi(x(m,n)1,t )

= −0.034164

Therefore our pt+1 price is given as

pt+1 = 2046.60e0.15(−0.034164) = 2036.14.This price is the first predicted next day closing price pf (tn+1) which is in fact afunction of previous prices

pf (tn+1) = f (p (t0) , ..., p(tn)) .This process is now iterated through to find the next 9 prices pf (tn+1) ......pf (tn+10) .

By changing notation the predicted prices becomex0, ..., xN = [2036.14, 2028.24, 2010.61, 1985.04, 1921.56, 1921.56,

1956.14, 2015.72, 1900.44, 1860.36]The actual future prices are recorded accordingly

y0, ..., yN = [2064.11, 2064.46, 2084.39, 2058.69, 2057.14, 2050.63,2051.12, 2063.37, 2081.43, 2065.30]

In Figure 13.1 the graph shows both series of prices. We can see in Figure (13.1)that the predicted prices from the Dynamical model and actual prices look un-correlated we now look at the statisitcal relationship in terms their correlationcoefficient.

Page 32: Oliver Poolman Mathematical Finance Thesis 2016

32 OLIVER POOLMAN

13.2. Correlation results. To find the covariance of the predicted values x0, ..., xNand actual values y0, ..., yN and compute the correlation coefficient, we use Formula(13.2)

(13.5) Cov(x, y) = 1N

N∑i=1

[(xi −1N

N−1∑i=0

xi)(yi −1N

N−1∑i=0

yi)] = 56.10.

then calculate our σx and σy values

σx =√

1N−1

∑N−1i=0 (xi − 1

N

∑N−1i=0 xi)2 = 60.61

σy =√

1N−1

∑N−1i=0 (yi − 1

N

∑N−1i=0 yi)2 = 11.26

The correlation coefficient is

(13.6) pxy = Cov(x, y)σxσy

= 56.10(60.61)(11.26) = 0.08213.6

This result shows that the two series of prices have zero correlation as our pxyvalue is very close to 0, with a value of −1 having a perfect negative correlationand 1 having a perfect positive correlation. This suggests that predicted prices aretherefore redundant.

Example 13.2. In order to minimise sample bias, 20 stocks from the NYSE wererandomly selected that showed roughly the same market capitalisation and IPOdate, but were from different industry sectors and with different volatilites, the aimis to conduct a fair experiment without sample bias. For each simulation we fix oura1 parameter. Our selected stocks are described in Table 13.2

Figure 13.2. List of companies for sample data collection in in-dustry sector order

Again we use the Dynamical model with the moving average excess demandfunction.

pt+1 = ptea1ed1(x(m,n)

1,t )

with parameters(m,n) = [3, 10]

anda1 = 0.15.

Page 33: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 33

We simulate the next 10 prices in the series, using the previous 10 closing prices asinput data for our excess demand function, the covariance and correlation coefficientare calculated to determine the relationship between the predicted prices and actualprices.

The resulting correlation coefficient results from low to high, are listed in Table5

Table 5. Table of covarienace and correlation coefficients for 10predicted prices against actual prices for stocks 1-20

As Table 5 shows, the relationship between predicted prices and actual pricesrange across a mixture of negative, positive and zero correlations, with the actalrange of correlation coefficients for the 20 chosen stock sitting in the region of

[−0.7615513, 0.74711],

where −1 is a perfect negative correlation and 1 is a perfect positive correlation.From these results, out of the set of 20 chosen stocks, we find that stocks OPWR,

WLKP and HELI show the greatest negative correlation and stocks CNNX andBNK show the greatest positive correlation.

To gain a clearer picture of the relationship between predicted prices and actualprices further investigation is carried out by constructing another test, simulatingeach stock multiple times over the period of one year.

Example 13.3. In order to minimise sample bias we split our time period intomonthly blocks taking the first 10 prices of the month as input data to predictthe next 10 prices using the Dynamical model. An average of these results arecalculated and displayed in Table 6

Table 6. The average correlation coefficients over 12 tests for pre-dicted prices against actual prices for our 20 stocks

Page 34: Oliver Poolman Mathematical Finance Thesis 2016

34 OLIVER POOLMAN

As Table 6 shows the values tend to gravitate around zero which implies littlecorrelation between predicted prices and actual prices. Our range of correlationcoefficients sit in the region of

[−0.213, 0.154],The values in Table 6 show much less correlation than in Table 5 this tells us thaton average we have almost zero correlation between our predicted price series andour actual price series.

In Exercise 13.4 using Dynamical model with the moving average strategy wesimulate the next closing price only, then repeat this for the next 100 days gen-erating a process of predicted prices. We study the prediction of each price bydetermining if the direction predicted being up or down is correct and in line withthe actual prices.

Exercise 13.4. In this exercise the predicted future price is denoted as pf (tn+1) ,and it remains therefore its price is a function of the historical prices with

pf (tn+1) = f (p (t0) , ..., p(tn)) .We iterate through the process again to compute pf (tn+2) , where this time wesimply take pf (tn+2)as a funcion of actual historical values,

pf (tn+2) = f (p (t1) , ..., p(tn+1)) .After N number of iterations a process of new predicted prices is generated

(pf (t0) , ..., pf (tN )) .Taking the 20 company stocks we simulate the next 100 days of closing prices

using our Dynamical model with the moving average strategy

pt+1 = ptea1ed1(x(m,n)

1,t )

with parameters(m,n) = [3, 10]

anda1 = 0.15.

To understand how precise the Dynamical model is at predicting the directionof the stock price we look at the average percentage of correct predictions for the100 daily prices, for each of the twenty stocks. We document our results in Table 7

Table 7. The percentage of correct predcitions of stock price direction

As Table 7 shows the percentage values range from 36% to 60% with an averagepercentage of 48% of correct predictions across all 20 stocks. From this we findthat the predictions are incorrect more often than they are correct, therefore theapplication of this model maybe be of some use in a contrarian trading strategy.We take a look at applying this methodology in the following section.

Page 35: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 35

14. Trading Strategy using the Dynamical Model

In this section two different trading strategies are applied both using the Dy-namical model with the moving average signal. The first example shown in Exercise14.1 utilises a medium term prediction strategy on a single stock with a focus on thepredicted series of N number of future prices along with a set of specific rules fortrade entry, exit and money management. The second example shown in Exerciseuses a short term prediction strategy on 20 of our stocks with a focus solely on asingle predicted next day price. We are only interested in the predicted directionof the simulated price away from the current price employing a contrarian point ofview and simple entry and exit rules in the trading process.

We now further test the Dynamical model in the first strategy by focusing on asingle stock in a simulated trading environment. The aim of this experiment is tofind if we can use the series of predicted prices from our Dynamical model to makeconsistent returns and warrant using the strategy in a live environment. We chooseour stock as QUOT using this throughout our next example

Exercise 14.1. The Dynamical model using the moving average signal is usedto predict future prices in our trading strategy. In our strategy environment weimagine a frictionless market where there are no commissions on buying stock,and no slippage. Slippage is the term used for the difference in price when there’slatency between the order being submitted and the order actually getting filled. Thestrategy is simplified by dictating that only long positions are employed negating theissue of borrowing costs on short selling stock, additionally only one long positionis allowed to be taken at once therefore limiting our exposure. The intuition behindour buying strategy and conditions are as follows.

The first condition states that the current moving average signal must be positive.The positive signal shows that the short term average is greater than the long termaverage, which indicates a possible excess in demand and upward momentum. Thesecond condition states that the average value of the future predicted series of Nnumber of prices must be greater than the stock price now, and so we anticipate thecurrent price to revert to the mean value of predicted prices. The final conditionstates that the price now must be less than the previous days price, we take thisprice pattern as a signal that there has been a minor retracement from the upwardmomentum and the price can be expected to now revert back with the upward flow.Once all our conditions are met for the sake of simplicity we buy a single stock andhold until our exit signal is generated.

We take QUOT historical prices as initial data in our moving average excessdemand function within our Dynamical model and output a process of new pricesWe use the following parameters within our Dynamical model

(m,n) = [3, 10],

anda1 = 0.15.

Using the previous 10 closing prices for the input data denoted as

p (t0) , ..., p(tn),

for n = 10 and then outputting the next 10 predicted prices denoted as

(pf (t0) , ..., pf (tN )) ,

for N = 20. To place a trade all conditions must satisfied starting with

x(m,n)1,t > 0,

Page 36: Oliver Poolman Mathematical Finance Thesis 2016

36 OLIVER POOLMAN

thenp(tn) < p(tn−1),

and finally

p(tn) < 1N

N∑i=1

pf (ti).

Money management rules are put in place including a stop loss and take profitvalue. The stop loss will be a function of the average true range of the previous 10prices, this is the average of the difference between the Hi and low price for eachday for the previous 10 days as seen in Formula (14.1)

(14.1) ATR(N) = 1N

N−1∑i=0|phiti − plowti|

The stop loss is defined as 120% of ATR(10) and take profit 240% of the ATR(10)giving us a 2:1 risk reward ratio. The idea behind using the ATR function is thatwe want a stop loss close enough to minimise our downside risk but not too tightthat we continually get stopped out. By using a 120% ATR(10) stop loss valuethe stop will lie just outside of the average range of prices allowing some breathingroom once our trade entry has been established .

Testing our strategy over the last 12 months using the QUOT stock, taking itsdaily high, low and closing prices we can produce a trading log as seen in Table 8

Table 8. Backtest results of trading strategy on 12 months ofQUOT stock historical data

The results from Table 8 indicates that the strategy lost money fairly consis-tently, with only three trades taking profit out of 13 total trades, therefore we findthe Dynamical model using the moving average strategy redundant for price seriesprediction purposes in this scenario.

We now employ the contrarian short term prediction strategy looking at a singleprice prediction for each day.

Exercise 14.2. In this exercise we execute a trading strategy using the Dynamicalmodel with the moving average signal for the prediction of the next day price andmore importantly its direction compared to the current actual price. Taking resultsfrom Table 7 in Exercise 13.4 we found the direction of predicted prices was correctonly 48% of the time, therefore we decide to take a contrarian point of view andtrade against the trend of simulated next day price.

Page 37: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 37

Using historical prices as initial data in our moving average excess demand func-tion we use our Dynamical model to simulate our new price. We use the followingparameters within our Dynamical model

(m,n) = [3, 10],

anda1 = 0.15.

Using the previous 10 days of closing prices for the input data denoted as

p (t0) , ..., p(tn),

we output the next days closing price

pf (tn+1) = f (p (t0) , ..., p(tn)) .

In our contrarian strategy we place a trade in the opposite direction to the trendindicated by the single price simulated in the Dynamical model. By applying thestrategy simultaneously to all 20 stocks an issue arrises due to having a range ofdifferent stock values. To overcome this problem we apply a dollar ammount to beused to balance the inital quantities of each stock being traded, with a fixed valueallocated across each stock. Starting with an equally balanced portfolio, throughoutthe process the dollar ammount attributed to buying or selling the particular stockwill be calculated from the realised value generated from the previous day, thereforefor the sake of simplicity we will not rebalance the portfolio each day.

Once again we imagine a frictionless market where there are no commissions onbuying or selling stock and no slippage issues, additionally the strategy is simplifiedby discarding the cost of borrowing on short selling stock. Each day we will entera trade exit the following day.

Trading the 20 stocks over a period of 12 months with the allocation of $100 toeach stock we output our results in Table 9.

Table 9. Annual returns from the short term prediction strategy

The results from Table 9 indicates that the returns are varied with a range ofvalues between −68.58% and 225% annual return. By taking a look at Figure 14.1we can see that the portfolio as a whole made a fairly consistent profit withoutdeviating too far below zero returns. We calcaulate a scenario where our two topperformers HELI and FELP were not included in this portfolio and are still able toaverage a positive annual return. With the portfolio having an annual return of 20%we find the Dynamical model using the moving average signal a possible candidatefor live trading as contrarian short term prediction model in this scenario.

Page 38: Oliver Poolman Mathematical Finance Thesis 2016

38 OLIVER POOLMAN

Figure 14.1. Average daily returns of porfolio under contrarianshort strategy

15. Conclusion

In this paper a function of the moving average of a stock price has been appliedto a non-linear Dynamical equation to produce a series of predicted future stockprices. By researching this mechanism we aim to find a way to capitalise on ourfindings by applying the model and its predicted prices to a trading strategy on alive trading account. In Exercises 13.2-13.3 tests were carried out for correlationbetween predicted and actual prices series, with initial results showing some corre-lation, but later concluding with a larger number of comparisons that the two serieswere uncorrelated. In Exercise 13.4 we used the Dynamical model to simulate thenext day predicted closing price only, we then compared to the actual price in termsof trend direction. Using daily predictions for 20 stocks over 100 days our resultsshowed an average incorrect prediction of 48%, therefore this gave us the possibilityof applying our model in a contrarian trading strategy. We simulated two differenttrading strategies, in Exercise 14.1 we applied the predicted price series from theDynamical model to the medium term trading strategy along with specific trad-ing rules, resulting in a negative return. In Exercise 14.2 we employ a contrarianstrategy by trading against the immediate trend predicted in the Dynamical model.Our results were clear in showing that positive returns were acheivable, thereforewe find that there is a possibility in using the Dynamical model with the movingaverage signal as a contrarian trend predicting mechanism within a live accountsetting.

Our mechanism to profiteer from price series predictions based solely on histor-ical data unfortunately failed, having said this by using the same mechanism forimmediate next day short term predictions proved to be successful. These resultsfall in line with the general consensus in mathematical finance that price seriesare random and chaotic therefore the result is not surprising. We now make somecriticisms and further research suggestions. The main criticism of the paper is thatwe employ a fixed set of parameters within the Dynamical model not allowing anyadjustment according to the stock it is trying to simulate. To increase correlationbetween predicted and actual price series we could optimise our model parametersby calibrating against historical stock prices. An example of this would be to runa large number of simulations over a longer time period such as 10 years and ad-just the a1, m and n parameters across a predefined range until we achieve the

Page 39: Oliver Poolman Mathematical Finance Thesis 2016

DYNAMICAL SYSTEMS IN TRADING PRACTICES 39

optimum correlation coefficient. Another example would be to calibrate the modelparameters around current market values such as the implied volatility value on theunderlying stock option, again the a1, m and n parameters could be optimised toproduce a process of predicted prices with a volatility close to the implied volatil-ity. There is still further work that can be carried out in researching this subject,more specifically the use of different trading signals can still be adopted. We haveremained with the moving average signal throughout the paper to formulate theidea of an abstract mechanism. With this mechanism now in place it would bequite possible to apply, back test and optimise one or more different technical trad-ing signals by following a similar process. The different type of technical tradingsignals are endless but to name a few we have Support and Resistance, Volume,Bollinger Bands and Relative Strength Indicators, which can all be applied. Withthis in mind we believe further research using Dynamical systems in predictingstock prices should still be considered. The next step is to trial all these abovesuggestions to eventually produce a significantly improved model that shows strongprediction capabilities. We can then commence further to an applied trading strat-egy optimising further our money management rules and entry and exit conditions,to see if we can progress further and prove many more consistent positive results.

References[1] Capinski, M. and Kopp E., “Strategies and risk-neutral probability”, Black Scholes

Model, 2016[2] Sahoo, S.K. and Mishra, M.N., “Brownian Motion”, Int. J. Mathematical Finance:

Applications of Stochastic Process, Volume 2, Issue 2, 2012, p43, 2278-5728.[3] Wang, L., “The models”, Dynamical Models of Stock Prices Based on Technical

Trading Rules, http://arxiv.org/abs/1401.1888.[4] Black, F. and Scholes, M., “The Pricing of Options and Corporate Liabilities”, The

Journal of Political Economy, Vol. 81, No. 3 (May - Jun., 1973), pp 637-654.[5] Shreve, S., “Stochastic Calculus”, Stochastic Calculus for Finance 2, Continuous-

Time Models, Springer, 2008, pp 125-132.[6] Stefanica, D.,”The Box-Muller Method”, A Primer for the Mathematics of Financial

Engineering, FE Press New York, 2011, pp 256-257.[7] Velasquez, T.,”Chaos Theory”, Chaos Theory and the Science of Fractals in Finance,

, Volume N.º 5 / 2009-2010, pp . 229-264.[8] Mingzheng, Y., Guoliang, C,. “The Non Linear Finance Chaotic System”, Chaos

Control of a Non-linear Finance System, Journal of Uncertain Systems, 2011 Vol5,No4, pp 263-270.

[9] Codenotti, B., McCune, B., Varadarajan, K., “Introduction ”, Market Equilibriumvia the Excess Demand Function, STOC’05, May 22-24, 2005, pp 1-4

[10] Vernon, J., “Real-Life Applications of Fuzzy Logic”, Advances in Fuzzy Systems,Volume 2013, ArticleID 581879, pp 1-3.