Monte Carlo methods Previously Monte Carlo integration Interpretation

  • Slides: 11
Download presentation
Monte Carlo methods

Monte Carlo methods

Previously… �Monte Carlo integration – Interpretation of the integrand as expected value

Previously… �Monte Carlo integration – Interpretation of the integrand as expected value

Previously… � 1 D example: p has uniform distribution (its density function is constant

Previously… � 1 D example: p has uniform distribution (its density function is constant 1/(b-a) in [a, b], zero otherwise)

Stochastic differential equations �A differential equation is an equation that relates some function with

Stochastic differential equations �A differential equation is an equation that relates some function with its derivatives. The Bessel differential equation is the linear second-order ordinary differential equation

Stochastic differential equations �A differential equation in which one ore more of the terms

Stochastic differential equations �A differential equation in which one ore more of the terms is a stochastic process Black–Scholes equation

Stochastic differential equations �Black–Scholes equation Modeling stock prices St: stock price at a given

Stochastic differential equations �Black–Scholes equation Modeling stock prices St: stock price at a given time d. St: change of the stock price : deterministic yield, a stochastic drift : random change in the price caused by an independent effect, is the volatility

Stochastic differential equations �Black–Scholes equation

Stochastic differential equations �Black–Scholes equation

Stochastic differential equations is a stochastic process with normal distribution and with zero expected

Stochastic differential equations is a stochastic process with normal distribution and with zero expected value �We have uniform random variables �They shall be transformed �

Stochastic differential equations __kernel void random. LCG(const int random. Numbers, __global float* randoms. Seed,

Stochastic differential equations __kernel void random. LCG(const int random. Numbers, __global float* randoms. Seed, __global float* random. GPU) { int id = get_global_id(0); int max. ID = get_global_size(0); uint rng = randoms. Seed[id]; for(int i=0; i < random. Numbers; ++i) { float u = (float)step. LCG(&rng, 1664525, 1013904223 UL) / 0 xffff; float v = (float)step. LCG(&rng, 1664525, 1013904223 UL) / 0 xffff; } } random. GPU[id + i * max. ID] = sqrt(-2. 0 f * log(v)) * cos(2. 0 f * M_PI * u);

Stochastic differential equations �Monte Carlo simulation Calculation of independent trajectories Calculate the expected value

Stochastic differential equations �Monte Carlo simulation Calculation of independent trajectories Calculate the expected value Calculate the variance

Stochastic differential equations

Stochastic differential equations