On Tue, 27 Feb 2018, Javier García wrote:
 Hello everybody:
 One quick question: when estimating a GARCH model (model -> time series 
 -> GARCH), is it possible to estimate an ARMA model for the equation of 
 the mean? The problem is that, while lags of the dependent variable and 
 other regressors are easy to include, I cannot find an option to include 
 the MA part. 
No, the natve GARCH command doesn't handle MA() terms in the 
conditional mean. However, it's relatively easy to write a script to 
estimate that kind of model via conditional QML. For example:
<hansl>
set verbose off
function series llik(series r, matrix param)
     series ret = NA
     c = param[3]
     a = param[4]
     b = param[5]
     # sanity check
     if (c>0) && (a>0) && (b>0) && (a+b<1)
         series z = r - param[1]
         scalar theta = param[2]
         series e2 = filter(z, 1, -theta)^2
         series h = c / (1 - a - b)
         series h = c + a*e2(-1) + b*h(-1)
         ret = -0.5 * (log(2*$pi) + log(h) + e2/h)
     endif
     return ret
end function
# ---------------------------------------------------
# --- main ------------------------------------------
# ---------------------------------------------------
open djclose
r = 100*ldiff(djclose)
# --- par. initalisation ----------------------------
# MA(1) param via Hannan-Rissanen
ols r 0 r(-1 to -20) --quiet
u = $uhat
ols r 0 u(-1) --quiet
m = $coeff[1]
theta = $coeff[2]
# GARCH params via ordinary garch on HR residuals
u = $uhat
garch 1 1 ; u --quiet --nc
c = $coeff[1]
a = $coeff[2]
b = $coeff[3]
# --- estimation via conditional QMLE --------------
mle l = llik(r, coef)
     matrix coef = {m, theta, c, a, b}
     params m theta c a b
end mle --robust
</hansl>
Hope this helps.
-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)
   Università Politecnica delle Marche
   (formerly known as Università di Ancona)
   r.lucchetti(a)univpm.it
   
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------