search for: iplusless1

Displaying 1 result from an estimated 1 matches for "iplusless1".

2012 Feb 21
0
BHHH algorithm on duration time models for stock prices
...terations: 0 Return code: 100 Initial value out of range. I don't know this is so because of the way i have written my loglikelihood or what. The loglikelihood LogLik<-function(param){ beta_1<-param[1] beta_2<-param[2] beta_3<-param[3] beta_4<-param[4] lambda.plus<-beta_1*Iplusless1 + beta_2*Iminusless1 lambda.minus<-beta_3*Iplusless1 + beta_4*Iminusless1 sum(Iplus_new*log(lambda.plus))-sum(log(lambda.plus)*x_new) + sum(Iminus_new*log(lambda.minus))-sum(log(lambda.minus)*x_new) } The gradients gradient<-function(param){ beta_1<-param[1] beta_2<-param[2] beta_3&l...