AngeValli / Discretisation-of-Stochastic-Differential-Equation

Main code in C++ and graphs in Pylab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discretisation-of-Stochastic-Differential-Equations

Main code in C++ and graphs in Pylab

Objectives

The goal of this project is to implement and compare the Euler schema and the Milshtein schema on the Black-Scholes model. We denote the time horizon, we have the following :

The discretisation step is with .

The k-th discretisation step is with .

Strong convergence

We consider the Black-Scholes model :

We can do the exact simulation of the underlying using the same brownian increments than the ones used for the generation of the discretised processes.

The values of the underlying are as follows :

  • Exact solution :
  • Euler schema :
  • Milshtein schema :

The vitfort.cpp file computes the simulation using those equations and write the results in the vitfort.csv file. Then, the file plot_vitfort.py loads this result and plot it using Pylab.

Theoretically, the quantity

depends on and the quantity

depends on .

Weak convergence

Weak speed

Now, we focus our study on the weak speed of Euler and Milshtein schemas to compute a European Put of maturity in the Black-Scholes model.

We want to identify the dependance in of the quantities and .

We first compute with Black-Scholes formula and then we can approach this expectation with a Monte-Carlo simulation, using the same brownian increments to compute and .

This is a variance reduction technique by control variates method.

The vitfaible.cpp file computes the simulation using those equations and write the results in the vitfaible.csv file. Then, the file plot_vitfaible.py loads this result and plot it using Pylab.

The theoretical behavior of is to be dependent of .

As we conduct our study in the context of the Black-Scholes model, the coefficients and are constants about the time, which leads to the hypothesis for both weak and strong speed to be always verified. Therefore, the model is too general to distinguish between both methods.

Romberg's extrapolation

This section focus on the study of the acceleration of weak convergence by Romberg's extrapolation method. We denote respectively and for Euler schemas at time steps and and and for Milshtein schemas at time steps and .

We evaluate the following quantities, respectively for Euler and Milshtein schemas :

As the previous sections, we keep the same brownian increments for all terms in the expectation to reduce the variance.

The evolution equations are the following :

The romberg.cpp file computes the simulation using those equations and write the results in the romberg.csv file. Then, the file plot_romberg.py loads this result and plot it using Pylab.

As there are more quantities to compute regarding the previous methods, the execution time of this code is higher.

About

Main code in C++ and graphs in Pylab


Languages

Language:C++ 73.1%Language:Python 26.9%