MrBrownstone wrote:Dear Tom,
I have been trying to extract time-varying correlation series from your code, without any succes. Could you give me a hint, that how it is done?
Thank you for advance!
dec series[symm] rho
gset rho gstart gend = %cvtocorr(q)
set rho12 gstart gend = rho(t)(1,2)
graph
# rho12
set rho13 gstart gend = rho(t)(1,3)
graph
# rho13
compute bfix=sqrt(.85),afix=sqrt(.10)
nonlin afix bfix
compute gq=%const(0.0)
disp gq
maximize(start=%(bq=%const(bfix),aq=%const(afix),StartQC()),method=bfgs,title="Two-step DCC") logl gstart gend
disp "DCC BIC" -2.0*%logl+(%nreg+uniparms)*log(%nobs)
## MAT15. Subscripts Too Large or Non-Positive
TomDoan wrote:You're probably not initializing the Q and EE series of matrices so there's no lagged Q and lagged EE at GSTART.
compute gstart=%regstart(),gend=%regend()
gset q = qbar
gset ee = qbar
gset nn = nbar
gset hh = qbar
gset ee gstart gend = %outerxx(%xt(eps,t))
gset nn gstart gend = %outerxx(%xt(eta,t))
vcv(nocenter,matrix=qbar)
# eps
vcv(nocenter,matrix=nbar)
# eta
Two-step DCC - Estimation by BFGS
Convergence in 21 Iterations. Final criterion was 0.0000000 <= 0.0000100
Usable Observations 1866
Function Value -4863.86937136
Variable Coeff Std Error T-Stat Signif
*******************************************************************************
1. AFIX 0.1739951937 0.0088466433 19.66793 0.00000000
2. BFIX 0.9727566930 0.0034490702 282.03447 0.00000000
avalokita wrote:TomDoan wrote:You're probably not initializing the Q and EE series of matrices so there's no lagged Q and lagged EE at GSTART.
I simply use a different data set and didn't modify the essential codes.
The initialization works as the same, that is
- Code: Select all
compute gstart=%regstart(),gend=%regend()
- Code: Select all
gset q = qbar
gset ee = qbar
gset nn = nbar
gset hh = qbar
gset ee gstart gend = %outerxx(%xt(eps,t))
gset nn gstart gend = %outerxx(%xt(eta,t))
I also checked both the Q and ee series, which indeed store values obtained from
- Code: Select all
vcv(nocenter,matrix=qbar)
# eps
vcv(nocenter,matrix=nbar)
# eta
Is it the initialization what dear Tom meant for?? Or exist other ways to initialize these series.
I'm thankful for Tom's help.
Financecoding wrote:Hi guys,
Sorry I am having the exact same problem as avalokita was having. I am working though the code with a couple of different data sets and everything looks fine until the DCC max when I get the same error message.
Could someone please have me their thoughts to what is (what am I doing) wrong?
Thanks,
Mark
Return to Examples and Sample Code
Users browsing this forum: No registered users and 0 guests