fit.NH {QRMlib} | R Documentation |
fits univariate NIG or hyperbolic distribution
fit.NH(data, case="NIG", symmetric=FALSE, se=FALSE)
data |
vector of data |
case |
whether NIG ("NIG") or hyperbolic ("hyp"); default is NIG |
symmetric |
whether symmetric or asymmetric; default is FALSE |
se |
whether standard errors should be calculated |
See pages 78-80 of QRM. Case ‘NIG’ sets lambda to -1/2; case ‘hyp’ sets lambda to 1; no other cases are allowed.
list containing parameter estimates, standard errors and details of fit
documentation by Scott Ulman for R-language distribution
data(DJ); Ret.DJ <- mk.returns(DJ); window1.start <- timeDate("01/01/1993", format="%m/%d/%Y"); window1.end <- timeDate("12/31/2000",format="%m/%d/%Y"); sample1 <- (seriesPositions(Ret.DJ) > window1.start & seriesPositions(Ret.DJ) < window1.end); DJ30daily <- Ret.DJ[sample1,]; DJ30daily <- 100*seriesData(DJ30daily); rseries <- DJ30daily[,"MSFT"]; mod.NIG <- fit.NH(rseries);