On 29/06/12 08:57, Pankaj Jagota wrote:
Good Morning all!
 
I am trying to create a script for recursive EWMA (Exponential Weighted Moving Average) volatilty estimation.
 
As I am not familiar with gretl syntax language I'm desparetly looking for your help.
The problem is following:
 
1) First of all I need to identify the first observation of returns series. I've tried to do this by appliying FirstObs function. But that didn't work.

For example:

open data3-6.gdt
scalar fo = firstobs(Ct)
scalar lo = lastobs(Ct)
 
2) then I would like to replicate the ewma formula in order to get the variance of return series.
for that i've seen there is a MOVAVG function. I didn't find any example of syntax in user's guide. How does this work?

This is explained in the Function Reference (Help/Function reference). You may see it working in the Brown package
(File/Function files/on server...)


-- 
Ignacio Diaz-Emparanza 
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA) 
UPV/EHU Avda. Lehendakari Aguirre, 83 | 48015 BILBAO 
T.: +34 946013732 | F.: +34 946013754 
www.ehu.es/ignacio.diaz-emparanza/
www.ea3.ehu.es