Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#This is the code for the negative log likelihood function
#for the JUmp-difusion model
mu=w[1] # drift
s=(w[2]) # diffsuive vol
lam=(w[3]) # jump frequency
mu_j=w[4] # jump size
s_j=(w[5]) # jump volatility
#Case where there are no jumps
#The mixture is cut off at 10
for(n in 1:10)
m=m+dnorm(x,mean=(mu*delta+n*mu_j),sd=sqrt(s^2*delta+s_j^2*n))*dpois(n,lam*delta) #likelihood
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.