Re: [Gretl-users] GARCH, Forecasting
by Allin Cottrell

On Mon, 17 Jan 2011, [ISO-8859-1] Alejandro Mosi�o wrote:
> Maybe i was not too much specific last time:
>
> I have a variable "y" that follows a GARCH(1,1) process. Then, i Gretl i
> type:
>
> garch 1 1 ; y const
>
> Then i got the result and forecasting the out-of-sample values of y can
> be done in the usual way. However, i'm interested in forecasting the
> out-of-sample variance. I don't know if such a function exists in Gretl.
There is no built-in function to do this, but you can compute a
one-step ahead forecast of the variance from the model data, as
hown in the following example script.
<script>
open b-g.gdt
garch 1 1 ; Y
series e = $uhat
series h = $h
dataset addobs 10
a0 = $coeff[2]
a1 = $coeff[3]
b1 = $coeff[4]
series hfc = h
# set future errors to their expectation
e = misszero(e)
# forecast the variance
hfc = a0 + a1 * e(-1)^2 + b1 * hfc(-1)
smpl 1970 ;
print e h hfc --byobs
</script>
Allin Cottrell
8 years, 8 months

skewness and kurtosis
by Annaert Jan

I know there are functions to compute the mean, median, minimum, maximum and standard deviation for a series. I also know that using the summary command, skewness and excess-kurtosis are also computed. Is there an easy way to capture these last two statistics (I need them for further processing)? Of course, I could write a short function to do this, but as they are already available in Gretl in the summary command…
Thanks,
Jan Annaert
UNIVERSITEITANTWERPEN | Faculty of Applied Economics (TEW) | Dept. Accounting & Finance
Room S.B.335 | Prinsstraat 13 | B-2000 Antwerp | Belgium
Phone +32 32654163 |Fax +32 32654064
9 years, 9 months

New options for the script editor
by Henrique Andrade

Dear Gretl Team,
Today a colleague asked me where she could find the buttons "cut" and "redo"
in the script editor window.
I think it would be nice to have these buttons. What do you think?
Um abraço,
*Henrique C. de Andrade*
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
9 years, 11 months

Fixed effects forecast
by Ricardo Gonçalves Silva

Hi,
Can Gretl forecast 1 to 3 periods ahead an estimated panel data(fixed-effects with no iterations) model?
HTH
RIck
9 years, 11 months

KPSS test
by samyto ...

Dear Gretl Users,
My question concerns KPSS unit root test. After selecting my serie and clicking on KPSS test; the default lag is set to 8.How do I find the best lag for my test ? Is there an automatic way to select it ? Is the default lag the best one ?
Thanks a lot for helping !
Samy
10 years

grabbing VAR lag length in a script
by Sven Schreiber

Hi,
does the
var ... --lagselect
command variant actually save anything that can be accessed in a script?
It would be nice for example to get the recommended lag length by the
various info criteria, in order to automate the specification of VARs.
thanks,
sven
10 years

VAR problems
by Henrique Andrade

Dear Gretl Community,
I would like to report two "issues" about VAR estimation.
# Part 1: "--out-of-sample" problem
I'm trying to perform an out of sample forecast of a VAR model but Gretl is
telling me that I have an error with my data. Please take a look at my
script:
<hansl>
open australia.gdt
smpl ; 1990:1
"VAR" <- var 4 lpau lpus le --seasonals --quiet
dataset addobs 4
fcast 1990:2 1992:1 # "Works ok!"
fcast 1990:2 1992:1 --dynamic # "Works ok!"
fcast 1990:2 1992:1 --static # "Works ok!"
fcast 1990:2 1992:1 --out-of-sample "Does not work"
</hansl>
# Part 2: Saving VAR inside a loop problem
These one looks like a small bug. When I try to save models with quoted
names Gretl doesn't save them. Please take a look at my script:
<hansl>
open australia.gdt
loop i=1..2 # "Works ok!"
smpl 1972:1 1990:$i
VAR$i <- var 4 lpau lpus le --seasonals --quiet
endloop
smpl --full
loop i=1..2 # "Does not work"
smpl 1972:1 1990:$i
"VAR$i" <- var 4 lpau lpus le --seasonals --quiet
endloop
</hansl>
--
*Henrique C. de Andrade*
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
10 years

Estimation of ARIMA
by Sam Sam

I put monthly data from 1980M1 to 1990M12.
I set the data range from 1980M6 to 1990M12.
When estimating ARIMA(3,0,0), data from 1980M3 to 1980M5 would be included.
Question:
Data from 1980M3 to 1980M5 is included for what? (both under exact maximum likelihood and conditional maximum likelihood )
Would Data of 1980M3, 1980M4, and 1980M5 be used to estimate the parameters of ARIMA(3,0,0) ?
Would Data of 1980M3, 1980M4, and 1980M5 be used to generate the predictor of 1980M6 (also 1980M7 and 1980M8)?
Would Data of 1980M3, 1980M4, and 1980M5 be used to Q test of ARIMA(3,0,0)?
Would Data of 1980M3, 1980M4, and 1980M5 be used to gain AIC value?
p.s. Is data from 1980M1 to 1980 M2 included for any reason above?
Thanks a lot
10 years

Estimation of ARIMA
by Sam Sam

Q1:
I input monthly data from 1980M1 to 1990M12. When estimating AR(3), I set the sample range from 1980M6 to 1990M12.
If data from 1980M1 to 1980M5 would be included to estimate AR(3), when I set the sample range from 1980M10 to 1990M12, data from 1980M1 to 1980M9would be included to estimate AR(3), is it right ? Does that mean no matter what range I set, data included to estimate AR(3) is always from 1980M1 to 1990M12 ? ( outcome of different data range are different)
Q2:
When comparing MAPE of AR(1) and AR(2), their MAPE value is gained from the same forecasting range (1989M1 to 1990M12).
If I can compare their MAPE value when using observations of AR(1) and AR(2) are different , Is it would be much more appropriate to set the using observations of AR(1) and AR(2) the same? What difference between these two kinds of situations?
Under different periods of using observations, If MAPE value (both gain from1989M1 to 1990M12) of AR(1) is lower than AR(2), Can I say forecasting ability of AR(1) is better than AR(2)? Are their basis of comparison different?
10 years

Estimation of ARIMA
by Sam Sam

Dear all:
Q1:
I input monthly data from 1980M1 to 1990M12. I set the sample range from 1980M6 to 1990M12. When I estimate AR(3) model, data used to estimate the model is 1980M1-1990M12, 1980M6-1980M12, 1980M9-1990M12, or so on?
What I mean is when estimating parameter of AR(3) model or residual of AR(3) model, is data from 1980M1 to 1980M6 included for estimating?
Q2:
I input monthly data from 1980M1 to 1990M12. I set the sample range from 1980M1 to 1988M12(I want to use data from 1989M1 to 1990M12 for out-of sample forecasting)
When estimating AR(1), the using observations is from 1980M2 to 1990M12(number of observation: 131)
When estimating AR(2), the using observations is from 1980M3 to 1990M12(number of observation: 130)
When estimating AR(3), the using observations is from 1980M4 to 1990M12(number of observation: 129)
Can I compare MAPE(Mean Absolute Percentage Error) value (from 1989M1 to 1990M12) of these three models when their period and number of using observations are different?
Thanks a lot
10 years