[R-SIG-Finance] rmgarch DCC likelihood

alexios galanos @|ex|o@ @end|ng |rom 4d@c@pe@com
Tue Oct 29 05:22:55 CET 2019


Not sure I've understood you correctly. Here is what a reproducible 
example would look like:
##################
library(rmgarch)
data("dji30ret")
rX <- as.xts(dji30ret[,1:2])
colnames(rX)[1] <- "rDAT1"
colnames(rX)[2] <- "rDAT2"
ug_spec = ugarchspec()
ug_spec <- ugarchspec(mean.model=list(armaOrder=c(0,0),include.mean = 
FALSE))

ugfit1 = ugarchfit(spec = ug_spec, data = rX[,1])
ugfit2 = ugarchfit(spec = ug_spec, data = rX[,2])

uspec.n = multispec(replicate(2, ugarchspec(mean.model = list(armaOrder 
= c(0,0),include.mean = FALSE))))

# using scale=1 as in the internal call of multifit
multf = multifit(uspec.n, rX, fit.control=list(scale=1))
spec1 = dccspec(uspec = uspec.n, dccOrder = c(1, 1), distribution = 
'mvnorm')

rbind(likelihood(multf), cbind(likelihood(ugfit1), likelihood(ugfit2)))

          [,1]     [,2]
[1,] 13802.48 13959.91
[2,] 13802.48 13959.91

fit1 = dccfit(spec1, data = rX, fit.control = list(eval.se = 
TRUE),solver.control= list(trace=TRUE), fit = multf)

fit2 = dccfit(spec1, data = rX, fit.control = list(eval.se = 
TRUE),solver.control= list(trace=TRUE))
##################

Are you saying that these two are different?

 > cbind(likelihood(fit1),likelihood(fit2))
          [,1]     [,2]
[1,] 28153.17 28153.17


As to the "full log-likelihood" function, again I am unclear what it is 
you are stating. The function (log likelihood) to be optimized excludes 
constant values which are only included at the end to compose the full 
log likelihood.


Alexios

On 10/28/19 1:00 PM, Berk Koralp wrote:
> Hi,
> 
> 
> 
> When Tracing is on, the iteration steps show a different function value than the full log-likelihood function.
> 
> So full log-likelihood doesn’t get sent to the optimizer here.
> 
> 
> 
> The correlation component -0.5*[log(det(Rt))+(Z*(inv(Rt)*trans(Z)))] gets close to this traced function value but it seems to be always slightly off.
> 
> 
> 
> Where`s this difference coming from?
> 
> 
> 
> I used the optimal parameters produced by rugarch and rmgarch to replicate the model myself, and obtained the exact same individual likelihoods , and hence the same llh sum.
> 
> But removing components and leaving only correlation part doesn’t seem to match the traced function value.
> 
> 
> 
> Any help would be greatly appreciated.
> 
> 
> 
> Best,
> 
> 
> 
> Berk.
> 
> 
> 
> 
> 
> Specs are as follows:
> 
> 
> rX <- data.frame(rDAT1,rDAT2)
> 
> names(rX)[1] <- "rDAT1"
> 
> names(rX)[2] <- "rDAT2"
> 
> ug_spec = ugarchspec()
> 
> ug_spec <- ugarchspec(mean.model=list(armaOrder=c(0,0),include.mean = FALSE))
> 
> ugfit1 = ugarchfit(spec = ug_spec, data = rDAT1)
> 
> ugfit2 = ugarchfit(spec = ug_spec, data = rDAT2)
> 
> uspec.n = multispec(replicate(2, ugarchspec(mean.model = list(armaOrder = c(0,0),include.mean = FALSE))))
> 
> multf = multifit(uspec.n, rX)
> 
> spec1 = dccspec(uspec = uspec.n, dccOrder = c(1, 1), distribution = 'mvnorm')
> 
> fit1 = dccfit(spec1, data = rX, fit.control = list(eval.se = TRUE),solver.control= list(trace=TRUE), fit = multf)
> 
> 
> 
> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



More information about the R-SIG-Finance mailing list