Forum Navigation:

magazine

FORUMS > Student Forum < refresh >
Topic Title: simulating a Jump diffusion process
Created On Mon Aug 21, 06 02:22 PM
Topic View:

View thread in raw text format


tibbar
Senior Member

Posts: 542
Joined: Nov 2005

Mon Aug 21, 06 02:22 PM
User is offline

any ideas on how to do this?
 
Reply
   
Quote
   
Top
   
Bottom
     



crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Mon Aug 21, 06 03:07 PM
User is offline View users profile


Check

Glassermann, [Monte Carlo Methods in Financial Engineering, Springer 2003],

quite useful with algorithms well documented and explained.

-------------------------
"Thatīs the problem with randomness, you can never be sure..."
 
Reply
   
Quote
   
Top
   
Bottom
     



horacioaliaga
Senior Member

Posts: 315
Joined: Aug 2005

Tue Aug 22, 06 03:17 AM
User is offline View users profile

check below:

double Saux = S;
for(j=0;j<=points_curve;j++)
{
times[j]=(double)(delta_time*j);
double dwt=pol_mas(delta_time);
Wt=Wt+dwt;
double aux = rand();
if(aux<lambda*delta_time){
Saux = Saux*J;
}
Xt = Saux * Math.exp(((r-q)-0.5*sigma*sigma)*times[j]+sigma*Wt);
}

Where pol_mas(dt) returns a gaussian random distribited variable with variance dt. The parameter lambda * delta_time is the probability that the jump happens at time t.
 
Reply
   
Quote
   
Top
   
Bottom
     



tibbar
Senior Member

Posts: 542
Joined: Nov 2005

Tue Aug 22, 06 02:35 PM
User is offline

great thanks a lot!

i've used that eulerian approx for simulating diffusion before, just wasn't sure if you could take same approach for jumps.

btw is there a more exact method of simulating diffusion processes other than this euler approach?
 
Reply
   
Quote
   
Top
   
Bottom
     



crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Tue Aug 22, 06 03:44 PM
User is offline View users profile

Here is a matlab code using noncentral-Chi-squared transition probabilities.
Itīs a bit slower than the Euler approach, but theoretically there is no discretization error.
I double checked it with a closed form solution and there are miniscule aberrations, but these might be due to rounding errors.

Here we go:
>>>>>>>>>>>>


function [lambda]=CIR(lambda0,kappa,theta,sigma,delta,T)
%generates CIR path for equidistant 1:t+1=T
t=T/delta;
lambda=ones(t+1,1);
lambda(1,1)=lambda0;
d=(4*kappa*theta)/sigma^2;
if d>1;
for i=1:t;
c=sigma^2*(1-exp(-kappa*(delta)))/(4*kappa);
L=lambda(i,1)*(exp(-kappa*(delta)))/c;
N=normrnd(0,1);
CIR=chi2rnd(d-1);
lambda(i+1,1)=c*([N+sqrt(L)]^2+CIR);
end
else;
for i=1:t;
c=sigma^2*(1-exp(-kappa*(delta)))/(4*kappa);
L=lambda(i,1)*(exp(-kappa*(delta)))/c;
N=poissrnd(L/2);
CIR=chi2rnd(d+2*N);
lambda(i+1,1)=c*CIR;
end
end
plot(lambda)

>>>>>>>>>>>>
Hope this helps.

-------------------------
"Thatīs the problem with randomness, you can never be sure..."
 
Reply
   
Quote
   
Top
   
Bottom
     



crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Tue Aug 22, 06 03:47 PM
User is offline View users profile


Ooops, I forgot you asked for a CIR with jumps, so scratch that post, itīs for non-jump processes only.

Sorry for the waste of bandwidth

-------------------------
"Thatīs the problem with randomness, you can never be sure..."
 
Reply
   
Quote
   
Top
   
Bottom
     



tibbar
Senior Member

Posts: 542
Joined: Nov 2005

Tue Aug 22, 06 10:05 PM
User is offline

actually, that's quite useful. do you have a reference for it?

i've found these notes very handy: http://www.stats.uwaterloo.ca/~dlmcleis/s906/
 
Reply
   
Quote
   
Top
   
Bottom
     



mj
Senior Member

Posts: 3420
Joined: Dec 2001

Tue Aug 22, 06 11:17 PM
User is offline View users profile

i discuss simulating jump diffusion in the Concepts and practice of mathematical finance


-------------------------
Course on Kooderive -- GPU programming with 100 times speed up in October 2014. www.markjoshi.com
 
Reply
   
Quote
   
Top
   
Bottom
     



IAmEric
Member

Posts: 178
Joined: Apr 2002

Tue Aug 22, 06 11:55 PM
User is offline View users profile

This is probably either well-known or possibly false, but I think you can also simulate a jump diffusion process on a grid consisting of a normal tree for the diffusion part while the jump can be accounted for by stacking a bunch of trees. So, for example, if the tree lays in the xy-plane, then at each node, it is as if you had a 1-d finite difference along the z-axis. Another way to visualize the grid is as a 3-d cubic grid tilted at 45 degrees in the xy-plane.

I outlined why I think this should work here, which may or may not be correct. Just something to maybe think about. I am probably confused...
 
Reply
   
Quote
   
Top
   
Bottom
     



crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Wed Aug 23, 06 03:38 PM
User is offline View users profile



Itīs in the book I refered to earlier. Very intuitive setup with examples of algorithms. Donīt have a web ressource for it, maybe you can find a Glassermann paper where itīs included.


Iīm pretty sure the Cox-Ingersoll-Ross(1985) paper proves the non-central-chi-square for affine processes without jumps. Donīt have it handy,though.

Singleton [Estimation of Affine Asset Pricing Models Using the Empirical Characteristic function, 1997] (do a google search)
uses results and extends in the context of estimating parameters for jump-type diffusion. To do so he derives transition probabilities.
Same with
Duffie, Pan, Singleton [Transform Analysis and Asset Pricing for Affine Jump Diffusions, 2000] Econometrica 68, 1343-1376

They are all rather technical and tips for implementation are not part of the papers. The transition probs are derived, though.


-------------------------
"Thatīs the problem with randomness, you can never be sure..."
 
Reply
   
Quote
   
Top
   
Bottom
     



asd
Senior Member

Posts: 662
Joined: Aug 2002

Thu Aug 24, 06 12:23 AM
User is offline

Not sure if VG comes under Jump diffusion models, incase you want to simulate VG process Weber's paper has nice details for MC simulation algorithm

-------------------------
Life is a journey and not a destination
quant code directory
 
Reply
   
Quote
   
Top
   
Bottom
     



nicobyron
Member

Posts: 51
Joined: Feb 2003

Mon Aug 28, 06 07:25 AM
User is offline

Hi,
an easy way to simulate jump-diffusion stochastic differential equations is to implement a so called jump-adapted scheme. The idea relies on a jump adapted time discretization, that means you add the jump times to an equidistant time discretization. Then you apply a scheme for diffusion and you adjust for the jump when you encounter a jump time. In this way you can develop shemes with any order of strong or weak convergence and therefore more accurate than the Euler scheme.
If you have high intensity, jump-adapted schemes may be too slow, so it is more efficient to implement regular schemes.
I have some articles on this topic, with details also on high order regular schemes,
jump-diffusion simulation
 
Reply
   
Quote
   
Top
   
Bottom
     

View thread in raw text format
FORUMS > Student Forum < refresh >

Forum Navigation:

© All material, including contents and design, copyright Wilmott Electronic Media Limited - FuseTalk 4.01 © 1999-2014 FuseTalk Inc. Terms & Conditions