Jump Diffusion

From ThetaWiki

Jump to: navigation, search

Contents

Overview

Merton Jump-Diffusion is an extension to the Black-Scholes Option Pricing where the underlying asset can exhibit jumps. This means that future stock prices are not predictable and that the asset evolves as

dSt = μStdt + σStdWt + (η − 1)dq

where μ is the drift rate, σ the volatility of S and dWt the increment of a Wiener process. The independent Poisson process dq has a value of 1 with probability λdt and 0 otherwise.

Process simulation

Implementation as ThetaScript

ThetaScript implementation of the Merton Jump-Diffusion Model.

Model JD
	%Jump diffusion model for stock price movement.
	import So 	"Initial Stock price"
	import EURo 	"Initial Numerai"
	import r 	"Risk free rate"
	import vola 	"Volatility"
	import lambda 	"Jump Intensity"
	import nu 	"mean of jumps"
	import delta 	"std. of jumps"
 
	export S 	"Stock price"
	export EUR 	"Numeraire"
 
	S=So
	EUR=EURo
	fork 
	    loop inf
	      theta $dt
	      EUR=EUR*exp(-r*$dt)
	      P=poissrnd(lambda*$dt,size(rand()))
	      U=exp(P*nu+sqrt(P)*delta*randn())
	      S=S*exp((r-lambda*(exp(nu+0.5*delta^2)-1)-0.5*vola^2)*$dt+vola*sqrt($dt)randn())*U
	    end
	end
end

Note that this implementation requires the Matlab statistics toolbox.

Implementation as Theta.m

Here is an implementation as a Theta.m function without using the Matlab statistics toolbox:

function state = Theta(dt, state)
 
if nargin == 0
    state.S.value = 100;
    state.EUR.value = 1;
else
    r = 0.05;
 
    mu1= -0.2;
    lambda=0.1;
    sigma = 0.2;
    gamma=0.45;
 
    mu = r -(exp(mu1+0.5*gamma^2)-1) * lambda;
 
    max_dt=lambda;
    n=max(dt/max_dt,1);
 
    sub_dt = dt/n;
    dq = zeros(size(state.S));
    for i=1:n
 
        jumpsize=mu1+gamma*randn(size(state.S));%  
 
        u=rand(size(state.S));
 
        dq(u<lambda*sub_dt) = dq(u<lambda*sub_dt)+jumpsize(u<lambda*sub_dt);
    end    
 
    state.S = state.S .* exp((mu-0.5*sigma^2)*dt + sqrt(dt)*sigma*randn(size(state.S))+dq);
    state.EUR = state.EUR* exp(-r*dt);
end

Analytic pricing of European calls

A market model with an underlying which follows a Merton jump diffusion has analytical solutions for European call and put options. Below is a Matlab implementation of the analytical solution for European calls.

function c=CPMertonJD
% function c=CPMertonJD calculates the analytical price 
% of a European call under jump diffusion.
 
    So=100;   % Initial Stock price
    X=100;    % Strike
    T=1;      % Time to maturity
    delta=0.4;% std of lognormal jump process
    nu=0;     % mean of lognormal jump process
    lambda=5; % intensity of jumps
    vola=0.4; % vola of stock price
    r=0.05;   % interest rate
 
    % The price is gven as a series of terms, 
    % compute the first N terms for the result
    N=50;    
    K=exp(nu+0.5*delta^2)-1;
    c=0;
    for n=0:N
         sigma_n=sqrt(vola^2+n*delta^2/T);
         r_n=r-lambda*K+n*log(1+K)/T;
         d1=(log(So/X)+(r_n+0.5*sigma_n^2)*T)/(sigma_n*sqrt(T));
         d2=d1-sigma_n*sqrt(T);
         f_n=So*normcdf(d1,0,1)-X*exp(-r_n*T)*normcdf(d2,0,1);
         c=c+exp(-lambda*(1+K)*T)*(lambda*(1+K)*T)^n*f_n/factorial(n);
    end

Some observations about Monte Carlo convergence:

  1. The error decreases with increasing number of paths.
  2. The error is less if the variance of the jump-size is less.
  3. If the jump intensity (lambda) is high, then the error decreases at lesser rate with increasing number of paths.
Personal tools