Hi,


I have been using maxLik to do some MLE of Geometric Brownian Motion Process 
and everything has been going fine, but know I have tried to do it with jumps. 
I have create a vector of jumps and then added this into my log-likelihood 
equation, know I am getting a message:

NA in the initial gradient

My codes is hear

#
n<-length(combinedlr)
j<-c(1,2,3,4,5,6,7,8,9,10)
gbmploglik<-function(param){
        mu<-param[1]
        sigma<-param[2]
        lamda<-param[3]
        nu<-param[4]
        gama<-param[5]
        logLikVal<- - n*lamda - .5*n*log(2*pi) + sum(log(sum(for(j in 
1:10)(cat((lamda^j/factorial(j))*(1/((sigma^2+j*gama^2)^.5)*exp( - 
(combinedlr-mu-j*nu)^2/2*(sigma^2+j*gama^2))))))))
        logLikVal
}
rescbj<- maxLik(gbmploglik, grad = NULL, hess = NULL, start=c(0,1,1,1,1), 
method = "Newton-Raphson")
summary(rescbj)
#

I am also was wondering if anyone know if there was a package that dealt with 
Geometric Brownian Motion Process augmented with jumps. Then I could just put 
that into my code and might resolve the issue. 

Any suggest as to how to resolved this issue, are greatly apprecaited.

Yours truly,

JP

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to