[R-SIG-Finance] Demean or not to demean

alexios alexios at 4dscape.com
Tue Aug 11 12:02:00 CEST 2015

On 11/08/2015 10:33, Gareth McEwan wrote:
> Hi all
> I was hoping someone could shed light or direct me to a resource (or two)
> regarding a "demean" question.
> As I understand, QMLEs estimated on "demeaned" log return data vs straight
> "log return" data behave quite differently in finite samples (particularly
> for nonlinear MA models where the MA parameter is of interest). Apparently,
> for linear AR models, demeaning data does not seriously affect estimation
> of non-intercept parameters (refer: Yong Bao "Should We Demean Data?").
> For monthly financial log return data, I find ARMA specifications are not
> significant, but some sample *means *ARE significant, while others are not.
> In either case, I add the GARCH model specification with various error
> distributions from the "rugarch" package.
> Code example:
> x.log.ret = diff(log(price.x) #i.e. not "demeaned"
> spec <- ugarchspec(variance.model=list(model="sGARCH",garchOrder=c(1,1),
>              submodel=NULL,external.regressors=NULL,variance.targeting=F),
>              mean.model=list(*armaOrder = c(0,0)*,* include.mean = T*,
> external.regressors=NULL),
>              distribution.model="std")
> tempgarch <- ugarchfit(spec=spec,data=x.log.ret,solver="hybrid")
> I work through the steps necessary to fitting a *t*Copula from which to
> simulate and ultimately work my way back to simulated returns.
> The goal here is to extract from the matrix of simulated returns those
> groups of returns coinciding with certain pre-determined "scenarios". These
> are then used for portfolio optimization.
> In the "global respect" of the methodology, can anyone shed light on the
> merits/demerits of not first demeaning the data? I haven't found any
> glaring problems, but it bothers me that the "rugarch" package operates on
> demeaned data.

The rugarch package does NOT operate on demeaned data. It offers the 
option (default=TRUE) through "include.mean" on whether to demean the 
data or not. In case you are not demeaning, then the data are passed 
straight to the GARCH routine and assumed as the zero-mean residuals.

> Thank you very much for the help
> Gareth


More information about the R-SIG-Finance mailing list