LAPPEENRANTA UNIVERSITY OF TECHNOLOGY School of Engineering Science Faculty of Science and Technology Double Degree Master's Programme in Computational Engineering and Mathematics

Ramona Maraia

STOCHASTIC PARTICLE MODELS: AND BURGERS DYNAMICS. AN APPLICATION TO COMMODITY MARKETS.

Examiners: Ass. Prof. Tuomo Kauranne Post. Doc Matylda Jablonska-Sabuka Doc. Daniela Morale ABSTRACT

Lappeenranta University of Technology School of Engineering Science Faculty of Science and Technology Double Degree Master's Programme in Computational Engineering and Mathematics

Ramona Maraia

STOCHASTIC PARTICLE MODELS: MEAN REVERSION AND BURGERS DYNAMICS. AN APPLICATION TO COMMODITY MARKETS.

Master's thesis

2016

127 pages, 43 gures, 40 tables, 2 appendices

Examiners: Ass. Prof. Tuomo Kauranne Post. Doc. Matylda Jablonska-Sabuka Doc. Daniela Morale

Keywords: stochastic dierential equation, stochastic interacting particle models, Burg- ers equation, commodity markets and computational market dynamics. 3

The aim of this study is to propose a stochastic model for commodity markets linked with the Burgers equation from uid dynamics. We construct a stochastic particles method for commodity markets, in which particles represent market participants. A discontinuity in the model is included through an interacting kernel equal to the Heav- iside function and its link with the Burgers equation is given. The Burgers equation and the connection of this model with stochastic dierential equations are also studied. Further, based on the , we prove the convergence, for large N, of a system of stochastic dierential equations describing the evolution of the prices of N traders to a deterministic partial dierential equation of Burgers type. Numerical experiments highlight the success of the new proposal in modeling some commodity markets, and this is conrmed by the ability of the model to reproduce price spikes when their eects occur in a suciently long period of time. Acknowledgements

I would like to express my gratitude to my supervisor Ass.Prof. Tuomo Kauranne, who gave me the opportunity to conduct this study, he oered his continuous advice and encouragement throughout the course of this thesis. I would like to thank my Co-supervisor Post. Doc. Matylda Jablonska-Sabuka for her willingness, she always found time for discussion and supported me during the entire period of study in Finland. I would like to express my deepest gratitude to my Co-supervisor from University of Milan, Doc. Daniela Morale for her excellent guidance, patience and knowledge. I would like to acknowledge the Lappeenranta University of Technology, the Depart- ment of Technomathematics, for the hospitality and great atmosphere, in particular Prof. Heikki Haario, Ass. Prof. Matti Heilio and Post. Doc. Virpi Juntilla. I would like to acknowledge the University of Milan, the Department of Mathematics, in particular the Ass. Prof. Alessandra Micheletti and the Ass. Prof. Paola Causin for the opportunity and support, before and during my foreign study. I would like to acknowledge the European Consortium for Mathematics in Industry (ECMI) for the great experience they provide me. Particular thank goes to my colleagues and all my friends that I met during the whole period of study in Italy and in Finland, in particular Nino and Roberta that made me feel at home, Dipal for her friendship and for her precious suggestions given during our long coee breaks, Polish guys, the guys from Czech Republic and the Russian guys for the relaxing time spent together. I would like to thank to my parents, mom Sonia and dad Giuseppe, who believing in me and giving me nancial support, have made this thesis possible. Specially thank to my young brother, who with his passion for literary studies and with his continuous request of help in math remembered me the wonderfulness of the mathematical world. I would like to express all my gratitude to the two greatest women of my life, my grandmothers, Ennia and Rosa, who with their love and advice encouraged me to do not give up. I would like to thank all my family, uncles and cousins for their special support. The deepest thank is for my decˇko Sebastian, who has been with me during all this Master study period, he always rooted for me and with his happiness helped me to enjoy beautiful moments and to overcome the darkest ones.

Lappeenranta, March 23, 2016.

Ramona Maraia CONTENTS 5

Contents

1 Stochastic models for price evolution 7

1.1 Introduction ...... 7

1.2 Mean Reverting processes ...... 15

1.2.1 Ornstein Uhlenbeck process ...... 16

1.2.2 Vasicek model ...... 20

1.3 An individual based model ...... 23

1.3.1 Data ...... 26

2 Stochastic system and Burgers equation 33

2.1 Burgers equation ...... 33

2.1.1 Viscid Burgers equation ...... 34

2.1.2 Inviscid Burgers equation ...... 40

2.2 Stochastic dynamics: Derivation of a generalized Burgers equation . . . 44

2.3 A Stochastic interacting particle system(SIPS) ...... 49

2.3.1 Solution of the SIPS and nonlinear Martingale problem . . . . . 56

2.3.2 Stochastic interacting particles method ...... 60

2.3.3 Convergence rate ...... 63

3 The dynamics of traders: a new proposal 65

3.1 Literature review ...... 66

3.2 Stochastic Interacting Traders model ...... 68

3.2.1 Construction of the model ...... 68 CONTENTS 6

3.2.2 Heuristic derivation ...... 71

3.3 Application of the proposed model to some commodity markets . . . . 76

3.3.1 Silver commodity market ...... 77

3.3.2 New Zealand electricity market ...... 83

3.4 Performance of the new proposed model ...... 88

4 Discussion and future perspectives 94

A Fundamentals of Stochastic Processes 95

A.1 Stochastic processes and their properties ...... 95

A.2 Stochastic integrals ...... 98

A.2.1 Ito integrals of Multidimensional Wiener Processes ...... 100

A.2.2 The Stochastic Dierential ...... 102

A.2.3 Itoˆ's Formula ...... 103

A.2.4 Multidimensional Stochastic Dierentials ...... 103

A.3 Stochastic Dierential Equations ...... 105

B Tables 108

B.1 Tables for Silver price simulation ...... 108

B.2 Tables for New Zealand electricity price simulation ...... 114

Bibliography 119

List of Tables 123

List of Figures 125 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 7

1 Stochastic models for price evolution

1.1 Introduction

The purpose of this thesis is to build a model for commodity markets and to study the connection of these markets with the Burgers equation from uid dynamics, focusing only on the inuence that traders' behaviour has on price formation.

Traders are individuals who need a certain commodity at a future date T. Commodity can be either bought in the spot market today and stored, when storage is possible, or bought with a futures contract, which allows buying a particular commodity at a xed price in the future.

Because of future contracts, the market needs to estimate the price of commodities at future dates. The future price is assumed to be equal to the spot price plus interest and storage costs until the contract expiry date.

Thus

F0 = S0 + I + C

where F0 and S0 are future price and spot price at time t = 0, respectively, I is the interest and C the storage cost, [1].

The most dicult part is to know the spot price evolution, which is usually dened as the point at which demand of a particular commodity meets its supply, but demand and supply have to be estimated. They depend upon several factors, that are specic features of each commodity, such as availability in nature, product properties, delivery costs and conditions, or upon other factors, such as governmental issues which act to increase national prot, freight cost which may be linked to the cost of other com- modities such as fuel and so on. In addition, some commodity prices such as prices of agricultural products are subject to weather conditions on which supply availability depends, higher supply leading to lower price and vice versa.

Moreover there is a wide dierence between a storable commodity and a non-storable one. When the commodity is storable, demand can be met out from the current 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 8 production, and higher demand of a storable commodity can be satised by stored supply. In case of higher supply, surplus of commodity can be stored. The situation is dierent for a non-storable commodity which in case of higher supply leads to loss of money.

Both demand and supply instability and the heavy dependence upon several factors make commodity prices historically highly volatile, and their prediction is still subject of ongoing research.

The origins of option pricing models are dated back to Bachelier, who was the rst one to propose using Brownian motion for modelling the dynamics of the stock prices, but this model allows negative values and option prices that exceeded the price of the underlying asset. Therefore Osborne in [2] rened Bachelier's model by using stochastic exponential of the Brownian Motion. After that Samuelson studied the option pricing using geometric Brownian motion in [3]. A breakthrough is represented by the Black and Scholes' model (B&S) given in [4], which is based on the idea that the option price is explicitly connected to a hedging strategy which depends on the of the stock price as well as other observable quantities. The dynamics of spot price St can be described by the following Geometric Brownian motion

dSt = rStdt + σStdWt (1) the solution of which is

σ2 (r− )t+σWt St = S0e 2 (2) where r is the drift, σ the volatility of the spot price and the random component is represented by {Wt}t. Trajectories of a stock price that follows an SDE of type (1) are simulated in Fig. 1, with initial value S0 = 4.5. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 9

Figure 1: Paths of the exact solution of the Geometric Brownian motion (1) with r = 0.3, σ = 0.4 and initial value S0 = 4.5

This model highlighted the stochastic behaviour of commodity prices, but there are some critical assumptions in the Black and Scholes model, such as that trading takes place continuously in time and that the dynamics of the stock has a continuous sample path with probability one, whereas the market, especially the commodity market, is full of jumps. There is enough evidence in the history of nancial markets, which shows that the presence of jumps is due to new important information about the stock.

Robert C. Merton in [5] and [6] added to the standard Geometric Brownian motion the impact of such important new information on the stock price per unit of time. Merton assumed that the total change in the stock price is the sum of two dierent types of variations. The rst change is the normal vibration in price, the impact of which per unit time on the stock price is to produce a marginal change in the price. This compo- nent is modelled by a standard Geometric Brownian motion with a constant variance, thus through a continuous sample path. The latter variation is the abnormal vibration in price, which is due to the arrival of important new information about the stock. Such kind of variations are expected to be active at the time when information arrives but stay inactive otherwise. It follows that the eect of abnormal vibration occurs only at discrete points in time, and therefore it is modelled by a Poisson process. The resulting model is an exponen- 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 10

Lt tial Le`vy model of the form St = S0e where the stock price process {St; 0 ≤ t ≤ T } is modelled as an exponential of a Le`vy process {Lt; 0 ≤ t ≤ T }. The Le`vy process Lt is dened as a Black and Sholes process with the continuous diusion process represented by the drift plus a discontinuous described by a Poisson process.

Hence the stochastic dierential equation of the stock price process St is of the following type

dSt = (α − λk)dt + σdWt + (yt − 1)dNt (3) St with α the instantaneous expected return on the asset, σ the instantaneous volatility of the asset, k = E(yt −1), where the absolute price jump size yt −1 is a non−negative 2 random variable drawn from log−normal distribution, i.e. ln(yi) ∼ N(η, δ ) i.i.d,

Wt a standard Brownian motion process, Nt is a Poisson process with intensity λ and independent from Wt. The solution of the equation (3) is

σ2 (r−λk− )t+σWt St = S0e 2 Y (n) (4) where  1, if n=0 Y (n) = Qn otherwise  i=1 yi, with n a Poisson distributed random variables with parameter λt. Fig.2 presents trajectories of the solution of the Merton model, keeping constant r = 0.3 and σ = 0.4 in order to show the evolution of stock price behaviour when a Poisson component with intensity λ = 2 and ln(yi) ∼ N(0.4, 0.04) is added to a Standard Geometric Brownian motion. For λ = 0 the Poisson component is zero, thus the Merton model becomes the Geometric Brownian motion. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 11

(a) λ = 2 (b) λ = 0

Figure 2: Paths of the exact solution of the SDE (3), in 2a with a Poisson noise and in 2b without it.

The main issues with these models are estimation of asset price volatility and that they do not take into account signicant features of commodity markets such as convenience yield, seasonality and mean reversion patterns, which play a very important role in nancial markets.

Starting from the evidence that stock prices usually oscillate around an average level, mean reversion processes, introduced in Section 1.2.2, are used to simulate nancial data, which means that the eect of reverting to the average level is included in the

Geometric Brownian motion. The basic assumption is that the stock price St follows the stochastic dierential equation

dSt = γ(µ − lnS)Sdt + σSdWt (5) St

where γ, µ ∈ R+ are the speed and the level of the reversion, σ ∈ R+ is the volatility, and the randomness is given by the Wiener process Wt. Clearly the one−factor model depends only on the history of the stock price, but it is the result of the interactions of many factors such as the convenience yield and the . Therefore authors like R. Gibson and E. Schwartz implemented the one−factor model as a two and then a the three−factor model, see [7], [8]. The spot price St, the convenience yield factor δt and the interest rate rt are modelled by separate stochastic processes, possibly correlated, and the assumption is that these factors follow the joint : 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 12

dSt = (rt − δt)Stdt + σ1StdWt,1 (6)

dδt = (α − δt)Stdt + σ2StdW2,t (7)

drt = (β − rt)Stdt + σ3StdW3,t (8)

where α, β, σ1,2,3 ∈ R+, and dW1,tdW2,t = ρ1dt, dW1,tdW3,t = ρ2dt, dW2,tdW3,t = ρ3dt with ρ1, ρ2, ρ3 the correlation coecients. The two-factor model does not include the interest rate. One of the main diculties in the application of these commodity prices models is that the factors or state variables are not directly observable. These models are treated also in papers [9], [10], [11], [12], [13].

An alternative way for modelling commodity prices is represented by interacting par- ticle system (IPS) models, which are used for phenomena involving a large number of interrelated components. These models are applied in many elds such as statistical physics, biology and economics. Interacting particle models are continuous time Feller S processes {ηt}t dened on the compact state space of binary congurations X = {0, 1} on S, a countable set. A simple process is that in which the coordinates ηt(x) evolve according to two independent Markov processes with transitions from 0 to 1 and from

1 to 0 at rate 1. The process {ηt}t is described by specifying the rates at which transi- tions occur. In the case with nite S, saying that the transition η → ς for η 6= ς occurs at rate c means that

η P (ηt = ς) = ct + o(t) as t ↓ 0.

The innitesimal generator Ω of {ηt}t provides the relationship between the process and its transition rates, where Ω is dened on a dense subset of C({0, 1}S), and is determined by its values on the cylinder functions, i.e.

X Ωf(η) = c(η, ς)[f(ς) − f(η)] ς with c(η, ς) the rate at which transitions occur from η to ς. Some of the most important models in this area are Voter models which are the simplest ones [14], Contact Processes (CP) in which particles can be infected and can infect their neighbouring particles [15], the Exclusion Interaction Process (EP), in which particles only jump to empty sites and the Magnetic Model which reproduces the magnetic spin. All of them are treated in [14], [16], [17], [18]. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 13

The starting point of this study is given by the literature upon stochastic interacting particle models [see Morale et al. 2005 (An interacting particle system modelling aggre- gation behaviour: from individuals to populations), Capasso−Morale 2008 (Rescaling Stochastic Processes: Asymptotics), Capasso−Morale 2004 (Ant Colonies: a Nature In- spired Paradigm for the Mathematical Modelling of Self-Organizing Systems)]; in which particular attention is paid to the mathematical modelling of the social behaviour of interacting individuals in a biological population (animals, cells, etc.). These systems led to the phenomena of self−organization, which exhibit interesting spatial patterns. Often observational and empirical evidence show that animal groups move across the landscape quite cohesively.

The animal population dynamic model, developed in [19], describes the dynamics of animal populations, where each individual is treated as a discrete particle and the movement of each particle is described thinking that each of them is subject to some rules. These rules can be attributed the instinctive behaviours, which are represented by a random component, and external forces, as for example, forces of interaction between individuals.

Let k be a stochastic process describing the state of particles. It is dened (XN (t))t∈R+ N d on a suitable probability space (Ω, F,P ) and valued in (R , B Rd ), where B Rd is the Borel σ−algebra generated by intervals in Rd. The variation in time of the location of the k th individual in the group at time , k d, for is − t > 0 XN (t) ∈ R k = 1,...,N described by a stochastic dierential equation of type (9).

Let 1 N , the whole population is represented by a system of stochas- Xt = (Xt ,...,Xt ) N tic dierential equations, each of them of the type (9).

k k k k (9) dXN (t) = [fN (t) + hN (Xt(t), t)]dt + σdW (t), k = 1,...,N where the function k Nd + describes the interaction that the th particle has hN : R × R k− with the other individuals and the function k + reects possible dynamics fN : R → R of the k−particle, which may depend on the time t or the state of the particle itself.

The model of type (9) does not include the eect that the environment has on the population dynamics. If the individuals are on a regular surface then they can take big distances from their neighbours without losing sight of the position of the others. On the other hand, on an irregular surface the distances between individuals and 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 14 their neighbours will stay closer. Therefore the animal population dynamic model that was implemented in [20] included the environment inuence, and the aggregation and repulsive forces. The need to add these components is based on the assumption that particles can perceive other particles only within a limited range, so they do not have information about the spatial distribution of all the individuals, which leads to aggregation. On the other hand, there is a repulsive eect when particles are too close to each other. The entire population is described through a system of N stochastic dierential equations where each of them can be written as (10).

k k k k (10) dXN (t) = [γ∇U(XN (t)) + θ(∇(G − VN ) ∗ X(t))(XN (t))]dt + σdW (t), for and and +. Where k , with k = 1,...,N σ ∈ R γ, θ, σ ∈ R ∇U(XN (t)) U ∈ 2 d + , is the potential of the environmental inuence on th particle, and Cb (R , R ) k− G and V stand for aggregation and repulsive forces, respectively.

The price formation of stocks or any commodity is usually a process involving a group of traders, so it can be seen as a large population. One can rene the idea to see a group of traders as a large population of agents, featuring their dynamic upon the distances between their price, instead of upon their density or their distances from the others, as in the animals' case. In that way we are allowed to consider a model as in (9).

This is the idea that drove M.Jablonska and T.Kauranne, in their papers [21] and [22],[23], to think at a group of traders as a population of individuals that interact on three dierent scales through a system of stochastic dierential equations. These scales, which are also included in the model proposed in [19], are the macroscale, that is referred to the direction of the entire population, the microscale, that is related to the motion of each individual separately, and the mesoscale which allows interaction with the closest neighbourhood.

M.Jablonska and T.Kauranne in their papers implemented the model (9), as described in Section 1.3.1, adding a global interaction and local interaction. The global interac- tion component reects the eect caused by a large subgroup on the whole population, when it has a dierent behaviour with respect to the total population mean. In [21], this term, also called momentum component, is supposed to have a link with the Burgers equation. The local interaction component reects the assumption that each individual in the population can perceive its neighbours to a limited extent. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 15

The model has been tested on several dierent commodity markets, including Silver and New Zealand electricity markets. The results show that on the rst data set, Silver prices, the model can be considered acceptable with the root−mean square error approximately near to 0.2. The diculties of this model arise when it is used to simulate the electricity prices, due to their high volatility.

Interested to the connection of the global interaction component with the Burgers equation, in this work we develop a model for commodity markets, which is still based on the analogy of animal population spirits with traders behaviour, going to investi- gate the impact on the commodity markets of a model in which a global interacting kernel is realized by a discontinuity function linked with the Burgers equation. For the development of a new model an individual based model, useful for the derivation of the correct limit equation when the number of traders are supposed to increase, is used and its convergence to a Burgers dynamic is studied.

This work is organized as follows: starting by the link of global interaction component with the dynamic of Burgers equation, in Chapter 2 we give a brief description of Burgers equation and investigate on its connection with stochastic dierential equa- tions, analysing in depth a system of stochastic dierential equations with the Heaviside interacting Kernel. In Chapter 3 a new model for traders dynamic is introduced going to exploit the interaction kernel presented in Chapter2, and the results of its applica- tion on two dierent commodity market are discussed. Chapter 4 provides discussion on improvements and failures of the model developed in this study and its futures perspectives.

1.2 Mean Reverting processes

In nance, mean reversion is the assumption that a stock's price will tend to move to the average price over time. Average price can be computed from the historical data, or from other available information.

The principle on which the mean reversion theory is based is that if the current market price is less than the average price, then the stock is considered attractive for purchase, with the expectation that the price will rise. If the current market price is above the average price, then the market price is expected to fall. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 16

So, the mean reversion models can be dened by the property to always revert to a certain constant or time varying level with limited variance around it. An Ornstein Uhlenbeck process is widely used for modelling a mean reverting process.

1.2.1 Ornstein Uhlenbeck process

Ornstein and Uhlenbeck, in their famous paper [24], studied the velocity of free par- ticles in Brownian motion, moving in a rareed gas and aected by a friction force proportional to pressure.

From Newton's second law of motion the equation of particles' velocity is

mdV (t) = −γV (t)dt + dW (t) (11)

In the equation (11) m is the mass of particles, γ ∈ R is the friction coecient and dW is a Wiener process that represents a random force.

Dividing per m and putting γ 1 ρ = , σ = , and V (t) = X(t) m m then the equation (11) becomes

dX(t) = −ρX(t)dt + σdW (t) (12)

+ with ρ and σ elements of R , and (Wt)t≥0 one−dimensional Wiener process. The equation (12) is called Langevin equation, it is the oldest example of stochastic dierential equation.

Applying the Itoˆ0s formula to eρtX(t) :

d(eρtX(t)) =ρeρtX(t)dt + eρtdX(t)

=ρeρtX(t)dt + eρt[−ρX(t)dt + σdW (t)]

=eρtσdW (t).

Therefore: Z t eρtX(t) = X(0) + σ eρsdW (s) 0 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 17 and the solution has the form

Z t −ρt ρ(s−t) X(t) = e x0 + σ e dW (s). (13) 0 The equation (13) denes the Ornstein−Uhlenbeck process.

Denition 1.1. The Ornstein−Uhlenbeck process (X(t))t∈R is a stochastic process of the form (13), that satises the Langevin stochastic dierential equation (12) with starting point X(0) = x0.

Proposition 1.1. An Ornstein Uhlenbeck process (X(t))t∈R+ with X(0) = x0 is a with

σ2 E(X(t)) = x e−ρt and Cov(X(t),X(s)) = (e−ρ|t−s| − e−ρ(t+s)) 0 2ρ and one dimensional distribution −ρt σ2 −2ρt . N(x0e , 2ρ (1 − e ))

Proof. From the expression (13) it follows that it is a linear equation for(X(t))t∈R+ with deterministic coecients and an additive Gaussian forcing. In this case the solution is also Gaussian.

The expected value can be computed as

Z t −ρt ρ(s−t) E(X(t)) =E(e x0 + σ e dW (s)) 0 Z t −ρt ρ(s−t) =E(e x0) + E(σ e dW (s)) 0 −ρt =x0e since W (t) is a Wiener process, so

Z t E(σ eρ(s−t)dW (s)) = 0, 0 thanks to the Itoˆ isometry, Proposition A.6.

The covariance 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 18

−ρt −ρs Cov(X(t),X(s)) =E[(X(t) − x0e )(X(s) − x0e )] Z t Z s =E[σ2( eρ(u−t)dW (u))( eρ(u−s)dW (u))] 0 0 Z t∧s =E[σ2( eρ(u−t)eρ(u−s)d(u))] 0 σ2 = (e−ρ|t−s| − e−ρ(t+s)), 2ρ in particular the variance is

σ2 V ar(X(t)) = Cov(X(t),X(t)) = (1 − e−2ρt). 2ρ

Therefore it follows that its one dimensional distribution is −ρt σ2 −2ρt . N(x0e , 2ρ (1 − e ))

The probability density of an OU process is given by the Gaussian density with µ(t) = E(X(t)) and σ2(t) = Cov(X(t),X(t))

1 [x − µ(t)]2 p(x, t) = exp{− }. (14) p2πσ2(t) 2σ2(t)

Proposition 1.2. If the time t → ∞, then Ornstein Uhlenbeck process is a stationary Gaussian process with zero mean.

Proof. From the Proposition 1.1 follows that the OU process is a Gaussian process; we need to prove only that it is stationary. As the time t → ∞, the expected value

−ρt E[X(t)] = x0e → 0, the variance σ2 σ2 V ar[X(t)] = (1 − e−2ρt) → , 2ρ 2ρ and the covariance σ2 σ2 Cov(X(t),X(s)) = (e−ρ|t−s| − e−ρ(t+s)) → e−ρ|t−s|. 2ρ 2ρ Thus X(t) is a stationary Gaussian process. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 19

Denition 1.2. A stationary Ornstein Uhlenbeck process is a stationary Gaussian process with zero mean.

A stationary OU process is the exact solution of the SDE (12) if, instead of taking deterministic initial conditions, we suppose that X(0) is a Gaussian random variable N(0, σ2), with covariance

σ2 Cov(X(t),X(s)) = e−ρ|t−s|, (15) 2ρ and stationary distribution

2 1 − x p(x) = √ e 2σ2 (16) 2πσ2 where σ2 is the variance.

As shown in Figure 3, the average behaviour of Ornstein-Uhlenbeck processes tends to zero as t is large, i.e. E(X(t)) −→ 0 as t −→ ∞. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 20

Figure 3: Trajectories of an Ornstein Uhlenbeck process tends to mean 0 as t −→ ∞

The blue lines are the OU simulations made using dierent initial values as x0 = −6, −3, 2, 6 and mean reversion speed ρ = 0.8 and volatility σ = 0.2. The green lines are the mean behaviour E[X(t)]of each OU simulation which goes to zero (red line).

1.2.2 Vasicek model

The Vasicek model is widely used in nancial markets; it is a translation of the Ornstein Uhlenbeck process and its SDE has the following form:

dX(t) = −ρ(X(t) − µ)dt + σdW (t) (17)

+ with (Wt)t≥0 a Wiener process described in section A.1 and µ, ρ, σ constants in R . Given Y (t) = µ − X(t), then

dY (t) = −dX(t) = ρ(X(t) − µ) − σdW (t). 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 21

Again applying Itoˆ0s formula to eρtY (t):

d(eρtY (t)) =ρeρtY (t)dt + eρtdY (t)

=ρeρtY (t)dt + eρt[−ρY (t)dt − σdW (t)]

= − eρtσdW (t).

Therefore: Z t eρtY (t) = Y (0) − σ eρsdW (s) 0 and coming back to X(t)

Z t eρt(µ − X(t)) = µ − X(0) − σ eρsdW (s) 0 we have that Z t X(t) = µ + e−ρt(X(0) − µ) + σ e−ρ(t−s)dW (s) 0 which is the solution of a stochastic dierential equation of the type (17); with expected value and variance

σ2 E(X(t)) = µ + (X(0) − µ)e−ρt and V ar(X(t)) = (e−ρt). (18) 2ρ

In this model the process X(t) uctuates randomly, but tends to revert to some fun- damental level µ. The behaviour of this 0reversion0 depends on both the short term σ and the speed of reversion parameter ρ, as shown in Figures 4 and 5.

In Figure 4 we have simulated roughly 120 days using Eulero−Mayurama approxima- tion; with a small daily volatility, σ = 0.5, in Figure 4a, and a bigger volatility, σ = 5, in Figure 4b. The mean reverting level, µ = 20, and speed of mean reversion, ρ = 1.5, are kept constant over three dierent simulations with dierent starting points in both cases. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 22

(a) σ = 0.5 (b) σ = 5

Figure 4: Simulations on variation of σ.

In Figure 5 are simulated roughly 120 days, with a small reverting mean speed, ρ = 0.3, in 5a, and a bigger speed of mean reversion, ρ = 5, in 5b. The mean reverting level, µ = 20, and daily volatility, σ = 1.5, are kept constant over three dierent simulations with dierent starting points, in both cases.

(a) ρ = 0.3 (b) ρ = 5

Figure 5: Simulations on variation of ρ.

The Ornstein-Uhlenbeck paths consist of uctuations around the xed mean reverting level µ, and they are typically of the order σ, although larger uctuations occur over long enough times.

This behaviour is suited for the analysis of economic variables, such as the price of some commodity, which has reason to revert at a xed level. Nevertheless, when we 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 23 want to simulate the prices of commodities through the mean reverting process, the main challenge is to carry out the best choice for the parameters; even if each variable has an intuitive meaning, estimating its value is dierent.

There are dierent generalizations in literature related to the Ornstein−Uhlenbeck processes. Usually a generalized Ornstein Uhlenbeck (GOU) process is dened as a

(Vt)t≥0 process driven by the bivariate Le`vy process (ξt, ηt)t≥0 such that it satises the following equation:

 Z t  −ξt ξs− Vt = e V0 + e dηs , t ≥ 0, 0

where V0 is a nite random variable, independent of (ξ, η). Furthermore the GOU process driven by (ξ, η) is the unique solution of the stochastic dierential equation

dVt = Vt−dUt + dLt, t ≥ 0,

for the bivariate Le`vy process (Ut,Lt)t≥0, as shown in [25]. Properties of the described process are treated in detail in [26] and [27].

Other generalizations of the Ornstein-Uhlenbeck process are studied in [28], where given the classic Langevin equation (12) the additive Brownian noise is replaced with an arbitrary time−dependent random force characterizing the noise.

1.3 An individual based model

In nancial markets it is well-known that commodity price is the result of several factors. One of the factors that is common for dierent stock and commodity prices is the impact of traders' investments. This is the main idea that inspired M. Jablonska, in [22], to develop a model for commodity prices only based on the inuence that traders' behaviour has on price formation.

Since a big subgroup of traders can be seen as a particle population, the application of stochastic interacting particles model,[19], to the traders case is allowed. Therefore in 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 24

[22], [23], the authors give a stochastic particle model for commodity prices in which a group of N traders is treated as a discrete system of N particles and their dynamics is characterized upon the distances between their price, instead of upon their density as in the animal case.

Traders are allowed to interact on three dierent scales, which are incorporated in the model equation. Macroscale is referred to as the direction of the whole population and is given by a mean reversion process. Microscale includes information about the motion of each trader separately and it is introduced through a global interaction component; mesoscale is describing to the interaction of each individual with its closest neighbourhood and for this scale a local interaction function has been dened.

Also a psychological trading component is added. This component is related to the phenomena of "animal spirit" rst introduced by Keynes in [29], according to which instincts and emotions guide humans and push them to behave like animals, performing acts without rationality.

Given a market with N ∈ N \{0} traders, the basic idea of the model developed by M. Jablonska and T. Kauranne is that in the interval [t, t + dt) the k − th trader proposes a price k d, , , depending upon all traders' price Xt ∈ R t ≥ 0 d ∈ N \{0} vector X 1 N at time −. The nal price ˆ depends on the traders t = (Xt ,...,Xt ) t Xt N prices k for at time − and upon a source of randomness described Xt k ∈ {1,...,N} t by an additive Wiener process . Denoting by k a stochastic process, that Wt {Xt }t∈R+ describes the state of the k−th trader, dened on a suitable probability space (Ω, F,P ) d and valued in (R , BRd ), with BRd the Borel σ−algebra generated by the intervals in Rd, the N traders prices' are given by the following system of stochastic dierential equations of the Itoˆ type:

k k X X X k (19) dXt = [f1(Xt , t) + f2(k, t) + f3(k, t)]dt + σdWt ,

for k = 1,...,N and constant volatility σ ∈ R+. The stochastic term is given by a family of independent Wiener processes, while the drift is composed by three terms that are described in the following.

The rst term k X describes a mean reversion with respect to the average f1(Xt , t) 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 25 observed price in a previous time interval of size D ∈ R, i.e.

k X ∗ k (20) f1(Xt , t) = γ(Xt − Xt ), where

Z t ∗ 1 ˆ Xt = Xsds D t−D

is the mean reversion level at time t and γ ∈ R+ is the rate with which the data are pulled toward the mean reversion level ∗. This mean ensures that even if prices spike, Xt they will come back to their usual level.

The f2(k, Xt) function reects the global interaction of traders. This function encloses information about the position of the k−th trader with respect to the entire population, in depth if the k − th trader follows the average population behaviour believing that others have more information, or deviates from them.

X X k f2(k, t) = θ(h(k, t) − Xt )

d where the function h(k, Xt) ∈ C(R ) and θ ∈ R+ is the strength of that interaction. In [21] it is explained that this term is suggested by the dynamics of the Burgers equation. In the next Chapter we will investigate in detail this aspect.

The function f3(k, Xt) is a function describing local interaction of the k−th trader with its neighbours, which means that each trader at time t perceives only the inuence of the price of the closest p% of the total population and moves toward the most distant price from that neighbourhood, believing that other are better informed. From the study carried out in [21], on the appropriate choice of p%, the results shown that the value of 5% is the optimal one. The f3(k, Xt) function is dened as follows

X X k f3(k, t) = ξ(g(k, t) − Xt ),

d where g(k, Xt) ∈ C(R ) and ξ ∈ R the local interaction speed. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 26

1.3.1 Data

Silver data

The data used to test the model consist of daily observations of closing prices for two dierent commodities, silver and electricity.

Silver price data are collected from www.livecharts.co.uk website, related to the period 1st March 2000 to 1st March 2013. They are closing prices of spot Silver, expressed in US dollars; the weekends are also included, replacing them with some of Friday closing prices. As shown in Figure 6, which represent the Silver price evolution, the data are not stationary not mean reverting either.

Figure 6: Silver data prices line chart

Anyway, the model described above has been tested for this data set and the results prove that the model is able to capture some of the features of this set as demonstrated in [30].

Let assume a market with N = 100 traders in a time window of 91 days, mean reversion rate and volatility constant over time, and the percentage of the local interaction xed at 5%. Figures 7 and 9 present two dierent simulations of the Silver data, which are 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 27 obtained by keeping constant all the variables, with only the randomness changing. The related root mean square error (RMSE), which conrms that the simulated data follows in mean the Silver price, is given in Fig. 37 and 10, respectively. The simulated data are 700 and the simulation at each time step are computed on a window of 91 days in a way that at each time the previous 91 data are used, but only nine of these are drawn in the picture below.

Figure 7: Silver data simulations at dierent times, Hb is the variable counting days from the beginning of the data 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 28

Figure 8: Root mean square error.

Figure 9: Silver data simulations at dierent times Hb. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 29

Figure 10: Root mean square error.

In Figures 7 and 9, the blue line is the Silver line chart and the red line is the simulated value and in Fig. 37 and 10 the corresponding root mean square error distribution is plotted.

As expected after a few times the high volatility of the future price emerges, due to the use of the 91 previous simulated prices, which leads to an increase i the forecast error. Anyway, the results show that the model approximates the real Silver closing price in average with anerror that oscillates around 0.2. Moreover, tests demonstrate that the root mean square error is not normally distributed.

New Zealand electricy data

The model has been tested also for other commodities as sugar and crude oil. The most challenging market to simulate is the electricity spot market, since it is a high volatility commodity. The high volatility is due to many factors as by its nature dicult to be stored, it has a seasonal component and also due to the fact that electricity has to be available on demand.

The above described model has been used for simulating the New Zealand electricity 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 30 prices. New Zealand is a country with dierent sources of electricity; the two major categories are electricity from hydroelectric stations and from thermal, geothermal and wind power. In this particular market, trading occurs 24 hours a day, seven days a week, for each half-hour period of the day.

The data used in this thesis consists of a set of 3500 daily observations, where each of them is the average of the 48 prices occurred in that day, i.e., one every 30 minutes.

Figure 11: New Zealand electricity spot prices line chart.

In Figures 12 and 14, the blue line is the New Zealand electricity spot prices line chart and the red line is the simulated value and in Fig. 13 and 15 the corresponding root mean square error distribution is plotted. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 31

Figure 12: New Zealand electricity data simulations at dierent times Hb.

Figure 13: Root mean square error. 1 STOCHASTIC MODELS FOR PRICE EVOLUTION 32

Figure 14: New Zealand electricity data simulations at dierent times Hb.

Figure 15: Root mean square error.

From Figures 12 and 14 it is clear that the model does not follow the electricity price behaviour, and not even in the mean. From Figures 13 and 15 we can conclude that 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 33 the root mean square error is around 30.

2 Stochastic system and Burgers equation

As introduced in Chapter 1, section 1.3.1, a part of the dynamics of the introduced model is inspired by the dynamics described by the Burgers equation, which can be interpreted as a mean eld approximation of a family of stochastically interacting individuals. In this Chapter we deepen the study of the Burgers equations from the deterministic point of view and investigate how to derive it from a stochastic system.

The use of such equations in the nancial and economic eld is not a new approach. Indeed a common assumption for modelling nancial markets is the equilibrium price, which is dened as the state where market supply and demand balance each other. As a result, price becomes stable and the mathematical condition for an equilibrium nancial market is that there must exist a risk neutral probability measure Qt, depending on time t, absolutely continuous with the given real world probability measure P ; this is also a condition for an arbitrage free-pricing system. The risk neutral probability measure Qt leads us to determine the path-independence property for the associated density process dened by the Radon-Nikodym derivative dQt As shown in Section dP . 2.2, this property translates from a stochastic dierential equation of Markov type to a non-linear partial dierential equation, such as Burgers equation.

Since this link is legitimized from the nancial point of view, we can use the stochastic interacting particles method for Burgers equation for modelling commodity markets.

2.1 Burgers equation

Burgers equation is a simplication of the Navier−Stokes equations which are a set of nonlinear partial dierential equations describing the motion of a uid in Rn.

∂ u(x, t) + u(x, t) · ∇u(x, t) = −∇p(x, t) + ν∆u(x, t) + F (x, t) x ∈ Rn, t ≥ 0 (21) ∂t ∇ · u(x, t) = 0 x ∈ Rn, t ≥ 0 (22) 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 34

These equations are to be solved for an unknown velocity vector function u(x, t) and a pressure p(x, t) ∈ R dened for position x ∈ Rn, F (x, t) is the externally applied force,

ν ∈ R+ the constant of viscosity. The equation (21) is the simplest partial dierential equation (PDE) combining both nonlinear and diusive eects, while it assumes a given pressure eld. It is the Newton's law, F = m · a, for a uid element subject to the external force F (x, t) and forces arising from pressure and friction. The equation (22) says that the uid is incompressible.

In 1939 the Dutch scientist J.M. Burgers simplied the Navier−Stokes equation (21) by dropping the pressure term and assuming that the external force F (x, t) is zero. The result is the Burgers equation having the following form

∂ ∂ ∂2 u(x, t) + u(x, t) u(x, t) = ν u(x, t), (23) ∂t ∂x ∂x2 which can be investigated in one spatial dimension.

The equation (23) is called the viscid Burgers equation against the inviscid form which can be seen as the limit as ν → 0 of the (23), hence the equation assumes the following form

∂ ∂ u(x, t) + u(x, t) u(x, t) = 0. (24) ∂t ∂x

2.1.1 Viscid Burgers equation

The initial value problem for the viscid Burgers equation is of the type

  u = uu + νu x ∈ R, t ≥ 0, ν > 0 t x xx (25)  u(x, 0) = f(x) x ∈ R, f ∈ C∞ with periodic boundary conditions f(x) = f(x + 1). Assuming that all functions are real−valued, the equation (23) is given by the sum of a quadratic rst order term and a diusion term. 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 35

A classical solution of the problem (25) is a function u(x, t) ∈ C2(x) ∩ C1(t) which satises the equation (23) pointwise. The uniqueness of this solution is given by the following Lemma:

Lemma 2.1. The 1−periodic Cauchy problem (25) has at most one classical solution.

Proof. Let suppose that u(x, t) and v(x, t) are both solutions of the same problem (25), then w(x, t) := u(x, t) − v(x, t) satises the problem

 1  wt = 2 (αw)x + νwxx  w(x, 0) = 0 with α = u + v and initial condition w(x, 0) = f(x) − f(x) = 0. From

(w, (αw)x) = (w, αxw + αwx) = (w, αxw) − ((αw)x, w), (26) where the last equality comes out from integration by part, it follows that

1 (w, (αw) ) = (w, α w), (27) x 2 x hence

1 d 1 (w, w) = (w, w ) = (w, (αw) ) − ν(w , w ) 2 dt t 2 x x x 1 = (w, α w) − ν(w , w ) (28) 4 x x x 1 ≤ |α | (w, w). 4 x ∞

The initial condition w(x, 0) = 0 implies w ≡ 0.

The existence of the solution u(x, t) of the (25) can be proved in dierent ways, local existence via linear iteration and global existence or using the Cole−Hopf transforma- tion. 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 36

Local existence via iteration

The global existence of the solution of Burgers equation is shown to be an extension of the local solution obtained via iteration.

Given the following problem

  un+1 = unun+1 + νun+1 t x xx (29)  un+1(x, 0) = f(x) n = 0, 1, 2, ...

0 n where u (x, t) = f(x), the sequence (u )n ∈ N will be shown to converge and its limit will solve the (25). Remembering that Hk(R) is the Sobolev space W k,2 which admits an inner product dened as Pk i i , where i is the weak hu, viHk = i=0 hD u, D viL2 D derivative, then the following Theorem proves the local existence. Theorem 2.1. (Local existence) Let s.t. T1 = T1(kfkH2 ) > 0 n ku (·, t)kH2 ≤ 2 kfkH2 in 0 ≤ t ≤ T1.

∞ For any ν ≥ 0, Burgers equation has a C solution u(x, t) dened for 0 ≤ t ≤ T1.

Proof.

Consider the sequence un dened by the iteration (29) and abbreviate

v = un+1 − un, w = un − un−1. Then  n n  vt = u vx + uxw + νvxx  v(x, 0) = 0 implies that

1 d kvk2 ≤ (v, unv ) + (v, unw) 2 dt x x 1 = − (v, unv) + (v, unw) 2 x x 2 2 ≤ const kvk + kwk , 0 ≤ t ≤ T1 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 37

Therefore by Gronwall's Lemma

Z t n+1 n 2 n n−1 2 u (·, t) − u (·, t) ≤ K u (·, τ) − u (·, τ) dτ, 0 where K is a constant independent of n.

n The convergence of the sequence u (·, t) to a function u(·, t) ∈ L2 is given by the following Lemma

Lemma 2.2. Let ηk(t), k = 0, 1, ... be a sequence of non-negative continuous functions which satisfy the inequalities

Z t ηk+1(t) ≤ a + b ηk(τ)dτ, 0 ≤ t ≤ T 0 with constant a, b ≥ 0, then

k−1 X bt bktk ηk(t) ≤ a + max η0(τ) ! k! 0≤τ≤t =0 for 0 ≤ t ≤ T and k = 0, 1, .... In particular, the sequence ηk(t), 0 ≤ t ≤ T is uniformly bounded. If a = 0, then the sequence converges uniformly to zero.

We know from the theory on the PDE that

 p+q  δ h max u (·, t) : 0 ≤ t ≤ T ≤ c(p, q, T ) δpxδqt with constant independent of h.

Therefore it follows that for u ∈ C∞, the convergence un −→ u holds pointwise and also holds for all derivatives. Then the equation (29) implies that u(x, t) solvers the

Burgers equation in the [0,T1] interval.

Global existence

Let us assume ν > 0 arbitrary but xed, then a proof of the existence of a global solution u(x, t) ∈ C∞ dened for 0 ≤ t ≤ ∞ is given by the following Theorem.

Theorem 2.2. Let f ∈ C∞ and ν > 0. The 1-periodic Cauchy problem (25) has a unique solution u ∈ C∞ dened for 0 ≤ t < ∞. 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 38

Proof. The proof of this Theorem is based on the following result:

Theorem 2.3. Let f = f(x) denote 1-periodic C∞ initial data, and let u ∈ C∞ denote a solution of the Burgers equation dened for 0 ≤ t ≤ T . There is a constant K, depending on and , but independent from , with kfkH2  T

(30) ku(·, t)kH2 ≤ K for 0 ≤ t ≤ T.

Assuming this result is proven, we can show all-time existence for the problem (25) as follows: According to the Local Existence Theorem 2.1, there is a time T1 > 0 with a ∞ C -solution u dened for 0 ≤ t ≤ T1. By (30) we have

ku(·, t)kH2 ≤ K.

The function x 7→ u(x, T1) can be chosen as the new initial data and the Local Existence Theorem 2.1 can be applied again.

The solution starting with initial data u(·,T1) exists in a time interval 0 ≤ t ≤ T2,T2 depending only on K and . Clearly, putting the two solutions together, we have a ∞ C -solution u of (25) dened for 0 ≤ t ≤ T1 + T2. The important point is that the prior estimate (30) implies that

ku(·,T1 + T2)kH2 ≤ K with the same constant K as before. Thus, using the Local Existence Theorem, we can again extend the solution for a time interval of length T2, etc.

For more details see [31].

The result can be extended to a 1-periodic Cauchy problem with f ∈ L∞.

An alternative way to prove the existence of the Burgers equation with initial condition u(x, 0) = u0(x), u ∈ C∞ is via the Cole-Hopf transformation.

Cole−Hopf transformation

The Cole−Hopf transformation was developed in [32] for the Burgers equation and then applied at dierent partial dierential equations as Seventh-Order KdV Equation 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 39 in [33]. This method maps the solution of the viscid Burgers equation (23) to the heat equation

∞ ϕt = νϕxx for ϕ ∈ C .

The Cole−Hopf transformation is dened by

ϕ u(x, t) = −2ν x , (31) ϕ where partial derivatives are:

2ν(ϕ ϕ − ϕϕ ) 4ν2ϕ (ϕϕ − ϕ2) u = t x xt , uu = x xx x t ϕ2 x ϕ3 and

2ν2(2ϕ3 − 3ϕϕ ϕ + ϕ2ϕ ) u = − x xx x xxx . xx ϕ3

Substituting this expression into (23)

2ν(−ϕϕ + ϕ (ϕ − νϕ ) + νϕϕ ) xt x t xx xxx = 0 ⇐⇒ −ϕϕ + ϕ (ϕ − νϕ ) + νϕϕ = 0 ϕ2 xt x t xx xxx

ϕx(ϕt − νϕxx) = ϕ(ϕxt − νϕxxx) = ϕ(ϕt − νϕxx)x.

Therefore, if ϕ is a solution of the heat equation ϕt − νϕxx = 0, x ∈ R, then u(x, t) given by the transformation (31) solves the viscid Burgers equation (23).

Writing the (31) as

u = −2ν(logϕ)x then

− R x u(y,t) dy ϕ(x, t) = e 0 2ν . (32) 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 40

Thus the initial condition must be transformed by (34) into

− R x f(y) dy ϕ(x, 0) = e 0 2ν .

Hence the problem (25) has been transformed into

  ϕ − νϕ = 0 x ∈ R, t ≥ 0, ν > 0 t xx (33) − R x f(y) dy  ϕ(x, 0) = ϕ0(x) = e 0 2ν x ∈ R. in which the function ϕ(x, t), satisfying the heat equation, is dened as

Z 2 C − (x−s) ϕ(x, t) = √ f(x)e 4νt ds. (34) s πνt R

Then the solution u(x, t) can be determined from (31).

2.1.2 Inviscid Burgers equation

The inviscid Burgers equation

(35) ut + uux = 0 can be treated as a limit of (23) as ν −→ 0 which has a unique solution, u ∈ C∞, existing for all time t ≥ 0. However, the smoothness of the solution u breaks down in general, at a certain time

Tb, at which one or several shocks form. This can be proved by the method of charac- teristics.

Solution of characteristic

Lemma 2.3. Suppose u(x, t) to be a smooth solution of 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 41

  u + uu = 0 t x (36)  u(x, 0) = f(x)

Then u(x0 + tf(x0), t) = f(x0), x0 ∈ R in any t-interval 0 ≤ t ≤ T.

Proof. Let (x(t), t), for 0 ≤ t ≤ T , dened as a characteristic line of the equation (35) for the specic solution u, if

dx (37) dt (t) = u(x(t), t)

1 for 0 ≤ t ≤ T and x(0) = x0. When x(t) and u(x, t) ∈ C are solutions of (37) and (35) respectively, then

d dx [u(x(t), t)] = u (x(t), t) + (t)u (x(t), t) dt t dt x

= ut(x(t), t) + u(x(t), t)ux(x(t), t)

= 0 i.e. u(x(t), t) is constant along the characteristic curve x(t). Therefore

u(x(t), t) = u(x(0), 0) = f(x0) which from the system (37), leads us to conclude that the characteristic curves are straight lines determined by initial data

(38) x(t) = x0 + tf(x0), t > 0

which implies u(x0, tf(x0), t) = f(x0).

Let assume that there are 2 characteristics that arise from initial conditions x1 and x2 = x1 + ∆x with ∆x = x2 − x1. According to (38), these characteristics will cross when

x1 + tf(x1) = x2 + tf(x2). 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 42

Solving for t leads to

x1 − x2 1 t = − = − 0 for some ξ. f(x1) − f(x2) f (ξ)

Thus, Tb the breaking time, the time at which the smoothness of the solution u breaks down, is dened as follow

  ∞ if f 0(ξ) ≥ 0, for some ξ (39) 1  − inf(f 0(ξ)) otherwise.

0 If f (ξ) ≥ 0 ∀ξ, then x1 < x2 implies f(x1) < f(x2); hence

(40) (x1 + tf(x1), t), (x2 + tf(x2), t), t ≥ 0

never cross, therefore Tb = ∞ and a smooth solution exists ∀t ≥ 0. On the other hand 0 in f (ξ) < 0 for some ξ then there are values x1 < x2 with f(x1) > f(x2) and the characteristics (40) cross.

The solution steepens up with time. The time Tb is nite. We cannot extend the solution u beyond Tb as a smooth solution.

∞ Lemma 2.4. The C function u = u(x, t) dened by u(x, t) = f(x0(x, t)), x ∈ R,

0 ≤ t ≤ Tb is the unique classical solution of

  u + uu = 0 t x (41)  u(x, 0) = f(x).

Proof. x0(x, 0) = x and thus u(x, 0) = f(x). To show that ut +uux = 0, we dierentiate

x0 + f(x0) = x w.r.t. x and t, and nd that

x0x + t(f(x0))x = 1 ∧ x0t + f(x0) + t(f(x0))t = 0 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 43

Hence 0 0 x0x (1 + tf (x0)) = 1 ∧ x0t (1 + tf (x0)) = −f(x0).

Therefore

0 x0t + f(x0)x0x = 0 with 1 + tf (x0) 6= 0.

Thus the denition u(x, t) = f(x0(x, t)) gives us

0 0 ut + uux = f x0t + ff x0x

0 = f (x0t + fx0x )

= 0

The only way to establish a solution after the breaking time is to allow discontinuities of u. Such discontinuity is called a shock. This requires some mathematical extension of what we mean by a solution of the inviscid problem, since strictly speaking the derivatives of u will not exist at a discontinuity. It can be done through the concept of a weak solution, but expanding the class of solutions to include the discontinuous solutions, the uniqueness cannot any longer be guaranteed.

Denition 2.1. A bounded measurable function u(x, t) dened for x ∈ R t ≥ 0, is called a weak solution of

  u + uu = 0 t x (42) ∞ 0  u(x, 0) = f(x) f ∈ C , kfk∞ < ∞, kf k∞ < ∞ if the equation

R ∞ R ∞ 1 2 R ∞ (43) 0 −∞(uφt + 2 u φx)dxdt + −∞ f(x)φ(x, 0)dx = 0 holds for all ∞ φ ∈ C0 . 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 44

In particular, for ν −→ 0 the solution u of the equation

ut + (f(u))x = νuxx converges to the unique weak solution of

ut + (f(u))x = 0 which satises the entropy condition

df (44) a(ul(x, t)) > a(ur(x, t)), a(u) = du (u).

2.2 Stochastic dynamics: Derivation of a generalized Burgers equation

Let F P be a probability space with natural ltration F , and the col- (Ω, , ) { t}t∈[0,∞) A lection of all B(R × [0, ∞), R)- measurable functions a : R × [0, ∞) −→ R. Let (45) be the stochastic dierential equation of the Markovian type, for a continuous stochastic process X = (Xt)t∈[0,∞)

(45) dXt = a(Xt, t)dt + b(Xt, t)dWt t ≥ 0.

with a, b ∈ A and Wt is the Wiener process, satisfying the hypothesis of existence and uniqueness of the solution in Theorem A.6, with given initial data X0.

Mainly basing on the theory developed in [34], we show how from the equation (45) it is possible to derive one generalization of the viscid Burgers equation.

Let γ ∈ A satisfy the Novikov condition:

h  i 1 R t 2 (46) E exp 2 0 |γ(Xs, s)| ds < ∞, ∀t > 0 then, by 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 45

Z t Z t  1 2 exp γ(Xs, s)dWs − |γ(Xs, s)| ds , t ∈ [0, ∞) 0 2 0 is an {Ft} − martingale, and denes a change of measure, which is characterized by

Z t Z t  1 2 Qt := exp γ(Xs, s)dWs − |γ(Xs, s)| ds · P 0 2 0 or equivalently in terms of the Radon-Nikodym derivative

Z t Z t  dQt 1 2 = exp γ(Xs, s)dWs − |γ(Xs, s)| ds . dP 0 2 0

The dened probability measure Qt is absolutely continuous with respect to the original probability measure P. Under the assumption that the diusion coecient b satises b(x, t) 6= 0 for any (x, t) ∈ R × [0, ∞) we can dene the function γ as:

a(x, t) γ(x, t) := − b(x, t) and the coecients a and b satisfy

" Z t 2 !# 1 a(Xs, s) E exp ds < ∞, ∀t > 0, 2 0 b(Xs, s) then the associated probability measure Qt is determined by

 2  dQt R t a(Xs,s) 1 R t a(Xs,s) = exp − dWs − ds . (47) dP 0 b(Xs,s) 2 0 b(Xs,s)

From (45) it follows that

1 a(Xt, t) dWt = dXt − dt, b(Xt, t) b(Xt, t) thus

 Z t 2 Z t  dQt 1 a (Xs, s) a(Xs, s) = exp − 2 ds − 2 dXs , t ≥ 0. dP 2 0 b (Xs, s) 0 b (Xs, s)

Generally the Radon-Nikodym derivative dQt depends on time , i.e., on the history of dP t the path, but in nancial markets it is necessary to require that dQt is dened up only dP to the current step Xt, so one requires that 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 46

dQt (48) dP = exp (Z(Xt, t)) , t ∈ [0, ∞) for a function Z : R × [0, ∞) −→ R. The equation (48) is said to be the path- independence property, which implies that

2 1 R t a (Xs,s) R t a(Xs,s) (49) Z(X , t) = − 2 ds − 2 dX . t 2 0 b (Xs,s) 0 b (Xs,s) s The stochastic dierential equation of (49) is

2 1 a (Xs,s) a(Xs,s) (50) dZ(Xt, t) = − 2 dt − 2 dXt. 2 b (Xs,s) b (Xs,s) Comparing (50) with the expression obtained applying Ito's Lemma to (49),

∂ ∂ 1 ∂2 dZ(X , t) = Z(X , t)dt + Z(X , t)dX + Z(X , t)b2(X , t)dt t ∂t t ∂x t t 2 ∂2x2 t t we can obtain

∂ a(Xt,t) (51) Z(X , t) = − 2 ∂x t b (Xt,t) and

2 2 ∂ b (Xt,t) ∂2 1 a (Xt,t) (52) Z(X , t) + 2 Z(X , t) = 2 . ∂t t 2 ∂x t 2 b (Xt,t)

Dening a(Xt, t) u(Xt, t) := 2 , b (Xt, t) (51) and (52) become respectively

∂ Z(X , t) = −u(X , t) ∂x t t and 2 ∂ 1 a(Xt, t) ∂ 1 Z(Xt, t) + 2 Z(Xt, t) = a(Xt, t)u(Xt, t). ∂t 2 u(Xt, t) ∂x 2 Since the SDE (45) is non-degenerate ( as the diusion coecient b 6= 0 ), the support of Xt, t ∈ [0, ∞), is the whole space R. Hence the two equalities 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 47

∂ (53) ∂x Z(x, t) = −u(x, t) and

∂ 1 a(x,t) ∂2 1 (54) ∂t Z(x, t) + 2 u(x,t) ∂x2 Z(x, t) = 2 a(x, t)u(x, t) hold on R × [0, ∞). By dierentiating (53) with respect to the variable x, we get

∂2 ∂ (55) ∂x2 Z(x, t) = − ∂x u(x, t) then substituting it into (54) with respect to the x variable, we get

∂ 1 a(x,t) ∂ 1 (56) ∂t Z(x, t) = 2 u(x,t) ∂x u(x, t) + 2 a(x, t)u(x, t). To eliminate Z(x, t), we can dierentiate (56) with respect to x and the (53) with respect to t, respectively

∂2 ∂ (57) ∂x∂t Z(x, t) = − ∂t u(x, t).

∂2 1 a(x,t) ∂2 1 ∂ 1 ∂ ∂x∂t Z(x, t) = 2 u(x,t) ∂x2 u(x, t) + 2 ∂x u(x, t) u(x,t) ∂x a(x, t)

1 ∂ a(x,t) ∂ (58) − 2 ∂x u(x, t) u2(x,t) ∂x u(x, t)

1 ∂ 1 ∂ + 2 a(x, t) ∂x u(x, t) + 2 ∂x a(x, t)u(x, t). Equating (57) and (58), we get

∂ 1 a(x,t) ∂2 1 a(x,t) ∂ 2 ∂t u(x, t) = − 2 u(x,t) ∂x2 u(x, t) + 2 u2(x,t) ∂x u(x, t)

  1 1 ∂ ∂ (59) − 2 u(x,t) ∂x a(x, t) + a(x, t) ∂x u(x, t)

1 ∂ − 2 ∂x a(x, t)u(x, t). 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 48

Furthermore, assuming that there exists a C1-function Φ: R −→ R such that a(x, t) = Φ(u(x, t)) holds for x ∈ R and t ≥ 0, the above equality (59) can be reduced to

∂ 1 Φ(u(x,t)) ∂2 ∂t u(x, t) = − 2 u(x,t) ∂x2 u(x, t)

h 0 i 1 Φ (u(x,t)) Φ(u(x,t)) ∂ 2 (60) − 2 u(x,t) − u2(x,t) ∂x u(x, t)

1 0 ∂ − 2 [Φ(u(x, t)) + u(x, t)Φ (u(x, t))] ∂x u(x, t).

Next, dening Z Φ(r) Ψ (r) := dr, r ∈ R, 1 r a primitive of the function Φ(r) and r ,

Ψ2(r) := rΦ(r), r ∈ R. one can easily derive

∂2 Φ(u(x,t)) ∂2 ∂x2 Ψ1(u(x, t)) = u(x,t) ∂x2 u(x, t) h Φ0(u(x,t)) Φ(u(x,t)) i ∂ 2 + u(x,t) − u2(x,t) ∂x u(x, t) and

∂ 0 ∂ ∂x Ψ2(u(x, t)) = [Φ(u(x, t)) + u(x, t)Φ (u(x, t))] ∂x u(x, t). Finally, a generalized Burgers equation

∂ 1 ∂2 1 ∂ ∂t u(x, t) = − 2 ∂x2 Ψ1(u(x, t)) − 2 ∂x Ψ2(u(x, t)). is obtained.

A complete characterization for the path independence property for the associated density process dened by the Radon Nikodym derivative dQt is given in − dt , [35], in which the result shown above has been extended to the Rd case via Girsanov Theorem. 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 49

In [36] it is also shown that a necessary condition for economic equilibrium which supports the Black-Scholes option valuation formula (in its usual log-normal form) is that the risk premium, which is the return in excess of the risk-free rate of return, must follows a nonlinear partial dierential equation known as Burgers equation.

2.3 A Stochastic interacting particle system(SIPS)

Our attention is on the analysis of stochastic particle methods for one-dimensional non-linear PDE. In particular we study the convergence rate of a stochastic particle method for the numerical solution of the non-linear McKean-Vlasov equation

∂ hµ , fi = µ ,L f , µ = µ ∂t t t (µt) t=0 0 ∞ where µt is a probability measure, f ∈ C (R) with a compact support and the operator

L(µ) is dened as Z 2 Z  1 00 0 L(µ) = s(x, y)dµ(y) f (x) + b(x, y)dµ(y) f (x). 2 R R This method is widely studied by Bossy and Talay in their papers [37], [38] and [39].

Let i,N be a stochastic process describing the state of particles, dened on (Xt )t∈R+ N a suitable probability space (Ω, F, P) and b(·, ·) the kernel interaction function, the dynamic of the N particles is given by a system of N stochastic dierential equations of the following type

 i,N i R i,N N   dX = σdw + b(X , y)µ (dy) dt t ∈ [0,T ] t t R t t (61) i,N i  X0 = X0, where i , are independent one dimensional Wiener processes, and N is (wt) i = 1, ..., N µt the empirical measure

N N 1 X µt = δ i,N N Xt i=1

with δ i,N the Dirac δ-function. Xt 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 50

Suppose that the Kernel interaction function b(·, ·) is equal to the Heaviside function b(·, ·) = H(x−y), and s(·, ·) is a constant function σ, the nonlinear stochastic dierential equation (61) assumes the following form:   dX = σdW + R H(X − y)U (dy)dt, t t R t t (62)  Xt=0 = X0 where Ut(dy) is the probability law of Xt and U0 the law of X0.

The nonlinear part is given by the discontinuity of the Heaviside function H(x − y), which if dened as follows

  0 ifz < 0, H(z) =  1 ifz ≥ 0.

We study a stochastic particle system for the Burgers equation

 2  ∂V = 1 σ2 ∂ V − V ∂V , (t, x) ∈ [0,T ] × R ∂t 2 ∂x2 ∂x (63)  V (0, x) = V0(x),

where the initial condition V0 is dened as the distribution function of a probability measure U0 on R Z x V0 = U0(dy). −∞

Under this initial condition, the solution of the Burgers equation is interpreted as the distribution function of the probability measure Ut, which is a solution to the McKean- Vlasov PDE of the following type

 2  ∂U = 1 σ2 ∂ U − ∂ R H(x − y)U (dy) U  ∂t 2 ∂x2 ∂x R t t (64)  Ut=0 = U0 with U a smooth function with compact support in ] 0,T [ × R. 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 51

Proposition 2.1. If (62) has a weak solution which is unique in the sense of probability law, the law Ut of Xt is a weak solution of the McKean-Vlasov equation in [0,T ] × R and the distribution function V (t, x) of Ut is a weak solution to the Burgers equation (63).

Proof. Suppose that the existence in law of a solution to (62) holds, applying Itoˆ's formula to any function f ∈ C∞([0,T ] × R) with a compact support in ] 0,T [ × R, one gets:

0 = f(T,XT ) − f(0,X0) Z T ∂f ∂f Z  = (s, Xs) + (s, Xs) × H(Xs − y)Us(dy) 0 ∂s ∂x R 2  Z T 1 2 ∂ f ∂f + σ 2 (s, Xs) ds + (s, Xs)dWs. 2 ∂x 0 ∂x Computing the expected value, it follows that

Z T Z ∂f 0 = (s, x)Us(dx) 0 R ∂ Z ∂f Z  1 Z ∂2f  + (s, x) H(x − y)Us(dy) Us(dx) + 2 (s, x)Us(dx) . R ∂x R 2 R ∂x

Hence Ut is a weak solution of (64) on ] 0,T [ × R.

It remains to prove that V (t, x), dened as

Z x V (t, x) = Ut(dy), ∀(t, x) ∈ [0,T ] × R, −∞ is a weak solution of Burgers equation (63). When ∂V in the distribution sense, then by (64) and since that ∂V and 1 2 ∂2V ∂x = U ∂t 2 σ ∂x2 − ∂V have the same spatial derivatives, it follows that, for any test function and V ∂x f(t, x) for any z ∈ R, 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 52

D ∂V 1 2 ∂2V ∂V E − ∂t + 2 σ ∂x2 − V ∂x , f ! R ∂f 1 2 ∂2f = ]0,T [ ×R V (t, x) ∂t (t, x + z) + 2 σ ∂x2 (t, x + z) dtdx

R 1 2 ∂f + ]0,T [ ×R 2 V (t, x) ∂x (t, x + z)dtdz ! R ∂f 1 2 ∂2f 1 2 ∂f = V (t, x − z) ∂x (t, x) + 2 σ ∂x2 (t, x) dtdz + 2 V (t, x − z) ∂x (t, x)dtdx, for any t ∈ [0,T ], V (t, x) is bounded and tends to 0 for x → −∞,

lim V (t, x) = 0. x−→−∞ therefore the right part tends to 0 as z → ∞ by the bounded convergence theorem.

Hence Ut is a weak solution of (64) on ] 0,T [ × R, and V (t, x) solves the Burgers equation in the distribution sense.

Proposition 2.2. Suppose that:

(H0) The initial law U0 veries one of the following conditions

1. U0 is a probability measure with a compact support,

2. U0 has a continuous and strictly positive density u0, and there exist strictly posi- tive constants M, η and α such that

2 −α x ∀|x| > M, u0(x) ≤ ηe 2 .

Under (H0), the distribution function V (t, x) of the law Ut of Xt is the classical solution of the Burgers equation obtained by Cole-Hopf transformation.

Proof. We will start the demonstration of this Proposition by stating the following Lemma.

Lemma 2.5. Under (H0), the function V (t, x) ≤ EH(x − Xt) is integrable in −∞; i.e., there exist strictly positive constants C, γ, δ such that, for all t ∈ [0,T ],

 (x − δ)2  ∀x < −M,V (t, x) ≤ C exp − . γ 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 53

Now we are ready to prove the Proposition. For (t, x) ∈ [0,T ], set Z x F (t, x) = V (t, y)dy −∞ and

 1 Z x  W (t, x) = exp − 2 V (t, y)dy . σ −∞

As V is a weak solution of the Burgers equation in ] 0,T [ ×R,F satises the following equality in the distribution sense:

∂ ∂F 1 ∂2F 1 ∂ (− + σ2 ) = (V 2) in ] 0,T [ × R. ∂x ∂t 2 ∂x2 2 ∂x

The distributions ∂F 1 2 ∂2F and 1 2 have the same spatial derivatives, therefore (− ∂t + 2 σ ∂x2 ) 2 V their dierence is a distribution invariant by translation along the x − axis. Then, for any test function Φ and any z ∈ R, one has

D ∂F 1 2 ∂2F 1 2 E − ∂t + 2 σ ∂x2 − 2 V , Φ R  ∂Φ 1 2 ∂2Φ  R 1 2 = F (t, x) ∂t (t, x + z) + 2 σ ∂x2 (t, x + z) dtdx − 2 V (t, x)Φ(t, x + z)dtdx R  ∂Φ 1 2 ∂2Φ  R 1 2 = F (t, x − z) ∂t (t, x) + 2 σ ∂x2 (t, x) dtdx − 2 V (t, x − z)Φ(t, x)dtdx.

From the proceeding Lemma, the bounded convergence Theorem, and since V (t, ·) is a distribution function, it follows that the right side goes to 0 as z → ∞.

2 ¯ ¯ 2 Denote by (Φk) a sequence of smoothing functions in R , dene F and V in R by   F (t, x), if (t, x) ∈ (0,T ] × R F¯(t, x) =  0, if (t, x) ∈ R2\ (0,T ] × R, and   V (t, x), if (t, x) ∈ (0,T ] × R V¯ (t, x) =  0, if (t, x) ∈ R2\ (0,T ] × R. 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 54

Dene the functions Fk,Vk and Wk on (0,T ] × R by

¯ Fk(t, x) : = (Φk ∗ F )(t, x) ¯ Vk(t, x) : = (Φk ∗ V )(t, x) 1 W (t, x) : = exp − F (t, x). k σ2 k

It is notable that (Wk) converges to W in the distribution sense: let φ be a test function and let K be such that Supp(φ) ⊂ ] 0,T [ × ]−K,K [; for any k such that Supp(Φk) ⊂ ] − K,K [ 2, one has

2 R σ (0,T ]×R |Wk(t, x) − W (t, x)| · |φ(t, x)|dtdx

R ≤ (0,T ]×R |Fk(t, x) − F (t, x)||φ(t, x)|dtdx

R ≤ Suppφ |F (t, x) − 1 ]−2K,2K[ (x)F (t, x)||φ(t, x)|dtdx

R + Suppφ |1 ]−2K,2K[ (x)F (t, x) − (1 ]−2K,2K[ F )k(t, x)||φ(t, x)|dtdx

R ¯ ¯ + Suppφ Φk ∗ (F − 1 ]−2K,2K[ F )(t, x)||φ(t, x)|dtdx

R = Suppφ |1 ]−2K,2K[ (x)F (t, x) − (1 ]−2K,2K[ F )k(t, x)||φ(t, x)|dtdx

1 the Lemma 2.5 shows that the function 1 ]−2K,2K[ F belongs to L ((0,T ) × R), which 1 implies that the sequence (1 ]−2K,2K[ F )k converges to 1 ]−2K,2K[ F in L ((0,T ) × R).

2 2 Denoting, (V )k := Φk ∗ V , one can check that

∂W 1 ∂2W  ∂F  1 k − σ2 k = (V 2) − ( k )2 W = [(V 2) − V 2]W . ∂t 2 ∂x2 k ∂x k 2σ2 k k k

Then when k −→ ∞, it is possible to prove that W satises the heat equation, so that, for 0 < s < t ≤ T, 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 55

1 Z  (x − y)2  W (t, x) = W (s, y) exp − dy p 2 2 2πσ (t − s) R 2σ (t − s) 1 Z √ z2 = √ W (s, σ t − sz + x) exp − dz. 2π R 2

Letting now s −→ 0; the Lemma 2.5 and the bounded convergence Theorem imply that F (s, x) converges to F (0, x) when s −→ 0; so we get that

1 Z  1 (x − y)2 Z y  W (t, x) = √ exp − + V0(z)dz dy 2 2 2πσ t R σ 2t −∞ which has been shown to be s.t. V is the Burgers equation.

Suppose V (t, x) ∈ C1,2((0,T ] × R) a weak solution of (63), and dened by

1 Z x Φ(t, x) := exp(− 2 V (t, y)dy) σ −∞ for all t ∈ [0,T ], a function satisfying the heat equation

 ∂Φ 1 2 ∂2Φ  ∂t (t, x) = 2 σ ∂x2 (x, t), (t, x) ∈ ] 0,T [ × R

 Φ(0, x) = Φ0(x), by the Cole-Hopf transformation follows that V (t, x) can be written as

  2  R x−y 1 (x−y) R y R t exp − 2 2t + −∞ V0(z)dz dy V (t, x) = σ . R  1 h (x−y)2 R y i exp − + V0(z)dz dy R σ2 2t −∞

From this explicit representation of V (t, x), an estimate for the rst spatial derivative of V is obtained.

Lemma 2.6. If U0 satises (H0 − 2), then

∂V (t, x) ≤ L0, ∂x L∞([0,T ]×R) 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 56

where L0 depends on σ, u0, and T.

If U0 is the Dirac-measure in zero, then for any t ∈ (0,T ] one has

∂V L0 (t, ·) ≤ √ , ∂x L∞(R) t where L0 depends on σ and T .

2.3.1 Solution of the SIPS and nonlinear Martingale problem

Before going to analyse in depth the relationship of the solution of (62) with a nonlinear martingale problem, the characterizations of the law Ut of Xt are given.

One way to characterize the law Ut of Xt is through the following Lemma:

Lemma 2.7. On a ltered probability space (Ω, F, (Ft),P ), consider the real process dened by Z t Yt = Y0 + σwt + Csds, 0 ≤ t ≤ T, 0 where Y0 is a random variable independent of Brownian motion (Wt) and (Ct) is a process (Ft)−adapted and bounded. Then, for all t in ] 0, ] , the law of Yt has a density 2 ut which belongs to L (R) and it holds that

C (65) k ut k2≤ 1 . t 4

Let (Ω, F, (Ft), (wt),P, (Xt)) be a weak solution of (62), Ut the law of Xt and (Ct) Z Ct = H(Xt − y)Ut(dy) R

a bounded process, then from the Lemma 2.7 it follows that Ut has a density ut in L2(R).

On the other hand denoting by gt the density of the law of σWt for any t > 0 and by

St the heat semigroup StU = gt ∗ U, a characterization of the density of the law of Xt is given by the following lemma

Lemma 2.8. 1. For any weak solution Xt of (62), the density of Xt is a weak solution of  ! R t ∂ R (66) pt = StU0 − 0 St−s ∂x ps · R H(x − y)ps(y)dy ds, ∀t ∈ ] o, T [ 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 57

1 2. For any t ∈ ] 0,T ], there exists at most one function pt in L (R) weak solution to (66) and such that

∃C > 0, sup kptkL1(R) ≤ C. t∈ ]0,T ]

Proof. We rst prove the condition (i). Fix t ∈ ] 0,T ] and f ∈ C∞(R) with a compact support; set

G(s, x) = St−sf(x), 0 ≤ s < t.

G(s, x) is a time backward solution of the heat equation

 ∂G 1 2 ∂2G  ∂s + 2 σ ∂x2 = 0, 0 ≤ s < t,  G(t, x) = f(x).

The Ito formula implies that

Z t ∂G Z t ∂G Z G(t, Xt) = G(0,X0) + (s, Xs)dws + (s, Xs)( H(Xs − y)us(y)dy)ds, 0 ∂x 0 ∂x R from which it is possible to deduce that

R R f(x)ut(x)dx

R R t R ∂ R = R G(0, x)U0(dx) + 0 R ∂x G(s, x)( R H(x − y)us(y)dy)us(x)dxds

R R t R ∂ R = R(StU0)(x)f(x)dx + 0 R ∂x St−sf(x)( R H(x − y)us(y)dy)us(x)dxds.

And integrating by parts one can obtain that

R ∂ R R ( g (x − z)f(z)dz)( y H(x − y)u (y)dy)u (x)dx Rx ∂x Rx t−s R s s

h  i = − R R g (x − z)f(z) ∂ u (x) R H(x − y)u (y)dy dxdz Rx Rx t−s ∂x s Ry s  h  i = − R f(z)S ∂ u (x) R H(x − y)u (y)dy (z)dz, Rx t−s ∂x s Ry s

and thus conclude that ut solves (66) in a weak sense. 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 58

Let us now show the point 2. Let ut and vt be two weak solutions to (66) belonging to L1(R) and verifying

∃C > 0, sup (kutkL1(R) + kvtkL1(R)) ≤ C. t∈ ]0,T ]

Then, for any t ∈ ] 0,T ], it holds that

Z t  Z Z  ∂ kut − vtk1 = St−s us(x) H(x − y)us(y)dy − vs(x) H(x − y)vs(y)dy ds 0 ∂x R R L1(R) Z t  Z x Z x  ∂ ≤ gt−s ∗ us(x) us(y)dy − vs(x) vs(y)dy ds 0 ∂x −∞ −∞ L1(R) Z t Z x Z x ∂ ≤ gt−s · us(x) us(y)dy − vs(x) vs(y)dy ds 0 ∂x 1 −∞ −∞ L1(R)

Z t 2 Z x Z x ≤ us(x) us(y)dy − vs(x) vs(y)dy ds. p 2 0 2π(t − s)σ −∞ − R 1

On the other hand, one has also that

R x R x us(x) −∞ us(y)dy − vs(x) −∞ vs(y)dy

R x R x = us(x) −∞(us(y) − vs(y))dy − (vs(x) − us(x)) −∞ vs(y)dy

≤ |us(x)| kus − vsk1 + C|vs(x) − us(x)|, where C is constant, uniform with respect to t; thus,

Z t 4C kut − vtk 1 ≤ kus − vsk 1 ds. L (R) p 2 L (R) 0 2π(t − s)σ

√ When s −→ 1/ t − s it is integrable on [0, t], and an application of Gronwall's Lemma ends the proof.

Assuming that there exists a density pt such that equation (66) holds; from a formal dierentiation of (66) it follows that ∂pt satises ∂t 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 59

2  Z ! ∂pt 1 2 ∂ ∂ = σ 2 (StU0) − S0 pt H(x − y)pt(y)dy ∂t 2 ∂x ∂x R !! Z 0 σ2 ∂2 ∂  Z  − 2 St−s pt H(x − y)pt(y)dy ds t 2 ∂x ∂x R 2 " Z t  Z ! # 1 2 ∂ ∂ = σ 2 StU0 − St−s pt H(x − y)pt(y)dy ds 2 ∂x 0 ∂x R ∂  Z  − pt H(x − y)pt(y)dy . ∂x R

Therefore pt is a weak solution of (64)

2  Z  ∂pt 1 2 ∂ ∂ = σ 2 − pt H(x − y)pt(y)dy . ∂t 2 ∂x ∂x R

Given the following nonlinear PDE of the McKean-Vlasov type

d hµ , fi = hµ , L(µ )fi , dt t t t where is a probability measure in , ∞ with a compact support , µt M(R) f ∈ CK (R) K and the dierential operator Lµ is dened as

2 Z ! 1 2 ∂ ∂ L(µ)f(x) = σ 2 f(x) + H(x − y)µ(dy) f(x), 2 ∂x R ∂x then the existence in law of a diusion process solution of the SDE of the type (62), can be formulated in terms of a martingale problem.

Denition 2.2. Let be a canonical process on d The probability (Xt)t[0,T ] C([0,T ]; R ). measure Q ∈ M(C([0,T ]; Rd)) is a solution of the martingale problem (67) issued from a given U0 ∈ M(R) if

1. Q0 = U0, 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 60

2.

∀f ∈ C2 (R), f(X ) − f(X ) − R t L f(x(s))ds, t ∈ [0,T ] K t 0 0 (Qs) (67) is a Q martingale.

As a probability measure Qt, t ∈ [0,T ] is the law of x(t) under Q, then, under Q, x(t) is a weak solution of (62). Conversely, if there exists a solution in the sense of probability law of (62), then Q = P ◦X−1 is a solution to the martingale problem (67). Let Q be a solution of the nonlinear martingale problem (67) and let us dene Cˆ as Z ˆ C(t, x) := H(x − y)Qt(dy), R the probability measure Q is also a solution to the linear martingale problem associated to the operator Lˆ dened by 1 ∂2f ∂f Lˆf(x) = σ2 (x) + Cˆ(t, x) (x). 2 ∂x2 ∂x

Hence there exists a Brownian motion Q such that Z t ˆ x(t) = X0 + C(c, x(s))ds + σWt Q − a.s. 0

2.3.2 Stochastic interacting particles method

In this section we give a detailed description of the method with the characteriza- tion of the initial distribution function and of its expected value, together with the approximation of the interacting kernel

In order to present the method we need to make the following assumptions:

(H1) The initial law U0 satises one of the following:

1. U0 is a Dirac measure at 0,

2. U0 has a smooth density u0, satisfying one of the following two conditions:

ˆ u0(·) is a continuous, strictly positive and bounded function, and there exists strictly positive constants M, η and α such that  x2  ∀|x| > M, u (x) ≤ ηexp −α , 0 2 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 61

ˆ u0 is a function with compact support and is continuous on it.

The existence of a solution to the equation (62) in the sense of probability law implies the existence, always in the sense of probability law, to a solution of

  dz = V (t, z )dt + σdW t t t (68)  zt=0 = z0.

Under (H1), the following Lemma

Lemma 2.9. If U0 satises (H0 − 2.), then

∂V (t, x) ≤ L0, ∂x L∞([0,T ]×R) where L0 depends on σ, u0 and T.

If U0 is a Dirac measure in zero, then for any t ∈ ] 0,T [ one has

∂V L0 (t, .) ≤ √ , ∂x L∞(R) t

where L0 depends on σ and T. it can be shown that V (t, ·) is a Lipschitz function in x, with a Lipschitz constant bounded from above by √L0 for all t ∈ ] 0,T [, which implies the pathwise uniqueness of t the solution to (68). Indeed, if 1 and 2 are two solutions, then (zt ) (zt )

Z t 1 2 L0 1 2 |zt − zt | ≤ √ |zt − zt |ds, 0 s so that, thanks to the Gronwall's lemma, 1 2 zt = zt .

The Markov process (zt) with initial distribution U0 coincides with (Xt) and

V (t, x) = EU0 H(x − zt). 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 62

Let us choose points in , 1 N such that the piecewise constant function N R (y0, ..., y0 ),

N 1 X V¯ (x) = H(x − yi ) 0 N 0 i=1 approximates V0 and let us denote the corresponding empirical measure by

N ¯ 1 X U0 = δyi . N 0 i=1

If is the Dirac measure in , set i ¯ and ¯ U0 0 y0 = 0, U0 = U0 V0 = V0.

In the other case, the i are determined by inverting the initial distribution function: y0  −1 i i  V0 ( N ), i = 1, ..., N − 1, y0 = −1 1  V0 (1 − 2N ), i = N, where a rst approximation of V (t, .) is

N 1 X i V (t, x) ≈ E ¯ H(x − z ) = EH(x − z )(y ). U0 t N t 0 i=1

Let us consider independent copies i N of the Brownian motion and the N (wt)i=1 (wt), family of independent processes i dened by (zt)i=1,...,N  i i i  dzt = V (t, zt)dt + σdwt, i i  z0 = y0, where in this case the approximation of V (t, .) is made from the law of large numbers

N 1 X V (t, x) ≈ H(x − zi). N t i=1 The dynamics of the z¯i's depend on the function V, which is our unknown. So we approximate V (tk, ·) by the empirical distribution function of the particles, denoted by ¯ Vtk (·).

Let Y i be the position of the ith particle at the time t , and let U¯ be the corresponding tk k tk empirical measure. Then one has that

Z N ¯ ¯ 1 X i Vt (x) = H(x − y)Ut (dy) = H(x − Y ). k k N tk R i=1 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 63

The motion is described by the trajectories of discrete time and dependent processes, (Y i )N , dened by tk i=1

  Y i = Y i + V¯ (Y i )∆t + σ∆wi , i = 1, ..., N,  tk+1 tk tk tk k+1  i 1 PN i j i = Yt + j=1 H(Yt − Yt )∆t + σ∆wk+1,  k N k k  i i  Y0 = y0, where ∆wi = wi − wi . k+1 tk+1 tk

2.3.3 Convergence rate

Convergence rate of the empirical distribution function to the solution of the Burgers equation is given by the following Theorem.

Theorem 2.4. Let us assume that T is xed, let ∆t > 0 be such that T = ∆tK, K ∈ N.

Let V (tk, x) be the solution at time tk = k∆t of the Burgers equation (63) with the initial condition V0. Let ¯ be dened as above, being the number of particles. Vtk (x) N

Under the (H1) assumption, there exist strictly positive constants L1,L2 and L3, de- pending on σ, U0 and T , such that, for all k ∈ {1, ..., K} : √ ¯ ¯ 1 E V (tk, ·) − Vt (·) 1 ≤ L1 V0 − V0 1 + L2 √ + L3 ∆t. k L (R) L (R) N

Proof. Let's suppose that C denotes any strictly positive real number independent of

N and ∆t, but dependent upon σ, T and U0 and denote by Eµf(zt) the expectation f(zt) of when (zt) has the initial distribution µ.

We decompose the error at time ¯  into three terms: tk, V (tk, ·) − Vtk (·) ,

E V (t , x) − V¯ (x) ≤ kE H(x − z ) − E ¯ H(x − z )k k tk L1(R) U0 tk U0 tk L1(R) 1 N i + E E ¯ H(x − z ) − P H(x − z ) (69) U0 tk N i tk L1(R)

+ E 1 PN H(x − zi ) − 1 PN H(x − Y i ) . N i tk N i tk L1(R) 2 STOCHASTIC SYSTEM AND BURGERS EQUATION 64

The rst term in the right-hand side corresponds to the approximation of the initial ¯ condition V0 by the piecewise constant function V0. An upper bound for this term is given by the following Lemma:

Lemma 2.10. Assume (H1 − 2) and σ > 0. There exists a positive constant C de- pending only on T , b and σ, such that, for any t ∈ [0,T ],

kE H(x − z ) − E ¯ H(x − z )k ≤ C V − V¯ . (70) U0 t U0 t L1(R) 0 0 L1(R) Furthermore, p ¯ C log(N) V0 − V0 1 ≤ , L (R) N where C depends on M, η, α. If U0 has compact support, then one even has

¯ C V0 − V0 1 ≤ . L (R) N

The second term of (69) corresponds to the introduction of the independent process i , and it is a statistical error related to the strong Law of Large Numbers. This term (zt) is estimated by:

Lemma 2.11. There exists a positive constant C depending on T, b, σ and U0 such that for all t ∈ [0,T ] one has

1 N i C E E ¯ H(x − z ) − P H(x − z ) ≤ √ , (71) U0 tk N i tk L1(R) N and  2 1 N C X i E  EU¯ H(x − ztk ) − H(x − zt )  ≤ . 0 N k N i L1(R)

The proofs of these two inequalities are based on the density of the transition proba- bility γ(t, x, y) of the process zt(x):

1. When U0 satises the H1 − 2, by the Lemma 2.6, V is Lipschitz in x, and one

has the following estimates: For any T there exist C0,C1 > 0 such that, ∀t ∈ [0,T ], ∀x, y, ∀σ¯ > σ,

 (x−y)2  |γ (x, y)| ≤ C√0 exp − , (72) t t 2¯σ2t 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 65

 (x−y)2  ∂ γ (x, y) ≤ C√1 exp − . (73) ∂y t t 2¯σ2t

The proof of the (70) is based on (73), and the proof of (71) is based on (72). [39]

2. When U0 satises H1 − 1, i.e., U0 is a Dirac measure, the rst term is zero, and we need only to prove (72) in order to obtain (71).

An upper bound of the last part of (69) is given by the following Lemma

Lemma 2.12. There exists a constant L > 0, only dependent on V0, σ and T such that ∀k = 1, ..., K,

N N 1 X 1 X √ 1  E H(x − zi ) − H(x − Y i ) ≤ L ∆t + √ . N tk N tk N i i L1(R)

The proof of this Lemma is given under the assumption that for any t ∈ (0,T ],V (t, ·) is Lipschitz in x with a Lipschitz constant bounded from √L0 , which is true under H , as t 1 stated in Lemma 2.6. If U0 is smooth , the proof can be simplied but the convergence rate is not improved.

This approach has been extended in [38], to the Burgers equation with non-monotonic initial condition. And an extension to the Burgers equation with the initial condition V0 not a distribution function is developed [39]; in the same paper the authors introduced a stochastic particle method with Lipschitz and bounded interaction kernels b(·, ·) and diusion coecient s(·, ·). Also an estimate for the approximation of the density µt is given.

3 The dynamics of traders: a new proposal

As outlined in the introduction, the aim of this thesis is to model commodity price behaviour, based on trader dynamics, in a way that each of the N stochastic dierential equations leads to a partial dierential equation of Burgers type as the number of market participants increase. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 66

To achieve our purpose, a discrete individual based−model, in which only a nite number of agents are considered, is used. This kind of model is useful in deriving the correct limit equation when the number of individuals increases.

3.1 Literature review

The individual−based−models have been introduced in [21] in order to catch the main features of interaction of the N discrete particles at dierent scales. Thus the model may be applied for modelling a population of N traders in which each trader is treated as a particle. The description of the behaviour of a single particle and its interaction with other particles said to be at microscale level and usually a Lagrangian approach is used to represent this scale. Microscale is dened as the nest scale description based on the stochastic behaviour of all the particles. The global behaviour is described at larger scales called macroscale which is based on the continuum behaviour of population densities and the analysis of particle motion is conducted using an Eulerian approach.

The transfer of the information between the two scales is represented at mesoscale level [19], which scale is larger than the microscale and smaller than the macroscale.

When the number N of individuals increases to innity at the mesoscale level there are enough particles so that a law of large numbers can be applied. The interactions are described by an interaction kernel, which is assumed to depend on the distance between two particles, as its range. The levels of scales depend upon such range. In a system of N individuals living in Rd, at macroscopic level, the distance between one trader and − 1 its neighbour in a space-time dimension is of order O(N d ) where the size of the whole space is assumed to be O(1). At the macroscale level the interaction order between any particle and others is O(N). The particles are weakly interacting when the range is very large, with strength decreasing as 1 At microscale level any particles interacts N . with others with in a small range with volume 1 . Instead at mesoscale there O(1) O( N ) is a moderate interaction between particles, the interaction is of order O(N/α(N)) in a small volume O(1/α(N)) with α(N) and N/α(N) go to innity as N → ∞.

Lagrangian approach

In the Lagrangian approach (microscale) traders are followed in their individual mo- tions. Randomness is included for reproducing the animal spirit, which is an innate 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 67 component of each trader. This concept was coined by J.M. Keynes in his book The General Theory of Employment, Interest and Money to describe the instincts, procliv- ities and emotions that inuence and guide human behaviour.

The variation in time of the position of the k − th individual in the group at time k d is described by a system of stochastic dierential t ≥ 0,XN (t) ∈ R , k = 1,...,N equations. The state of a system of N individuals may be described as a stochastic process  k dened on a suitable probability density space F P and with XN (t) t∈R+ (Ω, , ) d d its value in (R , BRd ), where BRd is the Borel σ-algebra generated by intervals in R . The time evolution of each k , for , will be subject to a stochastic XN (t) k = 1,...,N dierential equation of the following form

k k 1 N k dXN (t) = FN (XN (t), ..., XN (t))dt + σdW (t), k = 1, .., N

with k Nd describing the forces operating on the trader. The ran- FN : R × R+ k − th domness is added by a family of independent Wiener processes {W k, k = 1,..., }.

Eulerian approach

At macroscopic level the state of the k − th trader is based on the density distribution of the whole population, and it can be modelled as a random Dirac measure in M(Rd), which is dened as follows:

 k  1 if XN (t) ∈ B, Xk (t)(B) N k  0 if XN (t) ∈/ B,

∀B ∈ BRd , so that the density function is the Dirac δ-function. For any suciently smooth f : Rd → R the Dirac measure is s.t.

Z k f(y) k (dy) = f(X (t)), forK = 1,...,N. XN (t) N Rd

The Euler approach gives a description of the collective behaviour of the discrete sys- tem, and it can be given in terms of the spatial distribution of the N particles at time t which is called the empirical measure 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 68

N 1 X d XN (t) = Xk (t) ∈ M(R ) N N k=1 while the process X = {X (t)} is the . For a nite number N N N t∈R+ of particle, the empirical distribution XN (t) can still have some stochastic uctuations. But being the empirical distribution a relative frequency a "law of large number" would suggest that stochastic uctuation may disappear.

3.2 Stochastic Interacting Traders model

3.2.1 Construction of the model

As outlined above, the spot price is assumed to depend only upon a population of N ∈ N\{0} traders. The position of the k − th trader, on the market space, is described by a stochastic process Xk (t) dened on a suitable probability space N t∈R+ d (Ω, F, P) and valued in (R , BRd ).

The variation in time of the k −th trader location Xk (t) is given by a stochastic N t∈R+ dierential equation of the following type

k  k X k k  k (74) dXN (t) = g(XN (t), (t)) + GN [XN (t)] (XN (t)) dt + σN dW (t), k = 1,...,N

The drift term is composed by a mean reversion term g(·, X(t)) : Rd → R, with X(t) = 1 N , and an interaction dynamic part modelled through a functional (XN (t),...,XN (t)) k d d d The randomness, due to the animal spirit, is reproduced GN : Mp(R ) → C(R , R ). by a family of N independent Wiener processes {W k, k = 1,...,N}.

As animal dynamics, the traders motion depends upon their state of information. Traders can perceive the inuence of neighbours following them when they believe that they are better informed, or going far believing in their own level of information.

ˆ The dynamics of the whole population leads to the position of the nal price Xt at time t, which is given by a system of N stochastic dierential equation in (74). In our ˆ model we dene the nal price Xt at time t as the weighted mean of traders belonging to a box of of individuals having higher probability measures . It 50% µIt 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 69

The diculty is to estimate the limit within which they can perceive that inuence. In our model we assume that the skills of each individual to feel its neighbours, is within a range of 5% of the maximum distances between the k − th agent and all the others, as found out in [40].

As in [21], we construct a system of N stochastic dierential equations which functional k includes a local interaction and global interaction component. GN

Mean reversion

Dening Y (t) the real price at time t and t0 the time at which we start to look at the commodity price, mean reversion with respect to the average of the observed price in a previous time interval [t0 − D, t0], is dened as follows:

∗ k (75) g(t0,Y (t)) = γ(X (t0) − XN (t)), where

Z t0 ∗ 1 X (t0) = Y (s)ds D t0−D

with γ ∈ R+.

Local interaction

Starting from the idea that the dynamics of any agent depends on the conguration of the remaining population in a small neighbourhood, a "local interaction component" has been included in the model. It is assumed to be an interaction at mesoscale level.

For that kind of interaction an interacting kernel KN , at short range (5%), is chosen. It is assumed to be a symmetric function rescaled by N via a symmetric probability density K1, that is: β β/d KN (z) = N K1(N z), where β ∈ (0, 1) is the scaling parameter for short range, and it determines the range and the strength of the inuence of the neighbouring individuals. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 70

Any traders interact with O(N 1−β) others in a small volume O(N −β). As N → ∞ the interacting kernel function KN tends to the Dirac's delta function δ0, i.e.

lim KN = δ0. N−→∞ The force acting on the k − th trader, due to the interaction with others in a small range is dened as follows:

k k 1 k I (X(t)) = I (XN (t),...,XN (t)) N 1 X = K (Xk (t) − Xm(t)) N N N N m=1 N 1 X = N βK (N β/d(Xk (t) − Xm(t))) N 1 N N m=1 k = (KN ∗ XN (t))(XN (t))

This term of interaction is widely discussed in the literature upon stochastic particle system in papers such as [19], [41] and [42].

Global interaction

A discontinuity in the interaction dynamic is introduced by a Heaviside function H, inspired by the interaction kernel presented in [37].

Given the location of the trader k then the Heaviside function is dened k − th XN (t), as follows:

  0 if x < Xk (t), k N (76) H(x − XN (t)) := k  1 if x ≥ XN (t) for k = 1, ..., N.

Dening the Heaviside function as in (76), the global interaction HN assumes the following form: 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 71

N 1 X H (Xk (t)) := H(Xm(t) − Xk (t)) (77) N N N 2 N N m=1 1 = (H ∗ X (t))(Xk (t)). (78) N N N

Therefore HN gives a global representation of the traders' behaviour with respect to the k − th trader. When the number of traders N tends to ∞, the global interaction k goes to zero, which means that in a market with a big number of individuals HN (XN (t)) the k − th agent is not able to receive information about the total distribution.

Dening t0 the time at which we start to look at the commodity price, the variation in time of that commodity price depending on traders behaviour is given by a system of N stochastic dierential equations assumed to have the following form:

k  ∗ k k k  k dXN (t) = γN (X (t0) − XN )(t) + ξHN (XN (t)) + ζ(KN ∗ XN (t))(XN (t)) dt+σN dW (t) for k = 1,...,N, and with ξ, ζ ∈ R+, and γN , σN assumed to go to zero as N tends to innity.

When all the traders positions k , for , at time are computed, the XN (t) k = 1,...,N t ˆ nal price Xt at time t is obtained by applying the following formula

P j j X (t)µI (X (t)) ˆ j∈It N t N Xt = (79) P µ (Xj (t)) j∈It It N

with It = B50%(t), a box of 50% of individuals having higher probability measures µ ∈ M(Rd).

3.2.2 Heuristic derivation

An evolution equation for the empirical process can be obtained by ap- {XN (t)}t∈R+ plying It 's formula to the function 2,1 d as follows: oˆ f ∈ Cb (R × R+) 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 72

k k R t k k f(XN (t), t) = f(XN (0), 0) + 0 FN [XN (s)](XN (s))∇f(XN (s), s)ds

t h σ2 i R ∂ k N k (80) + 0 ∂s f(XN (s), s) + 2 ∆f(XN (s), s) ds

R t k k +σN 0 ∇f(XN (s), s)dW (s), where

k k X k k FN [XN (t)](XN (t)) = g(XN (t), (t)) + GN [XN (t)] (XN (t))

∗ k k k k = γN (X (t0) − XN )(t) + ξH (XN (t)) + ζ(KN ∗ XN (t))(XN (t)).

Given the empirical process {X (t)} , for any f ∈ C2,1(Rd × R ) we have N t∈R+ b +

R t hXN (t), f(·, t)i = hXN (0), f(·, 0)i + 0 hXN (s),FN [XN (s)](·)∇f(·, s)i ds

t D σ2 E R N ∂ (81) + 0 XN (s), 2 ∆f(·, s) + ∂s f(·, s) ds

σN R t P k k + N 0 k ∇f(XN (s), s)dW (s).

R d The notation hµ, fi = f(x)µ(dx) has been used for any µ on (R , BRd ) and su- ciently smooth function f : Rd → R.

The only term which includes the stochasticity in the equation (81) is

Z t σN X M (f, t) = ∇f(Xk (s), s)dW k(s). (82) N N N 0 k

It is a martingale with respect to the natural ltration of the process {X (t)} . N t∈R+

When the number of traders N is large but still nite, the system keeps the stochasticity eect also from the Eulerian point of view. But when N increases to innity, the 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 73

stochastic part MN (f, t) vanishes in probability. By Doob's inequality it follows that the of MN (f, t), (82), disappears in the limit N → ∞.

2 2 E[sup |MN (f, t)|] ≤ E[sup |MN (f, t)| ] t≤T t≤T

2 ≤ 4E[|MN (f, T )| ] N 4σ2 X Z T ≤ N E[ |∇f(Xk (s), s)|2ds] N 2 N k=1 0 σ2 k∇fk2 T ≤ N ∞ N that goes to zero when N → ∞. This implies convergence to zero in probability. This is one of the limitation of the deterministic process that increasing number of traders loses the noise induced by the Brownian motion.

Under the assumption that empirical process {X (t)} tends to a deterministic N t∈R+ process {X(t)} , when N → ∞, and that for any t ∈ R , the process {X(t)} t∈R+ + t∈R+ admits a density ρ(x, t) with respect to the Lebesgue measure on Rd, we have the following limits

Z lim hXN (t), f(·, t)i = hX(t), f(t)i = f(x, t)ρ(x, t)dx. N→∞ Rd

Thus,

lim (XN (t) ∗ KN )(x) = ρ(x, t) (83) N→∞ and

lim HN (x) = 0. (84) N→∞

Equation (81) is equivalent to write 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 74

R k R k R XN (t)f(XN (t), t)dx = R XN (0)f(XN (0), 0)dx

R R t k k + R 0 XN (s)FN (XN (s))∇f(XN (s), s)dx (85)

R 1 2 R t k + R 2 σN 0 XN (s)∆f(XN (s), s)dsdx

R R t ∂f k + R 0 XN (s) ∂s (XN (s), s)dsdx, when the stochasticity is already assumed to go to 0.

Under the following assumptions:

N 1 X lim XN (t) = lim Xk (t) = ρ(x, t), N→∞ N→∞ N N k=1 and

lim XN (0) = ρ0 = ρ(x, 0), N→∞ we prove that ρ is the solution of the Burgers equation with initial value ρ0. The equation (85) becomes of the following form Z Z ρ(x, t)f(x, t)dx = ρ(x, 0)f(x, 0)dx R R Z Z t + ρ(x, s)FN (x)∇f(x, s)dsdx R 0 Z Z t 1 2 + σN ρ(x, s)∆f(x, s)dsdx R 0 2 Z Z t ∂f + ρ(x, s) (x, s)dsdx R 0 ∂s as N → ∞.

Analysing the drift term FN [XN (t)](·), when N → ∞, we obtain

∗ g(·) = γN (X (t0) − ·) −→ 0 (86) for N → ∞, γN → 0 therefore g(·) tends to zero, which means that when the number N of traders increases to innity the mean reversion disappears. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 75

Dening k we have the following limits GN (·, t) = G1(·, t) + G2(·, t),

G1(·, t) := ξHN (·) −→ 0 (87) and

G2(·, t) := ζ(KN ∗ XN (t))(·) −→ ζρ(x, t) (88) and

lim σN = σ ≥ 0. (89) N→∞

From equations (86), (87), (88) it follows that

k (90) lim FN (XN (t)) = ζρ(x, t), N→∞ thus

R R R f(x, t)ρ(x, t)dx = R f(x, 0)ρ(x, 0)dx

R R t 2 + R 0 ζρ (x, s)∇f(x, s)dsdx (91)

R R t 1 2 + R 0 2 σ ρ(x, s)∆f(x, s)dsdx

R R t ∂f + R 0 ρ(x, s) ∂s (x, s)dsdx.

From the integration by part we get that (91) is the weak version of the following partial dierential equation for the spatial density ρ(x, t), for x ∈ Rd, t ≥ 0, 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 76

∂ρ 1 = −2ζρ∇ρ + σ2∆ρ ∂t 2 which is the viscid Burgers equation for 1 , and . ζ = 2 σ > 0 When σ = 0, all the stochasticity disappears, and this leads to the following equation

∂ρ = −2ζρ∇ρ ∂t which , for 1 , leads to the inviscid Burgers equation. ζ = 2

3.3 Application of the proposed model to some commodity markets

The model presented in the previous Section 3.2.2 has been tested on two dierent commodity markets: Silver and New Zealand electricity; both of them discussed in Section 1.3.1.

Some applications of the proposed model are presented below. The title of each simu- lation encompasses the information related to the parameter values used for simulating the corresponding commodity prices. Tables with statistical features such as mean, standard deviation, skewness and kurtosis are available in Appendix B.

In order to apply the stochastic interacting traders model to commodity markets, two dierent local interaction kernels have been used and compared: a Gaussian kernel and an interacting kernel K. In the following gures the red line represents the evolution of commodity prices obtained using a Gaussian kernel as the local interaction kernel, while the green line represents the stock prices simulated through an interacting kernel K, which reects the idea that each trader can perceive only the inuence of its neighbours within a range of 5% of the maximum distance. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 77

3.3.1 Silver commodity market

Silver: 30days 100traders 2000speed 0,05iScale 2volatility

Figure 16: Silver, real and simulated prices

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 17: Root mean square error 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 78

We started to simulate the Silver price, Fig. 16, using the price of the previous 30 days to obtain the prices of the next month, and the parameters are chosen as in Figures 7 and 9. The choice of the interacting scale parameter β = 0.05 is for being coherent with the idea of 5% of interaction, already included in the interacting kernel K. Only the speed of the mean reversion level has been increased and as a consequence the simulated prices, both with Gaussian and with K kernel, seem to have more spikes than the real price. However, from Fig. 17 we can deduce that the forecasted price follows in the mean the real price.

Silver: 30days 100traders 1500speed 0,25iScale 2volatility

Figure 18: Silver, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 79

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel k

Figure 19: Root mean square error

Decreasing the speed of the mean reversion γ and increasing the interaction scale parameter β we have evidence that the model is not able to change the slope, yet.

Silver: 90days 100traders 1500speed 0,25iScale 2volatility

Figure 20: Silver, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 80

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 21: Root mean square error

The inability of the model to change the slope is amplied when we use the previous 90 days to predict the next 3 months. Nevertheless, the mean values of the forecasted prices are still close to the real prices, as shown in Fig. 21.

Silver: 30days 100traders 1500speed 0,25iScale 5volatility

Figure 22: Silver, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 81

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for kernel K

Figure 23: Root mean square error

An improvement is gained when, in order to escape from the inability of the model to change the gradient, we increase the volatility σ

Silver: 30days 150traders 1500speed 0,25iScale 5volatility

Figure 24: Silver, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 82

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 25: Root mean square error

Finally, we increased the number of traders but there were no evident improvements. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 83

3.3.2 New Zealand electricity market

New Zealand: 30days 100traders 500speed 0,05iScale 120volatility

Figure 26: New Zealand, real and simulated prices

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 27: Root mean square error 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 84

The electricity market is one of the most challenging markets to simulate due to its high volatility. Nevertheless, the stochastic interacting traders model seems to simulate the New Zealand electricity price, keeping the mean behaviour of the real data. As shown in Fig. 27, the model is not capable to uctuate as much as the real price but it is able to reproduce big spikes, and this is a promising feature.

New Zealand: 30days 100traders 1800speed 0,1iScale 120volatility

Figure 28: New Zealand, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 85

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 29: Root mean square error

Indeed increasing the mean reversion speed and the interaction scale we got a better result. The negative spike is a consequence of the high strength of the mean reversion and of the permission of the mathematical model to assume negative values.

New Zealand: 90days 100traders 1800speed 0,1iScale 120volatility

Figure 30: New Zealand, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 86

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 31: Root mean square error

When the number of days to forecast is increased to 90 days, we lost the accuracy of the model, as expected.

New Zealand: 30days 150traders 1800speed 0,15iScale 120volatility

Figure 32: New Zealand, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 87

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 33: Root mean square error

Increasing the number of market participants, the eect of the mean reversion and the global interaction, decreases. Therefore the model reduces its ability to reproduce peaks.

New Zealand: 30days 100traders 250speed 0,1iScale 180volatility

Figure 34: New Zealand, real and simulated prices 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 88

(a) Root mean square error for Gaussian Ker- nel (b) Root mean square error for Kernel K

Figure 35: Root mean square error

Better results are achieved with lower mean reversion speed and higher volatility. In these situations, we can note that the model reproduces the spikes without going down in the negative zone.

3.4 Performance of the new proposed model

The implementation of the stochastic interacting traders model is a modication of the model (19), built by M. Jablonska in her paper [21] and introduced in Section 1.3.1.

The global interaction component, f2(k, Xt) of equation (19), has been replaced by a global kernel k depending on the Heaviside function, dened as (77). This HN (XN (t)) kernel gives information about the distribution of the total population with respect to the k−th individual.

The local interaction function, f3(k, Xt), has been replaced with an interaction kernel dened as a symmetric function KN rescaled by N via a symmetric probability density

K1 and depending on the interaction scale β.

The reason for applying these changes arises from the need to study in depth the existence of a link between the stochastic dierential equation and the Burgers equation as mentioned in [21]. Also the wishes to improve the predictions for commodity markets drove us to conduct of this analysis. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 89

The goodness of the t of the stochastic interacting traders model for Silver and New Zealand electricity market, described in Section 3.2.2, can be compared with the pre- vious model obtained using the system of stochastic dierential equations of the type (19), as described in Section 1.3.1. But the analysis cannot be conducted only compar- ing the statistical features of the two models, and this diculty is due to their dierent implementations. The individual based model developed by M.Jablonska is implemented day by day, which means that at each day t the prediction for the next 91 days is computed. We can say that this model is adaptive because at each day it receives new information and computes again the prediction adding these news. While the interacting traders model has been tested on a time windows of 30 days, i.e. at day t is computed the prediction for the next 30 days, which means that the information are transferred to the model only one time (day) per month. In the Jablonska model the parameters are already optimized which means that the results cannot be improved by changing parameter values and that the performance are at maximum level. Instead in the model proposed in this thesis the optimization of the parameters is still ongoing.

A comparison is done through the following gures: 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 90

Silver market

Figure 36: Silver data simulations at dierent times Hb made with the Jablonska individual based model.

Figure 37: Root mean square error. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 91

Figure 38: Silver data simulated at each 30 days with the stochastic interacting traders model, γN = 15, N = 100, β = 0.05 and σ = 1

(a) Root mean square error for Gaussian ker- nel. (b) Root mean square error for kernel K.

Figure 39: Root mean square error for Silver data with the two dierent kernels. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 92

New Zealand electricity market

Figure 40: New Zealand electricity data simulations at dierent times Hb made with the individual besed model.

Figure 41: Root mean square error. 3 THE DYNAMICS OF TRADERS: A NEW PROPOSAL 93

Figure 42: New Zealand data simulated at each 30 days with the stochastic interacting traders model, γN = 2, N = 100, β = 0.1 and σ = 120

(a) Root mean square error for Gaussian ker- nel. (b) Root mean square error for kernel K.

Figure 43: Root mean square error for New Zealand electricity data with the two dierent kernels.

Despite the diculty to compare the two models, Figures 38, 39, for Silver, and Fig- ures 42, 43, for New Zealand electricity, show the eective existence of improvements achieved by using the new proposed model with respect to Figures 36, 37 and Figures 4 DISCUSSION AND FUTURE PERSPECTIVES 94

40, 41; the new model is also capable of producing high price spikes.

4 Discussion and future perspectives

In this work we studied the mean reverting process of Ornstein-Uhlenbeck type, the Burgers equation and its connection with a stochastic dierential equation. In particu- lar, we focused on a specic interaction kernel reached through the Heaviside function, which is linked to the Burgers equation.

The aim of this study was to build a stochastic model for commodity markets and show its convergence to the Burgers equation when the number of market participants increases.

Our analysis and our numerical experiments show the goodness of the model to forecast the two tested markets, and its improvements are conrmed by the ability of the model to reproduce big spikes when their eects occur in a suciently long period of time.

Parameters optimization is still challenging for the proposed model, because of lack of information about the individual traders' oers. We also gured out that the model fails to follow the trend of the real price, due to its inability to have an inclination. One option to avoid this eect is to use the gradient or replace the Wiener process with dierent noise and prove that under this assumption the convergence to the Burgers equation still holds. An alternative way to solve this problem can be to create a mean reversion with respect to the trend, or adding an extra component that enriches the model with this information. It follows that the stochastic interacting traders model is a good starting point for future improvements.

After these failures and adjustments have been completed, the model can be applied in dierent ways.

The stochastic interacting traders model can be used alone to test its ability in simulat- ing dierent commodity markets, or it can be added to the two or three-factor models discussed in the introduction, so that the traders' component becomes a factor that, together with stock price, convenience yields and interest rate has an impact on price formation. A FUNDAMENTALS OF STOCHASTIC PROCESSES 95

Starting from the existing traders model, two dierent systems of stochastic dierential equations, for buyer and for seller, could be developed and the nal price can be computed, as in the reality, as the point at which demand meets supply.

After testing the capabilities of the stochastic interacting traders model, it might be interesting to shift to a multidimensional case, in which dierent kinds of markets and their derivatives are considered to interact, and each of them are assumed to be estimated as the solution of the described system of N stochastic dierential equations. These and many other applications represent the future of the stochastic interacting traders model.

A Fundamentals of Stochastic Processes

A.1 Stochastic processes and their properties

Here we introduce basic properties of the stochastic processes and of the Wiener Process in particular the reader may refer to [43] for more details.

Denition A.1. Let (Ω, F, P) be a probability space, T an index set, and (E, B) a measurable space. An (E, B)−valued stochastic process on (Ω, F, P) is a family (Xt)t∈T of random variables Xt : (Ω, F) → (E, B) for t ∈ T .

(Ω, F, P) is the underlying probability space of the (Xt)t∈T , (E, B) is the state space, also called, phase space. Fixing t ∈ T , the random variable Xt is the state of the process at time t. For all ω ∈ Ω, the mapping X(·, ω): t ∈ T → Xt(ω) ∈ E is called the trajectory or path of the process corresponding to ω.

Denition A.2. Let (Ω, F, P) be a probability space. A ltration {F}t≥0 on (Ω, F, P) is a family of sub sigma−algebras of a sigma−algebra F, with the properties that if + s ≤ t, then Fs ⊂ Ft. Ft = σ(X(s), 0 ≤ s ≤ t), t ∈ R is called the generated or natural

ltration of the process Xt.

A probability space (Ω, F, P) endowed a ltration (Ft)t≥0 is called a ltered probability space.

Denition A.3. A stochastic process (Xt)t≥0 on (Ω, F, P) is adapted to the ltration

(Ft) if, for each t ≥ 0, Xt is Ft−measurable. A FUNDAMENTALS OF STOCHASTIC PROCESSES 96

Denition A.4. A ltered complete probability space (Ω, F, P, (Ft)t∈R+ ) is said to satisfy the usual hypotheses if

1. F0 contains all P −null sets of F.

2. F T F for all +, i.e, the ltration F is righ continuous. t = s>t s, t ∈ R ( t)t∈R+ − Denition A.5. Let be a stochastic process on a probability space, value (Xt)r∈R+ in B and adapted to the increasing family F of a algebra of subsets of (E, ) ( )t∈R+ σ− F. is a Markov process with respect to F if the following conditions is (Xt)t∈R+ ( )t∈R+ satised:

∀B ∈ B, ∀(s, t) ∈ R+ × R+, s < t : P (Xt ∈ B|Fs) = P (Xt ∈ B|Xs) a.s.

That mean, the future is determined only by the present and not by the past.

Denition A.6. A real vaued stochastic process is continuous in probability − (Xt)t∈R+ if

∀t ∈ R+ and  > 0,P (|Xs − Xt| ≥ ) → 0 as s → t.

Denition A.7. The stochastic process F P with state space B , is (Ω, , , (Xt)t∈R+ ) (E, ) called a process with independent increments if, for all n ∈ N and for all (t1, . . . , tn) ∈ n , where , the random variables are R+ t1 < . . . < tn Xt1 ,Xt2 − Xt1 ,...,Xtn − Xtn−1 independent.

The increments are said to be stationary if, for any t > s and h > 0, the distribution of Xs+h − Xt+h is the same as the distribution of Xs − Xt.

The stochastic process related to the movement of the particles, entirely chaotic, is the Wiener process.

Denition A.8. The real valued process is a Wiener process if it satises − (Wt)t∈R+ the following conditions:

1. W0 = 0 almost surely.

2. is a process with stationary independent increments. (Wt)t∈R+

3. Wt − Ws is normally distributed, N(0, t − s), (0 ≤ s < t).

Proposition A.1. If is a Wiener process, then (Wt)t∈R+ A FUNDAMENTALS OF STOCHASTIC PROCESSES 97

1. E[Wt] = 0 for all t ∈ R+

2. K(s, t) = Cov[Wt,Ws] = min s, t, s, t ∈ R+

A particular and common used stochastic process is a Gaussian Process.

Denition A.9. A real−valued stochastic process (Ω, F, P, (X ) n ) is called a Gaus- t t∈R+ sian process if, for all and for all n , the dimensional random n ∈ N (t1, . . . , tn) ∈ R+ n− vector 0 has a multivariate Gaussian distribution, with probability X = (Xt1 ,...,Xtn ) density 1 1 x x m 0 −1 x m (92) ft1,...,tn ( ) = n √ exp{− ( − ) K ( − )}, (2π) 2 det k 2 where

mi = E[Xti ] ∈ Ri = 1, . . . , n,

Kij = Cov[Xti ,Xtj ] ∈ Ri, j = 1, . . . , n.

n The covariance matrix K = (σij) is taken as positive−denite, i.e.,for all a ∈ R : Pn i,j=1 aiKijaj > 0. Proposition A.2. The Wiener process is a Gaussian process.

Theorem A.1. If is a real valued Wiener process, then it has continuous (Wt)t∈R+ − trajectories almost surely.

Proposition A.3. Let be a real valued continuous process starting at at (Xt)t∈R+ − 0 time 0. If the process is Gaussian process satisfying

1. E[Xt] = 0 for all t ∈ R+

2. K(s, t) = Cov[Xt,Xs] = min s, t s, t, ∈ R+ then it is a Wiener process.

Theorem A.2. Almost every trajectory of the Wiener process is nowhere (Wt)t∈R+ dierentiable.

Proposition A.4. Let be a Wiener process; then the following properties (Wt)t∈R+ hold: A FUNDAMENTALS OF STOCHASTIC PROCESSES 98

1. (Symmetry) The process is a Wiener process. (−Wt)t∈R+ 2. (Time Scaling) The time scaled process ¯ dened by − (Wt)t∈R+

¯ 1 ¯ (Wt)t∈R+ = tW , t > 0, W0 = 0 t is also a Wiener process.

3. (Space Scaling) For any , the space scaled process ¯ dened by c > 0 − (Wt)t∈R+

¯ 1 ¯ (Wt)t∈R+ = cW , t > 0, W0 = 0 c2 is also a Wiener process.

Proposition A.5. (Strong law of large numbers) Let be a Wiener process. Then (Wt)t∈R+ W t → 0, as t → ∞, a.s. t Denition A.10. (multi−dimensional Wiener process) The real valued process 0 is said to be an dimensional Wiener − (W1(t),...,Wn(t))t≥0 n− process (or Brownian motion) if

1. For all i ∈ {1, . . . , n}, (Wi(t))t≥0 is a Wiener process

2. The processes (Wi(t))t≥0, i = {1, . . . , n} are independent,

thus the σ−algebras σ(Wi(t), t ≥ 0)i = 1, . . . , n are independent.

A.2 Stochastic integrals

It is necessary to dene the object

Z b f(t)dWt a where W (t) is a Wiener process. This integral is not of LebesgueıStieltjes, or Riemannı Stieltjes type but it is called Itoˆ integral.

Before give the exact denition af a stochastic Itoˆ integral we need some concepts: A FUNDAMENTALS OF STOCHASTIC PROCESSES 99

Denition A.11. Let F :[a, b] −→ R be a function and Π the set of partitions

π : a = x0 < x1 < ... < xn = b of the interval [a, b] . Putting

n X ∀π ∈ Π: VF (π) = |F (xi) − F (xi−1)| , i=1 then F is of bounded variation if

sup VF (π) < ∞. π∈Π Also, is called the total variation of in the interval VF (a, b) = supπ∈Π VF (π) F [a, b] .

Denition A.12. Let f :[a, b] −→ R be continuous and F :[a, b] −→ R of bounded variation, for all π ∈ Π, π : a = x0 < x1 < ... < xn = b. We will x points ξ arbitrarily in [ xi−1, xi [ , i = 1, ..., n and construct the sum

n X Sn = f(ξi)[F (xi) − F (xi−1] . i=1

Denition A.13. Let (W t)t≥0 be a Wiener process dened on the probability space (Ω,F,P ) and C the set of functions f(t, ω):[a, b] × Ω −→ R satisfying the following conditions:

1. f is B[a,b] ⊗ F−measurable

2. For all t ∈ [a, b], f(t, ·):Ω −→ R is Ft−measurable, where Ft = σ(Ws, 0 ≤ s ≤ t)

3. For all 2 F and R b 2 t ∈ [a, b], f(t, ·) ∈ L (Ω, ,P ) a E[|f(t)| ]dt < ∞

Denition A.14. Let f ∈ C. If there exist both a partition π of [a, b], π : a = t0 < t1 < ... < tn = b, and some real−valued random variables f0, ..., fn−1 dened on (Ω, F,P ), such that

n−1 X f(t, ω) = fi(ω)I[ti, ti + 1[(t) i=0 with the convention that [tn−1, tn[= [tn−1, b], then f is a piecewise function.

Denition A.15. (Itoˆ integral)

If f(t, ω) ∈ C, is a piecewise function, then the real random variable Φ(f) is a stochastic Ito integral of process f, where A FUNDAMENTALS OF STOCHASTIC PROCESSES 100

n−1 X ∀ω ∈ Ω : Φ(f)(ω) = fi(ω)(Wti+1 (ω) − Wti (ω)). i=0 is denoted by the symbol R b . Φ(f) a f(t)dW t Lemma A.1. If S denotes the space of piecewise functions belonging to the class C, then S ∈ L2([a, b] × Ω) and Φ: S − L2(Ω) is linearly continuous. Lemma A.2. C is a closed subspace of the Hilbert space L2([a, b] × Ω) and is therefore a Hilbert space as well. The scalar product is dened as Z b Z Z b hf, gi = f(t, ω)g(t, ω)dP (ω)dt = E [f(t)g(t)] dt. a Ω a Hence Φ has a unique linear continuous extension in the closure of S in C, i.e., Φ: S¯ −→ L2(Ω). Theorem A.3. The Itoˆ integral Φ: S −→ L2(Ω) has a unique linear continuous extension in If , then we denote by R b C. f ∈ C Φ(f) a f(t)dWt.

The main properties of the Itoˆ integral are given by the following Proposition: Proposition A.6. If f, g ∈ C, then

h i 1. R b E a f(t)dWt = 0

h i 2. R b R b R b E a f(t)dWt a g(t)dWt = a E [f(t)g(t)] dt

 2 3. R b R b  2 . E a f(t)dWt = a E (f(t)) dt Ito isometry

A.2.1 Ito integrals of Multidimensional Wiener Processes

In order to extend the results to the multidimensional case, is appropriate dene a set

C1.

Denition A.16. Let C1 be the set of functions f :[a, b] × Ω −→ R such that conditions 1 and 2 of the characterization of the class C, A.13, are satised, but instead of condition 3, we have

Z b  P |f(t)|2 dt < ∞ = 1. a A FUNDAMENTALS OF STOCHASTIC PROCESSES 101

mn 0 We denote by R all real−valued m×n matrices and by W (t) = (W1(t), ..., Wn(t)) , t ≥ 0, an n−dimensional Wiener process. Let [a, b] ∈ [0, +∞[, and we put

 mn CW([a, b]) = f :[a, b] × Ω −→ R |∀1 ≤ i ≤ m, ∀1 ≤ j ≤ n : fij ∈ CWj ([a, b]) ,

 mn C1W([a, b]) = f :[a, b] × Ω −→ R |∀1 ≤ i ≤ m, ∀1 ≤ j ≤ n : fij ∈ C1Wj ([a, b]) ,

where CW([a, b]) and C1W([a, b]) correspond to the classes C([a, b]) and C1([a, b]) re- spectively, as dened in Previous section.

mn Denition A.17. If f :[a, b] × Ω − R belongs to C1W([a, b]), then the stochastic integral with respect to W is the m−dimensional vector dened by

n !0 Z b X Z b f(t)dW (t) = fij(t)dWj(t) , a a j=1 1≤i≤m where each of the integrals on the right−hand side is dened as Itoˆ integral.

Proposition A.7. If 2 and belongs to (i, j) ∈ {1, ..., n} fi :[a, b] × Ω −→ R CWi ([a, b]) and belongs to , then fj :[a, b] × Ω −→ R CWj ([a, b])

Z b Z b  Z b  E fi(t)dWi(t) fj(t)dWj(t) = δijE fi(t)fj(t)dt , a a a where δij = 1, if i = j or δij = 0, if i 6= j, is the Kronecker delta.

Proposition A.8. Let f :[a, b] × Ω −→ Rmn and g :[a, b] × Ω −→ Rmn. Then

1. If f ∈ CW ([a, b]), then

Z b  E f(t)dW(t) = 0 ∈ Rm; a

2. 2. If f, g ∈ CW([a, b]), then

"Z b  Z b 0# Z b  E f(t)dW(t) g(t)dW(t) = E (f(t))(g(t))0dt ; a a a A FUNDAMENTALS OF STOCHASTIC PROCESSES 102

3. If f ∈ CW([a, b]), then

" Z b 2# Z b  2 E f(t)dW(t) = E |f(t)| dt a a where m n 2 X X 2 |f| = (fij) i=1 j=1 and 2 Z b 2 m n Z b ! X X f(t)dW(t) = fij(t)dWj(t) .

a i=1 j=1 a

A.2.2 The Stochastic Dierential

In stochastic eld the stochastic dierential replaces the concept of derivative.

Denition A.18. Let (u(t))0≤t≤T be a process such that for every (t1, t2) ∈ [0,T ] × [0,T ], t1 < t2:

R t2 R t2 (93) u(t2) − u(t1) = a(t)dt + b(t)dWt, t1 t1

1 where (a) 2 ∈ C1([0,T ]) and b ∈ C1([0,T ]). Then u(t) is said to have the stochastic dierential

(94) du(t) = a(t)dt + b(t)dWt

on [0,T ].

Proposition A.9. If the stochastic dierential of (ui(t))t∈[0,T ] is given by

dui(t) = ai(t)dt + bi(t)dWt, i = 1, 2, then (u1(t)u2(t))t∈[0,T ] has the stochastic dierential A FUNDAMENTALS OF STOCHASTIC PROCESSES 103

(95) d(u1(t)u2(t)) = u1(t)du2(t) + u2(t)du1(t) + b1(t)b2(t)dt,

Corollary A.1. For every integer n ≥ 2 we get 1 d(W n) = nW n−1dW + (n − 1)nW n−2dt. t t t 2 t Proposition A.10. If f ∈ C2(R), then 1 df(W ) = f 0(W )dW + f 00(W )dt. t t t 2 t

A.2.3 Itoˆ's Formula

In stochastic eld the Taylor's approximation formula can be replaced with the Itoˆ0s formula.

Proposition A.11. If u(t, x) : [0,T ] × R −→ R is continuous with the derivatives ux, uxx, and ut, then

1 (96) du(t, Wt) = (ut(t, Wt) + 2 uxx(t, Wt))dt + ux(tWt )dWt.

Theorem A.4. (Itoˆ's formula)

If du(t) = a(t)dt + b(t)dWt, and if f(t, x) : [0,T ] × R −→ R is continuous with the derivatives fx, fxx, and ft, then the stochastic dierential associated to the process f(t, u(t)) is given by

df(t, u(t)) = f (t, u(t)) + 1 f (t, u(t))b2(t) + f (t, u(t))a(t) dt t 2 xx x (97) +fx(t, u(t))b(t)dWt.

A.2.4 Multidimensional Stochastic Dierentials

It is possible to extend the previous concept to the m−dimensional case. A FUNDAMENTALS OF STOCHASTIC PROCESSES 104

Denition A.19. Let(ut)0≤t≤T be an m−dimensional process and

m a : [0,T ] × Ω −→ R , a ∈ C1W([0,T ])

, mn b : [0,T ] × Ω −→ R , b ∈ C1W([0,T ]) . The stochastic dierential du(t) of u(t) is given by

du(t) = a(t)dt + b(t)dW(t) if, for all 0 ≤ t1 < t2 ≤ T ,

Z t2 Z t2 u(t2) − u(t1) = a(t)dt + b(t)dW(t). t1 t1

For 1 ≤ i ≤ m the stochastic dierential equation has the following form:

n X dui = aidt + (bij(t)dWj(t)). j=1 Theorem A.5. (Multidimensional Ito formula)

Let m be continuous with the derivatives , and . Let f(t, x): R+ × R −→ R fxi , fxixj ft u(t) be an m−dimensional process, endowed with the stochastic dierential

du(t) = a(t)dt + b(t)dW(t),

0 where a = (a1, ..., am) ∈ CW([0,T ]) and b = (bij)1≤i≤m,1≤j≤n ∈ CW([0,T ]). Then f(t, u(t)) has the stochastic dierential

u u Pm u df(t, (t)) = (ft(t, (t)) + i=1 fxi (t, (t))ai(t) +

 1 Pn Pm u (98) + 2 l=1 i,j=1 fxixj (t, (t))bil(t)bjl(t) dt+

Pn Pm u + l=1 i=1 fxi (t, (t))bil(t)dWl(t).

0 Putting aij = (bb )ij , i, j = 1, ..., m, is allowed introduce the dierential operator

m m 1 X δ2 X δ δ L = a + a + , 2 ij δx δx i δx δt i,j=1 i j i=1 i A FUNDAMENTALS OF STOCHASTIC PROCESSES 105 and the gradient operator  δ δ 0 ∇x = , ..., δx1 δxm then, in vector notation, 98 can be written as

(99) df(t, u(t)) = Lf(t, u(t))dt + ∇xf(t, u(t)) · b(t)dW(t),

where ∇xf(t, u(t)) · b(t)dW (t) is the scalar product of two m−dimensional vectors.

Lemma A.3. If (W1(t))t≥0 and (W2(t))t≥0 are two independent Wiener processes, then

(100) d(W1(t)W2(t)) = W1(t)dW2(t) + W2(t)dW1(t).

Lemma A.4. If W1,...,Wn are n independent Wiener process and

n X dui(t) = ai(t)dt + (bij(t)dWj(t)), i = 1, 2, j=1 then

Pn (101) d(u1u2)(t) = u1(t)du2(t) + u2(t)du1(t) + j=1 b1jb2jdt.

A.3 Stochastic Dierential Equations

The stochastic dierential equation (SDE) is the analogue of the ordinary dierential equation (ODE) in the classic theory, with the dierence that in the does not exist the concept of derivative.

Let F be a probability space endowed of its natural ltration (Ω, ,P ) (Ft)t∈R+ ,Ft = , with a Wiener process. Let , be two determin- σ(Ws, 0 ≤ s ≤ t) (Wt)t∈R+ a(t, x) b(t, x) istic measurable functions in [t0,T ] × R for some t0 ∈ R+. Given Fu0,t, the σ−algebra generated by the union of Fu0 and Ft for t ∈ (t0, ∞), with Fu0 the σ−algebra generated 0 by a real−valued random variable u , assumed independent of Ft, then we can dene the stochastic dierential equation (SDE). A FUNDAMENTALS OF STOCHASTIC PROCESSES 106

Denition A.20. The stochastic process is said to be a (u(t))t∈[t0,T ] (T ∈ (t0, ∞)) solution of the stochastic dierential equation (SDE)

(102) du(t) = a(t, u(t))dt + b(t, u(t))dWt, t0 ≤ t ≤ T, subject to the initial condition

0 (103) u(t0) = u a.s., if

1. u(t) is measurable with respect to the σ−algebra Fu0,t, t0 ≤ t ≤ T .

1 2. |a(·, u(·))| 2 ,b(·, u(·)) ∈ C1([t0,T ]).

3. The stochastic dierential of u(t) in [t0,T ] is

du(t) = a(t, u(t))dt + b(t, u(t))dWt,

thus Z t Z t u(t) = u(t0) + a(s, u(s))ds + b(s, u(s))dWs, t ∈ [t0,T ]. t0 t0 Theorem A.6. (Existence and uniqueness) Suppose constants K∗,K exist such that the following conditions are satised:

1. For all t ∈ [0,T ] and all (x, y) ∈ R × R:

|a(t, x) − a(t, y)| + |b(t, x) − b(t, y)| ≤ K∗ |x − y|

.

2. For all t ∈ [0,T ] and all x ∈ R:

|a(t, x)| ≤ K(1 + |x|), |b(t, x)| ≤ K(1 + |x|)

.

3. E[|u0|2] < ∞.

Then there exists a unique (u(t))t∈[0,T ] solution of 102 and 103 such that A FUNDAMENTALS OF STOCHASTIC PROCESSES 107

ˆ (u(t))t∈[0,T ] is continuous almost surely (thus almost every trajectory is continuous).

ˆ (u(t))t∈[0,T ] ∈ C([0,T ]).

If the function a and b in the Theorem A.6 are dened on the [t0,T ], then the SDE

(102) admits a unique solution dened on the [ t0, +∞ ); in this case the solution of (102) is said global solution.

Theorem A.7. If the the hypothesis of the Theorem A.6 are satysed for the (SDE):

du(t) = a(t, u(t))dt + b(t, u(t))dWt with initial condizion

u(t0) = c a.s. and functions a(t, x) and b(t, x) are continuous for (t, x) ∈ [0, ∞] × R, then the so- lution u(t) is called diusion process with a(t, x) drift coecient and b2(t, x) diusion coecient.

Theorem A.8. Kolmogorov's backward dierential equation Under the hypothesis that

1. the coecients a(t, x) and b(t, x) are continuous and have continuous partial

derivation ax(t, x), axx(t, x), bx(t, x) and bxx(t, x),

2. ∃k > 0 and m > 0 such that

|a(t, x)| + |b(t, x)| ≤ k(1 + |x|),

m |ax(t, x)| + |axx(t, x)| + |bx(t, x)| + |bxx(t, x)| ≤ k(1 + |x| )

3. The function f(x) is twice continuously dierentiable with

|f(x)| + |f 0(x)| + |f 00(x)| ≤ k(1 + |x|m) then the function

q(t, x) ≡ E[f(u(s, t, x))], 0 < t < s, x ∈ R, s ∈ ] 0,T [ , satises the equation

∂ ∂ 1 ∂2 q(t, x) + a(t, x) q(t, x) + b2(t, x) q(t, x) = 0 (104) ∂t ∂x 2 ∂x2 B TABLES 108 sunject to the condition:

limt↑sq(t, x) = f(x).

The equation (104) is called Kolmogorov's backward dierential equation.

Theorem A.9. Under the assumption of the Theorem A.8, let c be a real valued, nonnegative continuous function in ] 0,T [ × R. Then the function, for x ∈ R,

h − R s c(u(τ,t,x),τ)dτ i q(t, x) = E f(u(s, t, x))e t with 0 < t < s < T, (105) satises the equation

∂ ∂ 1 ∂2 q(t, x) + a(t, x) q(t, x) + b2(t, x) q(t, x) − c(t, x)q(t, x) = 0, ∂t ∂x 2 ∂x2 subject to the boundary condition limt↑s q(t, x) = f(x). Equation (105) is called the Feynman−Kac formula.

B Tables

B.1 Tables for Silver price simulation

Silver: 30days 100traders 2000speed 0,05iScale 2volatility

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 5.04 4.45 4.61 6.55 8.96 13.03 9.74 18.38 31.34 13.71 Final price 5.34 4.44 5.05 6.35 8.89 13.63 10.43 18.00 40.17 13.84 Final price Alt. 5.25 4.40 5.05 6.37 8.78 13.63 10.42 18.02 40.20 13.83

Table 1: Mean B TABLES 109

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 0.07 0.19 0.06 0.18 0.20 0.42 0.41 0.58 1.22 10.14 Final price 0.31 0.34 0.39 0.36 0.47 0.51 0.91 0.77 6.94 10.33 Final price Alt. 0.26 0.35 0.35 0.35 0.52 0.47 0.93 0.85 7.02 10.33

Table 2: Standard Deviation

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price -0.11 -0.46 -0.53 -0.40 0.38 -0.25 0.28 0.48 1.68 1.13 Final price 0.16 0.05 -0.22 -0.17 0.21 0.07 1.36 -0.50 -0.24 1.18 Final price Alt. 0.41 -0.03 -0.20 -0.29 -0.84 0.04 1.57 -0.61 -0.25 1.17

Table 3: Skewness

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 1.39 1.54 2.10 2.10 3.24 2.29 1.91 2.24 8.60 3.23 Final price 2.49 1.82 2.51 2.13 3.45 3.64 3.60 2.35 1.38 3.43 Final price Alt. 2.46 1.87 2.64 2.06 2.06 4.16 2.23 4.53 3.23 3.44

Table 4: Kurtosis

Silver: 30days 100traders 1500speed 0,25iScale 2volatility

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 5.03 4.45 4.60 6.55 8.95 13.02 9.74 18.38 31.33 13.7 Final price 5.11 4.27 4.81 6.19 8.55 13.31 10.22 17.60 39.22 13.52 Final price Alt. 5.11 4.28 4.83 6.18 8.53 13.31 10.23 17.60 39.3 13.53

Table 5: Mean B TABLES 110

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 0.07 0.18 0.06 .17 .19 0.42 .4 .58 1.22 10.13 Final price 0.09 .1 .09 0.32 0.27 .12 0.86 0.44 1.13 10.06 Final price Alt. 0.1 0.1 0.09 0.32 0.26 0.13 0.88 0.45 1.18 10.09

Table 6: Standard Deviation

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price -0.12 -0.46 -0.54 -0.40 0.38 -0.26 0.27 0.48 1.67 1.12 Final price -0.35 -0.15 -0.04 0.27 -1.49 0.02 1.48 0.86 1.12 1.13 Final price Alt. -0.24 -0.52 0.74 0.31 -1.74 -0.29 1.5 0.85 1.3 1.13

Table 7: Skewness

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 1.38 1.53 2.09 2.09 3.24 2.28 1.91 2.23 8.59 3.22 Final price 3.01 2.64 2.67 1.41 4.29 3.82 3.34 2.02 5.63 3.25 Final price Alt. 2.14 2.86 2.88 1.51 4.89 3.04 3.40 2.06 6.14 3.26

Table 8: Kurtosis

Silver: 90days 100traders 1500speed 0,25iScale 2volatility

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 4.94 4.33 4.57 6.95 10.73 12.63 11.55 18.29 31.99 13.7 Final price 5.1 4.35 4.68 6.3 8.54 13.29 12.11 17.28 39.14 12.7 Final price Alt. 5.09 4.36 4.7 6.28 8.56 13.3 12.1 17.31 39.18 12.71

Table 9: Mean B TABLES 111

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 0.06 0.21 0.12 0.48 1.34 0.51 1.37 0.51 1.74 10.13 Final price 0.1 0.08 0.12 0.3 0.23 0.24 1.8 0.57 0.59 9.75 Final price Alt. 0.11 0.09 0.12 0.31 0.24 0.23 1.8 0.61 0.52 9.78

Table 10: Standard Deviation

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price -0.42 0.50 0.60 -0.35 0.84 -0.42 0.55 0.42 0.09 1.12 Final price -0.44 -0.11 0.17 0.88 -4.07 0.85 -0.12 1.3 5.84 1.19 Final price Alt. -0.24 0.07 0.15 0.98 -3.68 0.85 -0.12 1.3 4.65 1.2

Table 11: Skewness

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 2.64 2.01 2.28 1.71 2.50 2.32 2.35 2.54 2.29 3.22 Final price 2.89 3.16 2.46 2.42 23.93 2.47 1.03 2.88 52.52 3.57 Final price Alt. 3.19 2.53 2.5 2.64 21.85 2.73 1.03 2.9 43.83 3.57

Table 12: Kurtosis

Silver: 30days 100traders 1500speed 0,25iScale 5volatility

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 5.03 4.45 4.6 6.55 8.95 13.02 9.74 18.38 31.33 13.7 Final price 5.24 4.33 4.91 6.35 8.63 13.39 10.33 17.71 39.27 13.61 Final price Alt. 5.31 4.37 4.87 6.3 8.6 13.34 10.32 17.68 39.32 13.61

Table 13: Mean B TABLES 112

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 0.07 0.18 0.06 0.17 0.19 0.42 0.4 0.58 1.22 10.13 Final price 0.31 0.24 0.27 0.37 0.42 0.27 0.87 0.5 1.14 10.06 Final price Alt. 0.3 0.25 0.22 0.37 0.38 0.23 0.89 0.51 1.13 10.08

Table 14: Standard Deviation

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price -0.12 -0.46 -0.54 -0.4 0.38 -0.26 0.27 0.48 1.67 1.12 Final price 0.43 -0.17 -0.84 0.36 -0.58 0.06 1.29 0.48 0.77 1.13 Final price Alt. -0.04 0.64 0.25 0.05 -0.31 -0.02 1.2 0.39 0.85 1.13

Table 15: Skewness

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 1.38 1.53 2.09 2.09 3.24 2.28 1.91 2.23 8.59 3.22 Final price 2.2 3.3 3.16 2.44 3.62 2.15 3.07 2.14 4.06 3.25 Final price Alt. 2.02 3.06 2.4 2.65 2.3 2.57 3.14 1.96 5.23 3.27

Table 16: Kurtosis

Silver: 30days 150traders 1500speed 0,25iScale 5volatility

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 5.03 4.45 4.60 6.55 8.95 13.02 9.74 18.38 31.33 13.7 Final price 5.23 4.38 4.91 6.27 8.6 13.33 10.21 17.62 39.21 13.57 Final price Alt. 5.26 4.38 4.90 6.25 8.57 13.35 10.21 17.7 39.32 13.58

Table 17: Mean B TABLES 113

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 0.07 0.18 0.06 0.17 0.19 0.42 0.4 0.58 1.22 10.13 Final price 0.21 0.21 0.16 0.32 0.29 0.21 0.94 0.45 0.76 10.06 Final price Alt. 0.19 0.21 0.16 0.33 0.31 0.21 0.92 0.44 0.84 10.07

Table 18: Standard Deviation

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price -0.12 -0.46 -0.54 -0.4 0.38 -0.26 0.27 0.48 1.67 1.12 Final price -0.36 -0.01 -0.4 0.15 -0.89 0.13 1.46 0.72 0.99 1.13 Final price Alt. -0.09 0.36 -0.23 0.21 -0.49 0.37 1.46 0.61 1 1.13

Table 19: Skewness

· 31 555 1079 1603 2127 2651 3175 3699 4223 ToT Real price 1.38 1.53 2.09 2.09 3.24 2.28 1.91 2.23 8.59 3.22 Final price 2.33 3.25 2.6 1.93 3.57 2.58 3.33 2.02 2.21 3.25 Final price Alt. 2.28 2.47 3.26 1.95 3.89 2.33 3.3 1.86 2.21 3.26

Table 20: Kurtosis B TABLES 114

B.2 Tables for New Zealand electricity price simulation

New Zealand: 30days 100traders 500speed 0,05iScale 120volatility

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 70.41 42.64 72.21 30.58 65.34 39.86 131.43 27 155.54 66.31 Final price 62.6 42.75 64.22 57.07 63.26 36.34 83.83 35.6 130.73 69.65 Final price Alt. 63.39 42.4 65.18 56.03 62.65 35.09 84.15 36.61 130.17 69.51

Table 21: Mean

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 53.87 12.64 36.25 4.48 9.5 7.64 31.76 10.33 48.66 60.57 Final price 7.28 10.44 7.02 11.6 7.45 5.68 20.73 8.55 44.86 47.47 Final price Alt. 7.88 11.15 7.67 9.8 6.78 6.09 22.04 9.1 45.73 47.4

Table 22: Standard Deviation

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 3.50 0.73 1.21 -0.81 0.78 0.94 1.33 -0.02 -0.45 4.2 Final price 1.42 -0.51 -0.19 -1.3 0.29 0.01 1.11 0 -0.46 2.22 Final price Alt. 0.82 -0.83 0.35 -1.48 -0.24 -0.09 1.13 0.34 -0.47 2.2

Table 23: Skewness

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 18.11 2.12 4.21 3.26 3.02 6.8 4.63 1.62 2.08 40.04 Final price 6.56 2.91 2.58 4.2 2.87 2.58 2.67 2.36 1.24 11.63 Final price Alt. 4.58 3.16 2.54 4.75 2.67 2.23 2.58 2.8 1.28 11.28

Table 24: Kurtosis B TABLES 115

New Zealand: 30days 100traders 1800speed 0,1iScale 120volatility

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 70.41 42.64 72.21 30.58 65.34 39.86 131.43 27 155.54 66.31 Final price 64.19 42.03 66.71 61.44 62.58 35.37 83.43 41.33 130.88 71.11 Final price Alt. 64.34 39.51 63.45 61.66 61.34 39.24 82.23 40.75 131.24 71.66

Table 25: Mean

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 53.87 12.64 36.25 4.48 9.5 7.64 31.76 10.33 48.66 60.57 Final price 8.47 10.05 10.65 13.47 6.57 8.35 21.22 6.85 45.18 50.69 Final price Alt. 7.63 11.16 11.84 12.45 8.08 8.71 23.94 12.26 48.82 51.33

Table 26: Standard Deviation

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 3.5 0.73 1.21 -0.81 0.78 0.94 1.33 -0.02 -0.45 4.2 Final price 0.27 0.25 0.72 -1.02 -0.37 0.95 1.39 0.01 -0.42 1.42 Final price Alt. -0.13 0.48 -0.07 -1.33 0.49 0.08 1.31 1.11 -0.4 1.19

Table 27: Skewness

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 18.11 2.12 4.21 3.26 3.02 6.8 4.63 1.62 2.08 40.04 Final price 2.02 2.29 4.74 3.57 2.95 4.21 4.03 2.07 1.37 20.36 Final price Alt. 2.52 2.6 0 2.32 4.04 2.76 2.46 3.61 4.9 0 1.32 22.21

Table 28: Kurtosis B TABLES 116

New Zealand: 90days 100traders 1800speed 0,1iScale 120volatility

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 23.7 35.78 122.48 26.17 48.39 37.55 116.96 51.47 166.27 66.31 Final price 76.34 43.88 90.31 51.2 66.06 36.76 92.09 50.46 102.65 69.82 Final price Alt. 74.26 50.28 86.6 49.73 58.31 42.99 99.07 47.09 105.92 71.77

Table 29: Mean

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 21.2 14.74 77.46 6.15 17.35 12.97 46.89 16.46 58.25 60.57 Final price 11.38 10.92 12.7 16.61 8.53 11.6 13.64 13.77 11.01 42.64 Final price Alt. 11.02 10.37 14.53 15.09 10.84 10.77 14.74 13.34 12.48 43.33

Table 30: Standard Deviation

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 0.89 3.11 0.57 -0.35 0.78 -1.06 0.95 0.1 -0.29 4.2 Final price -0.51 -0.59 3.45 -0.05 -0.47 -0.08 -0.05 0.38 -0.74 1.24 Final price Alt. -0.87 -0.01 2.37 0.05 -0.15 -0.15 -0.67 0.69 -0.5 1.24

Table 31: Skewness

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 2.59 15.11 1.89 2.99 5.22 4.06 4.2 2.23 2.31 40.04 Final price 4.66 2.63 24.7 1.53 3.19 2.46 4.53 2.52 6.78 4.74 Final price Alt. 4.68 3.89 18.45 2.00 2.48 2.59 4.98 3.65 4.61 4.83

Table 32: Kurtosis B TABLES 117

New Zealand: 30days 100traders 1800speed 0,15iScale 120volatility

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 70.41 42.64 72.21 30.58 65.34 39.86 131.43 27 155.54 66.31 Final price 59.89 40.05 62.27 56.47 60.1 33.35 82.31 36.63 128.56 68.42 Final price Alt. 61.61 41.54 61.68 56.9 60.76 34.35 81.01 35.63 126.87 68.83

Table 33: Mean

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 53.87 12.64 36.25 4.48 9.5 7.64 31.76 10.33 48.66 60.57 Final price 3.42 7.57 3.81 9.9 4.32 5.67 20.96 6.47 44.7 46.22 Final price Alt. 3.95 8.03 3.52 10.1 4.89 6.72 20.69 6.66 45.65 46.68

Table 34: Standard Deviation

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 3.5 0.73 1.21 -0.81 0.78 0.94 1.33 -0.02 -0.45 4.2 Final price 0.18 -0.48 0.13 -2.01 -0.1 0.37 1.17 0.39 -0.47 1.9 Final price Alt. -0.06 -0.67 -0.44 -1.87 0.35 -0.09 1.22 1.38 -0.46 1.9

Table 35: Skewness

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 18.11 2.12 4.21 3.26 3.02 6.8 4.63 1.62 2.08 40.04 Final price 2.07 2.16 2.15 6.19 2.3 3.02 2.68 2.48 1.26 7.44 Final price Alt. 1.99 3.03 2.5 5.4 2.28 2.78 2.74 5.3 1.25 7.54

Table 36: Kurtosis B TABLES 118

New Zealand: 30days 100traders 250speed 0,1iScale 180volatility

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 70.41 42.64 72.21 30.58 65.34 39.86 131.43 27 155.54 66.31 Final price 74.37 50.94 70.12 61.03 69.18 36.13 86.68 46.69 130.16 74.16 Final price Alt. 73.84 52.22 69.01 63.24 71.69 42.95 88.25 39.54 129.49 74.8

Table 37: Mean

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 53.87 12.64 36.25 4.48 9.5 7.64 31.76 10.33 48.66 60.57 Final price 11.29 14.36 10.95 14.86 12.6 13.16 22.57 11.68 48.75 50.59 Final price Alt. 12.4 13.76 10.29 18.26 11.6 9.58 21.77 12.75 44.44 51.56

Table 38: Standard Deviation

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 3.5 0.73 1.21 -0.81 0.78 0.94 1.33 -0.02 -0.45 4.2 Final price 0.46 0.12 0.25 -0.4 -0.98 0.38 0.99 1.43 -0.41 2.88 Final price Alt. -0.26 -0.13 0.11 -0.01 -0.32 -0.02 0.2 -0.35 -0.48 2.94

Table 39: Skewness

· 31 442 853 1264 1675 2086 2497 2908 3319 ToT Real price 18.11 2.12 4.21 3.26 3.02 6.8 4.63 1.62 2.08 40.04 Final price 3.13 2.71 2.37 2.51 3.58 2.73 2.84 6.69 1.35 22.89 Final price Alt. 3.78 2.36 2.17 2.51 2.32 3.75 2.13 2.3 1.51 23.68

Table 40: Kurtosis REFERENCES 119

References

[1] UNCTAD. Price formation in nancialized commodity markets: The role of in- formation. 2011.

[2] M.F.M. Osborne. Brownian motion in the stock market. Operations Research, 2:145173, 1959.

[3] P. Samuelson. Rational theory of warrant pricing, industrial management review. Industrial management review, 2:1339, 1965.

[4] Fischer Black and Myron Scholes. The pricing of options and corporate liabilities. The Journal of Political Economy, 81:637654, 1973.

[5] Robert. C. Merton. Option pricing when underlying stock returns are discontin- uous. Journal of , 3:125144, 1976.

[6] Robert. C. Merton. Optimus consumption and portofolio rules in a continuous time model. Journal of Economic, 3:373413, 1971.

[7] R. Gibson and E. Schwartz. Stochastic convenience yield and the pricing of oil contingent claims. The Journal of Finance, 45:959976, 1990.

[8] Eduardo S. Schwartz. The stochastic behavior of commodity prices:implications for valuation and hedging. The Journal of Finance, LII:923973, 1997.

[9] Jimmy E. Hilliard and Jorge Reis. Valuation of commodity futures and options under stochastic convenience yields, interest rates, and diusion in the spot. The Journal of Financial and Quantitative Analysis, 3:6186, 1998.

[10] Shijie Deng. Stochastic models of energy commodity prices and their applications: Mean-reversion with jumps and spikes. In part of POWER, 2000.

[11] K. Miltersen and E. Schwartz. Pricing of options on commodity futures with stochastic term structures of convenience yields and interest rates. Journal of Financial and Quantitative Analysis, 33:3359, 1998.

[12] Paul L. Fackler and Matthew C. Roberts. A term structure model for agricultural futures. In American Agricultural Economics Association Meeting Nashville, 1999.

[13] E. Schwartz and James E. Smith. Short-term variations and long-term dynamics in commodity prices. Management Science, 46:893911, 2000.

[14] R. Holley and T.M. Liggett. Ergodic theorems for weakly interacting innite systems and the voter model. The Annals of Probability, 3:643663, 1975. REFERENCES 120

[15] T.E. Harris. Contact interactions on a lattice. The Annals of Probability, 2:969 988, 1974.

[16] Liggett. Stochastic models of interacting system. The Annals of Probability, 25:1 29, 1997.

[17] T.M. Liggett. Interacting particle systems-an introduction. 2002.

[18] T.M. Liggett. Stochastic models for large interacting systems and related corre- lation inequalities. In Inaugural Articles, 2010.

[19] Daniela Morale, Vincenzo Capasso, and K Oelschlager. An interacting particle system modeling aggregation behavior: from individuals to populations. Journal of Ma- thematical Biology, 50:4966, 2005.

[20] Daniela Morale and Vincenzo Capasso. Asymptotic behavior of a system of stochastic particles subject to non local interactions. Stochastic Analysis and Applications, 27:574  603, 2009.

[21] Matylda Jablonska. From uid dynamics to human psychology. what drives nan- cial markets towards extreme events. Doctoral dissertation 2011, Lappeenranta University of Technology, Finland, 2011.

[22] Matylda Jablonska and Tuomo Kauranne. Multi-agent stochastic simulation for the electricity spot market price. Lecture Notes in Economics and Mathematical Systems, 652:314, 2011.

[23] M. Jablonska and T. Kauranne. Animal spirits in population spatial dynamics. In Conf. on Parallel Problem Solving from Nature, 2012.

[24] L. S. Ornstein and G. E. Uhlenbeck. On the theory of the brownian motion. Physical Review, 36:823841, 1930.

[25] L. de Haan and R.L. Karandikar. Embedding a stochastic dierence equation into a continuous time process. Stochastic Processes and their Applications, 32:225 235, 1998.

[26] Anita Diana Behme. Generalized Ornstein-Uhlenbeck Processes and Extensions. PhD thesis, Technische Universita¨t Carolo-Wilhemina zu Braunschweig, 2011.

[27] Fred Espen Benth and Asma Khedher. Weak stationarity of ornstein-uhlenbeck processes with stochastic speed of mean reversion. 2013.

[28] Manuel O Caceres and Adrian A Budini. The generalized ornstein uhlenbeck process. 1997. REFERENCES 121

[29] John M. Keynes. The General Theory of Employment, Interest, and Money. Utet, 1936.

[30] Anjum Muhammad. Simulating the dynamics of silver market using computational market dynamics. Master's thesis, Lappeenranta University of Technology, 2015.

[31] Heinz-Otto Kreiss and Jens Lorenz. Initial-boundary value problems and the navier-stokes equations. In inc Accademic press, editor, Pure and Applied Mathe- matics, volume 136. Harconl-t Brace Jovanovich 1989.

[32] E. Hopf. The partial dierential equation ut + uux = uxx. Communications on Pure and Applied Mathematics, 3:201230, 1950.

[33] Alvaro H. Salas and Cesar A. Gomez. Application of the cole-hopf transformation for nding exact solutions to several forms of the seventh-order kdv equation. Mathematical Problems in Engineering, 2010, 2010.

[34] J. Wu and W. Yang. On stochastic dierential equations and a generalized burgers equation. Mathematics Subject Classication, 2000.

[35] J. Wu A. Truman, F. Wang and W. Yang. A link of stochastic dierential equations to nonlinear parabolic equations. SCIENCE CHINA Mathematics, 55, 2012.

[36] S. Hodges and A. Carverhill1993. Quasi mean reversion in an ecient stock mar- ket: the characterisation of economic equilibria which support black-scholes option pricing. The Economic Journal, 103:395405, 1993.

[37] M. Bossy and D. Talay. Convergence rate for the approximation of the limit law of weakly interacting particles2: Application to the burgers equation. INRIA, 6, 1994.

[38] M. Bossy and D. Talay. Convergence rate for the approximation of the limit law of weakly interacting particles: Application to the burgers equation. INRIA, 6, 1996.

[39] M. Bossy and D. Talay. A stochastic particle method for the mckean-vlasov and the burgers equation. Mathematics of Computation, 66:157192, 1997.

[40] Nigel R. Franks Iain D. Couzin, J. Krause and Simon A. Levin. Eective leadership and decisionmaking in animal groups on the move. Nature Publishing Group, 433:513516, 2005.

[41] Karl Oelschla¨ger. On the derivation of reaction-diusion equations as limit dynam- ics of systems of moderately interacting stochastic processes. and Related Fields, 82:565  586, 1989. REFERENCES 122

[42] Karl Oelschla¨ger. Large systems of interacting particles and the porous medium equation. Journal of dierential equations, 88:294  346, 1990.

[43] Vincenzo Capasso and David Bakstein. An Introduction to Continuous-Time Stochastic Processes. Birkhäuser, 2012.

[44] J. L. Doob. The brownian moviments and stochastic equations. Annals of Math, 43:351369, 1942.

[45] Olle Holmberg Ola Andersson and Mats Hansson. Arma and garch models for silver, nickel and copper price returns. Bachelor's thesis, LUND university, 2015.

[46] Darrell Due and Rui Kan. A yield-factor model of interest rates. , 6:376406, 1996.

[47] M. Brennan and E. Schwartz. A continuous time approach to the pricing of bonds. Journal of Banking and Finance, 3:133155, 1979.

[48] V. Capasso and D. Morale. Resolving stochastic processes: Asymptotics. In Vincenzo Capasso and Mirosˆ aw Lachowicz, editors, Multiscale Problems in the Life Sciences/Lectures Notes in Mathematics, chapter 2, pages 91146. Springer, 2008.

[49] V. Capasso and D. Morale. Ant colonies: a nature inspired paradigm for the mathematical modelling of self-organizing systems. In J. Periaux V.Capasso, edi- tor, Multidisciplinary Methods for Analysis, Optimization and Control of Complex Systems/Mathematics in Industry series, pages 195216. Springer-Verlag, 2004.

[50] Roger J-B Wets and Ignacio Rios. Modeling and estimating commodity prices:copper prices. Mathematics and Financial Economics, 9:247  270, 2012.

[51] R. Holley and T.M. Liggett. Ergodic theorems for the asymmetric simple exclusion process. The Annals of Probability, 5:795801, 1977.

[52] Tim Bollerslev. Generalized autorregressive conditional heteroskedasticity. Jour- nal of Econometrics, 31:307327, 1986. LIST OF TABLES 123

List of Tables

1 Mean...... 108

2 Standard Deviation ...... 109

3 Skewness ...... 109

4 Kurtosis ...... 109

5 Mean...... 109

6 Standard Deviation ...... 110

7 Skewness ...... 110

8 Kurtosis ...... 110

9 Mean...... 110

10 Standard Deviation ...... 111

11 Skewness ...... 111

12 Kurtosis ...... 111

13 Mean ...... 111

14 Standard Deviation ...... 112

15 Skewness ...... 112

16 Kurtosis ...... 112

17 Mean ...... 112

18 Standard Deviation ...... 113

19 Skewness ...... 113

20 Kurtosis ...... 113

21 Mean ...... 114 LIST OF TABLES 124

22 Standard Deviation ...... 114

23 Skewness ...... 114

24 Kurtosis ...... 114

25 Mean ...... 115

26 Standard Deviation ...... 115

27 Skewness ...... 115

28 Kurtosis ...... 115

29 Mean ...... 116

30 Standard Deviation ...... 116

31 Skewness ...... 116

32 Kurtosis ...... 116

33 Mean ...... 117

34 Standard Deviation ...... 117

35 Skewness ...... 117

36 Kurtosis ...... 117

37 Mean ...... 118

38 Standard Deviation ...... 118

39 Skewness ...... 118

40 Kurtosis ...... 118 LIST OF FIGURES 125

List of Figures

1 Paths of the exact solution of the Geometric Brownian motion (1) with

r = 0.3, σ = 0.4 and initial value S0 = 4.5 ...... 9

2 Paths of the exact solution of the SDE (3), in 2a with a Poisson noise and in 2b without it...... 11

3 Trajectories of an Ornstein Uhlenbeck process tends to mean 0 as t −→ ∞ The blue lines are the OU simulations made using dierent initial val-

ues as x0 = −6, −3, 2, 6 and mean reversion speed ρ = 0.8 and volatility σ = 0.2. The green lines are the mean behaviour E[X(t)]of each OU simulation which goes to zero (red line)...... 20

4 Simulations on variation of σ...... 22

5 Simulations on variation of ρ...... 22

6 Silver data prices line chart ...... 26

7 Silver data simulations at dierent times, Hb is the variable counting days from the beginning of the data ...... 27

8 Root mean square error...... 28

9 Silver data simulations at dierent times Hb...... 28

10 Root mean square error...... 29

11 New Zealand electricity spot prices line chart...... 30

12 New Zealand electricity data simulations at dierent times Hb...... 31

13 Root mean square error...... 31

14 New Zealand electricity data simulations at dierent times Hb...... 32

15 Root mean square error...... 32

16 Silver, real and simulated prices ...... 77

17 Root mean square error ...... 77 LIST OF FIGURES 126

18 Silver, real and simulated prices ...... 78

19 Root mean square error ...... 79

20 Silver, real and simulated prices ...... 79

21 Root mean square error ...... 80

22 Silver, real and simulated prices ...... 80

23 Root mean square error ...... 81

24 Silver, real and simulated prices ...... 81

25 Root mean square error ...... 82

26 New Zealand, real and simulated prices ...... 83

27 Root mean square error ...... 83

28 New Zealand, real and simulated prices ...... 84

29 Root mean square error ...... 85

30 New Zealand, real and simulated prices ...... 85

31 Root mean square error ...... 86

32 New Zealand, real and simulated prices ...... 86

33 Root mean square error ...... 87

34 New Zealand, real and simulated prices ...... 87

35 Root mean square error ...... 88

36 Silver data simulations at dierent times Hb made with the Jablonska individual based model...... 90

37 Root mean square error...... 90

38 Silver data simulated at each 30 days with the stochastic interacting

traders model, γN = 15, N = 100, β = 0.05 and σ = 1 ...... 91 LIST OF FIGURES 127

39 Root mean square error for Silver data with the two dierent kernels. . 91

40 New Zealand electricity data simulations at dierent times Hb made with the individual besed model...... 92

41 Root mean square error...... 92

42 New Zealand data simulated at each 30 days with the stochastic inter-

acting traders model, γN = 2, N = 100, β = 0.1 and σ = 120 ...... 93

43 Root mean square error for New Zealand electricity data with the two dierent kernels...... 93