[R] DCC help

R. Michael Weylandt michael.weylandt at gmail.com
Sat Oct 13 11:51:16 CEST 2012


Forwarding to R-SIG-Finance where I believe you're likely to get more help:

In the meanwhile, I think you may wish to look at
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Finally, I note you're posting from Nabble. Please include context in
your follow-ups -- I don't believe Nabble does this automatically, so
you'll need to manually include it. Most of the regular respondents on
these lists don't use Nabble -- it is a _mailing list_ after all -- so
we don't get the forum view you do, only emails of the individual
posts. Combine that with the high volume of posts, and it's quite
difficult to trace a discussion if we all don't make sure to include
context.

Cheers,
Michael

On Sat, Oct 13, 2012 at 5:36 AM, australiastudent
<martin.ding at student.adelaide.edu.au> wrote:
> hi all,
>
> i am using a dcc model for my senior thesis, it looks at stock returns
> during times of market uncertainty.
>
> my current rfile is below.
>
> library(SparseM)
> library(quantreg)
> library(zoo)
> library(nortest)
> library(MASS)
> library(fEcofin)
> library(mvtnorm)
> library(ccgarch)
> library(stats)
> library(foreign)
>
> #dataset<-read.csv(file="xxxx",header=FALSE)
> attach(dataset);
>
> vardata=data.frame(dataset[,2],dataset[,4])
>
> ### DCC ###
>
> #initial values
> a1 <- c(0.003, 0.001, 0.001)
> A1 <- diag(c(0.1,0.1,0.1))
> B1 <- diag(c(0.1, 0.1, 0.1))
> dcc.para <- c(0.01,0.98)
>
> # Estimating a DCC-GARCH(1,1) model
> dcc.results <- dcc.estimation(inia=a, iniA=A, iniB=B, ini.dcc=dcc.para,
> dvar=vardata, model="diagonal")
> # Parameter estimates and their robust standard errors
> dcc.results$out
>
> DCC_corr<-dcc.results$DCC[,2]
>
> plot(DCC_corr)
>
> this gives me the output results and a plot.
>
> the questions i have are
>
> 1. how do i get a plot with lines instead of dots
>
> 2. in my file i have two types of dummy variables - the first are quantiles
> where it is 1 if stock returns are in the lowest 5% quantile and the second
> dummy variable are specific events in the world economy where it is 1 if the
> stock return for that day happens to lie within the date range i specified
> for each event.
>
> i have fun the dcc without my dummy variables, but how can i incorporate my
> dummies into my results as i cannot find a user guide to help me
>
> any help would be greatly appreciated!
>
> thank you all!
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/DCC-help-tp4646061.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list