saving data
by clarodina clarodina
Hi
How to save the corr data calculation onto a series or matrix?
Have a loop on the corr but the output is raw without saving the corr onto
a series or matrix
Did read the guide but theres no accessor for corr for directly accessing
the corr output
Tks for ans newbie qns
12 years, 6 months
saving data
by clarodina clarodina
Hi, is there a accessor for correlation?
12 years, 6 months
Re: [Gretl-users] AR-GARCH-t MLE
by Daniel Bencik
Hello guys,
on a last note. I had minor misspecifications in the ll function, so the right one for arma-garch is
<hansl>
mle ll = lngamma((dof + 1)/2) - lngamma(dof/2) - 0.5*log(dof-2) - 0.5*log(h) - 0.5*(dof + 1)*log(1 + (dof - 2)^(-1)*h^(-1)*e^2)
</hansl>
However, Im gettin into a problem (again!). The estimation does not converge. For some simpler specifications ( I mean simpler than ARMA(7,5)-GARCH(1,1)-t ) I was able to help the algo to converge by
setting different parameter starting values. However, with this complicated model, even when I set the initial values equal to "true" values found by eviews, the algo still does not converge. Is there a way of finding out why this happens and/or tweaking the optimization algo?
Thank you,
Daniel
______________________________________________________________
> Od: gretl-users-request(a)lists.wfu.edu
> Komu: <gretl-users(a)lists.wfu.edu>
> Datum: 22.03.2012 17:04
> Předmět: Gretl-users Digest, Vol 62, Issue 18
>
>Send Gretl-users mailing list submissions to
> gretl-users(a)lists.wfu.edu
>
>To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>or, via email, send a message with subject or body 'help' to
> gretl-users-request(a)lists.wfu.edu
>
>You can reach the person managing the list at
> gretl-users-owner(a)lists.wfu.edu
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Gretl-users digest..."
>
>
>Today's Topics:
>
> 1. Ralph M Rodriguez/PO/KAIPERM is out of the office.
> (Ralph.M.Rodriguez(a)kp.org)
> 2. Re: VECM Estimation (Allin Cottrell)
> 3. (no subject) (Chung Tin Fah)
> 4. Re: AR-GARCH-t MLE (Daniel Bencik)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Wed, 21 Mar 2012 10:02:10 -0700
>From: Ralph.M.Rodriguez(a)kp.org
>Subject: [Gretl-users] Ralph M Rodriguez/PO/KAIPERM is out of the
> office.
>To: gretl-users(a)lists.wfu.edu
>Message-ID:
> <OF505E4BE9.0EDB614B-ON882579C8.005D953A-882579C8.005D953A(a)kp.org>
>Content-Type: text/plain; charset="us-ascii"
>
>
>
>I will be out of the office starting 03/21/2012 and will not return until
>03/26/2012.
>
>Hi All, I will be out of the office on PTO from Wednesday, March 21 through
>Friday March 23, returning to the office on MOnday March 26. If you have
>any concerns with Cost Model and other construction economics matters,
>please, contact Bradley Njus at 510 625 4595.
>Thanks
>ralph
>
>Ralph
>
12 years, 6 months
Re: [Gretl-users] VECM Estimation
by Daniel Bencik
Hello Allin,
>For us to make sense of this you'd have to show us your data, for d_AllOpen in particular.
Thank you, it got resolved. d_AllOpen was, by some event I cannot explain, full of missing values in one .gdt file while in others, it was correctly calculated. Preceding the script by d_AllOpen = AllOpen - AllOpen(-1) did the trick.
Daniel
______________________________________________________________
> Od: gretl-users-request(a)lists.wfu.edu
> Komu: <gretl-users(a)lists.wfu.edu>
> Datum: 22.03.2012 17:04
> Předmět: Gretl-users Digest, Vol 62, Issue 18
>
>Send Gretl-users mailing list submissions to
> gretl-users(a)lists.wfu.edu
>
>To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>or, via email, send a message with subject or body 'help' to
> gretl-users-request(a)lists.wfu.edu
>
>You can reach the person managing the list at
> gretl-users-owner(a)lists.wfu.edu
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Gretl-users digest..."
>
>
>Today's Topics:
>
> 1. Ralph M Rodriguez/PO/KAIPERM is out of the office.
> (Ralph.M.Rodriguez(a)kp.org)
> 2. Re: VECM Estimation (Allin Cottrell)
> 3. (no subject) (Chung Tin Fah)
> 4. Re: AR-GARCH-t MLE (Daniel Bencik)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Wed, 21 Mar 2012 10:02:10 -0700
>From: Ralph.M.Rodriguez(a)kp.org
>Subject: [Gretl-users] Ralph M Rodriguez/PO/KAIPERM is out of the
> office.
>To: gretl-users(a)lists.wfu.edu
>Message-ID:
> <OF505E4BE9.0EDB614B-ON882579C8.005D953A-882579C8.005D953A(a)kp.org>
>Content-Type: text/plain; charset="us-ascii"
>
>
>
>I will be out of the office starting 03/21/2012 and will not return until
>03/26/2012.
>
>Hi All, I will be out of the office on PTO from Wednesday, March 21 through
>Friday March 23, returning to the office on MOnday March 26. If you have
>any concerns with Cost Model and other construction economics matters,
>please, contact Bradley Njus at 510 625 4595.
>Thanks
>ralph
>
>Ralph
>
12 years, 6 months
Re: [Gretl-users] AR-GARCH-t MLE
by Daniel Bencik
Hello,
thank you all for your responses.
@Sven: I already encountered trying to log() a negative number in a different model, but when that happens, the error message is "Warning: log domain blahblah". Besides, this error of mine was happenning before any estimation attempts, so I knew this was not the problem.
@Allin, @Riccardo: Thank you for directing me to gig, I never knew gretl had addons:) I modified the code to use lngamma() instead of log(gammafun()) and lo and behold, everything runs. So is it somehow possible, that log(gammafun(x)) cannot take x of type series while lngamma(x) can eat series? Because that is what it looks like to me. I didn't change the starting values or anything else, just switched log(gammafun(..)) to lngamma(). The resulting code is thus
<hansl>
scalar c = 0.1
scalar a1 = 0.1
# GARCH - h[t] = cg + ga*h[t-1] + arc*e^2[t-1]
scalar cg = 0.1
scalar ga = 0.1
scalar arc = 0.1
scalar dof = 4
mle ll = lngamma((dof + 1)/2) - lngamma(dof/2) - 0.5*log(dof-2) - log(h) - 0.5*(dof + 1)*log(1 + (dof - 2)^(-1)*h^(-2)*e^2)
series e = 0
series e = allRng - c - a1*allRng(-1) #AR1 process
series h = var(allRng)
series h = cg + ga*h(-1) + arc*(e(-1))^2 # GARCH(1,1)
params c a1 cg ga arc dof
end mle
</hansl>
If for any purposes somebody needs my data, I will be glad to upload them and share the link. Thanks again.
All the best,
Daniel.
12 years, 6 months
(no subject)
by Chung Tin Fah
Hi,
I am looking for a Hamilton markov switching program in Gretl. Do you have such a script in gretl. Thanks.
Chung Tin Fah
12 years, 6 months
VECM Estimation
by Daniel Bencik
Hello Allin,
one more little thing. When I try to estimate
vecm 7 1 AllHigh AllLow --quiet
everything goes fine even on small samples of, say, 100 observations.
However, when I try to add one exogenous variables, like
vecm 7 1 AllHigh AllLow; d_AllOpen
it only works on the full sample of 999 observations. When I restrict the sample to 746 observations, I get an "Insufficient degrees of freedom for regression" dialog. Is there a way to get around this? I would like to obtain OOS forecasts from an augmented VECM model.
Thank you,
Daniel.
12 years, 6 months
Ralph M Rodriguez/PO/KAIPERM is out of the office.
by Ralph.M.Rodriguez@kp.org
I will be out of the office starting 03/21/2012 and will not return until
03/26/2012.
Hi All, I will be out of the office on PTO from Wednesday, March 21 through
Friday March 23, returning to the office on MOnday March 26. If you have
any concerns with Cost Model and other construction economics matters,
please, contact Bradley Njus at 510 625 4595.
Thanks
ralph
Ralph
12 years, 6 months
AR-GARCH-t MLE
by Daniel Bencik
Hello Allin,
I humbly ask you for help with hopefully the last problem.
I would like to estimate an AR(1)-GARCH(1,1) model with T-distributed normalized residuals. I take the loglik function from http://faculty.chicagobooth.edu/jeffrey.russell/teaching/finecon/readings... p15 and transform everything into code.
# allRng[t] = c + a1*allRng[t-1] + e[t]
scalar c = 0.1
scalar a1 = 0.1
# e[t] = h[t] * Student[t]
# GARCH - h[t] = cg + ga*h[t-1] + arc*e^2[t-1]
scalar cg = 0.1
scalar ga = 0.1
scalar arc = 0.1
scalar dof = 4
mle ll = log(gammafun((dof + 1)/2)) - log(gammafun(dof/2)) - 0.5*log(dof-2) - log(h) # - 0.5*(dof + 1)*log(1 + (dof - 2)^(-1)*h^(-2)*e^2)
series e = 0
series e = allRng - c - a1*allRng(-1) #AR1 process
series h = var(allRng)
series h = cg + ga*h(-1) + arc*(e(-1))^2 # GARCH(1,1)
params c a1 cg ga arc dof
end mle
You may have noticed a comment mark on the "mle ll=" line. This is where the error happens. I receive an error message telling me "The variable ll is of type scalar". The error disappears when I move the comment mark in front of the log(h) element. I looked into other MLE estimates of garch using gretl on the web, some of my own MLE estimates using gretl and I just cant figure out what the problem is here.
Thank you in advance,
Daniel
12 years, 6 months