[R-SIG-Finance] rugarch roll plot. why abs(mu) in plot?

Alexios Galanos @lexio@ @ending from 4d@c@pe@com
Sat Dec 1 07:00:56 CET 2018


Agreed, it shouldn’t...my bad for copying the code from another plot snippet.
Thanks for catching this. Will fix in next release.

Alexios


> On Nov 30, 2018, at 20:50, Владимир Иванов <vivanov879 using ya.ru> wrote:
> 
>  
>>> Hi. After fitting a rolling model and plotting the Series forecast all forecasted values are positive. Use this code to reproduce: http://www.unstarched.net/wp-content/uploads/2013/06/an-example-in-rugarch.pdf I would expect the series forecasts be both positive and negative. 
>>>  
>>> <series_plot.png>
>>>  
>>> After looking through the sources I found that it is a plot of abs(mu) against realized values. :
>>>  
>>> # rolling series forecast comparison plot
>>> .plot.garchroll.3 = function(x, VaR.alpha = 0.01, density.support = c(-0.15, 0.15), ...)
>>> {
>>> density = x using forecast$density
>>> plot(as.Date(rownames(density)), density[,6], type="l", col = "grey",
>>> main = paste("Series Forecast vs Realized", sep = ""),
>>> ylab = "", xlab  = "", cex.main = 0.7, cex.axis = 0.8, cex.lab=0.9)
>>> lines(as.Date(rownames(density)), abs(density[,1]), col = "tomato1", lwd = 1.5)
>>> grid()
>>> invisible(x)
>>> }
>>>  
>>> I think it there should be no abs . What do you think?
> _______________________________________________
> 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.

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list