Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: MGARCH DCC in panel settings - error?


From   Arsenio Staer <[email protected]>
To   [email protected]
Subject   st: MGARCH DCC in panel settings - error?
Date   Thu, 15 Mar 2012 19:21:08 -0700

Hi Nick and Rafal,

Thank you for the answers! I approached this following way

================================= begin example =============================
use "etf.sticker_quotes_upd_32.dta", clear
sort permno date
duplicates drop permno date, force
egen id=group(permno)
su id, meanonly
scalar max_r = `r(max)'
foreach i of num 1/`=max_r' { /* instead of forvalues which has to have a numeric range? */
        use "etf.sticker_quotes_upd_32.dta", clear
        sort permno date
        qui egen id=group(permno)
        drop if id != `i'
        duplicates drop permno date, force
        drop if ret == .
        gen date_n=_n
        tsset date_n
        l permno in 1/2 if id==`i'
        noisily  mgarch dcc (ret vwretd = , noconstant) ///
 if id == `i' , arch(1) garch(1)  technique(bhhh) iterate(4000)
         predict H* if e(sample), variance
         generate double corr_ret_vwretd = H_ret_vwretd / (  sqrt(H_ret_ret) *sqrt(H_vwretd_vwretd))
         outsheet using DCC_`i'.csv , comma 

 }

================================== end example ==============================

Apologize if the code above looks unformatted.

I found out that, the series need to be -tsset- but can't be -xtset-
at least in my case, any mgarch command on -xtset- dataset gives that
error in the previous message. So i create a new dataset based on the
group and -tsset- it in the loop and run the estimation and output the
DCC time series which I'm interested in. This is an proof of concept
on the return data then i will run it on the other variables.

I'm working on the estimation itself, somehow can't achieve
convergence. The same model in OxMetrics achieves convergence in
seconds with similar log likelihood values. But that's a different
matter altogether.

Thank you,

Arsenio


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index