Forum Navigation: Select WHO'S ON: 04:10 AM Wilmott / BookMap Competition General Forum Technical Forum Economics Forum Numerical Methods Forum Trading Forum The Quantitative Finance FAQs Proje... Student Forum Book And Research Paper Forum Programming and Software Forum The Quantitative Finance Code Libra... Careers Forum Events Board Brainteaser Forum Off Topic Forum and Website Bugs and Suggesti...

 new topic
 search
 bookshop
 jobs board
 news
 help
 file share
 audio visual
 articles
 blogs
 wiki
 forums
 home

 FORUMS > Student Forum < refresh >
 Topic Title: simulating a Jump diffusion process Created On Mon Aug 21, 06 02:22 PM Topic View: Branch View Threaded (All Messages) Threaded (Single Messages) Linear

tibbar
Senior Member

Posts: 542
Joined: Nov 2005

Mon Aug 21, 06 02:22 PM

any ideas on how to do this?

crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Mon Aug 21, 06 03:07 PM

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..."

horacioaliaga
Senior Member

Posts: 266
Joined: Aug 2005

Tue Aug 22, 06 03:17 AM

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.

tibbar
Senior Member

Posts: 542
Joined: Nov 2005

Tue Aug 22, 06 02:35 PM

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?

crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Tue Aug 22, 06 03:44 PM

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..."

crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Tue Aug 22, 06 03:47 PM

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..."

tibbar
Senior Member

Posts: 542
Joined: Nov 2005

Tue Aug 22, 06 10:05 PM

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/

mj
Senior Member

Posts: 3406
Joined: Dec 2001

Tue Aug 22, 06 11:17 PM

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

-------------------------
More mathematical finance is now available from amazon and Barnes and Noble.

www.markjoshi.com/more

The second edition of Quant Job Interview Questions and Answers is now out.

IAmEric
Member

Posts: 178
Joined: Apr 2002

Tue Aug 22, 06 11:55 PM

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...

crocodile
Junior Member

Posts: 12
Joined: Aug 2006

Wed Aug 23, 06 03:38 PM

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..."

asd
Senior Member

Posts: 662
Joined: Aug 2002

Thu Aug 24, 06 12:23 AM

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

nicobyron
Member

Posts: 51
Joined: Feb 2003

Mon Aug 28, 06 07:25 AM

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