[R-SIG-Finance] R-SIG-Finance Digest, Vol 128, Issue 5

Thomas Quinn quinn.tf at gmail.com
Wed Jan 7 17:17:43 CET 2015


Unrelated to R here is a neat site I just found:
http://www.indexindicators.com/

Related to R:
The instructions to subscribe/unsubscribe are below.

Here is the site for R
http://www.r-project.org/

Here is a link to a nice IDE for R that I use:
http://www.rstudio.com/

Neural Nets, clustering, fractals, and plain old stats... you name

On Tue, Jan 6, 2015 at 5:00 AM, <r-sig-finance-request at r-project.org> wrote:

> Send R-SIG-Finance mailing list submissions to
>         r-sig-finance at r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> or, via email, send a message with subject or body 'help' to
>         r-sig-finance-request at r-project.org
>
> You can reach the person managing the list at
>         r-sig-finance-owner at r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-SIG-Finance digest..."
>
>
> Today's Topics:
>
>    1. Re: gogarch with multivariate t distribution (jun wang)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 6 Jan 2015 00:17:24 -0500
> From: jun wang <junluke at gmail.com>
> To: alexios ghalanos <alexios at 4dscape.com>
> Cc: "r-sig-finance at r-project.org" <r-sig-finance at r-project.org>
> Subject: Re: [R-SIG-Finance] gogarch with multivariate t distribution
> Message-ID:
>         <
> CAPD4hGC1p4RNh_8AHZ+Y3_F3GHKefG28gs1y3jLZiww3Hpk9qQ at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi, Alexios,
>
> Thanks for your quick response. I am still learning the DCC-GARCH model,
> and i tried write the 2-stage estimation for the bi-variate DCC-GARCH(1,1)
> and the estimates i got for the dcc parameters are different from the
> "dccfit" function. I was wondering if you can give me any hints on what is
> not right for my code.
>
> Thanks!!!
>
> data<-rv_indices[,2:3]
> size1<-dim(data)
> t<-size1[1]
> k<-size1[2]
>
> H<-matrix(0,nrow=size1[1]+1,ncol=size1[2])
>
> fit1<-ugarchfit(model_base,data=data[,1]-mean(data[,1]))
> fit2<-ugarchfit(model_base,data=data[,2]-mean(data[,2]))
>
> res_1<-as.numeric(residuals(fit1))
> res_2<-as.numeric(residuals(fit2))
>
> vol_1<-as.numeric(sigma(fit1))
> vol_2<-as.numeric(sigma(fit2))
>
> res<-cbind(res_1,res_2)
> vol<-cbind(vol_1,vol_2)
> stdresid<-res/vol
> Qbar=cov(stdresid);
>
> stdresid=rbind(c(1,1),stdresid)
>
> Qt<-array(0,c(2,2,t+1))
> Rt<-array(0,c(2,2,t+1))
> Qt[,,1]<-Qbar
> Rt[,,1]<-Qbar
> dcc_likhood_2<-function(startval){
> a<-startval[1]
> b<-startval[2]
> logL=0;
> likelihoods<-numeric(t+1)
> for (j in 2:t+1){
>   Qt[,,j]=Qbar*(1-a-b)
>   Qt[,,j]=Qt[,,j]+a*(stdresid[j-1,]%*%t(stdresid[j-1,]));
>   Qt[,,j]=Qt[,,j]+b*Qt[,,j-1]
>   Rt[,,j]=Qt[,,j]/(sqrt(diag(Qt[,,j]))%*%sqrt(t(diag(Qt[,,j]))));
>
>
> likelihoods[j]=log(det(Rt[,,j]))+t(stdresid[j,])%*%solve(Rt[,,j],tol=1e-21)%*%(stdresid[j,]);
>   logL=logL+likelihoods[j]
> }
> return(logL)
> }
> startval<-c(0.04,0.93)
> A <- matrix(c(-1, -1,1,0,0,1), 3, 2,byrow=TRUE)
> B <- c(1,0,0)
>
> llL<-maxBFGS(dcc_likhood_2,start=startval, constraints=list(ineqA=A,
> ineqB=B))
>
> On Sat, Jan 3, 2015 at 5:36 PM, alexios ghalanos <alexios at 4dscape.com>
> wrote:
>
> > The short answer is NO.
> >
> > The student and (gh) skew student are nested in the magh under
> appropriate
> > parameter restrictions e.g. setting [gh]\lambda to -[student]shape/2
> (with
> > appropriate bounds on shape) and [gh]\beta->0 (for student) or
> > [gh]\beta->|[gh]\alpha| (for gh skew student)...search google for 'Prause
> > Generalized Hyperbolic' for more details.
> >
> > However, the representation in rmgarch is of the standardized magh
> > ([sgh]\rho,[sgh]\zeta parameterization) which means you'd need to amend
> the
> > code for this particular case...given that it's open source, it should
> be a
> > 'breeze'.
> >
> > Alexios
> >
> >
> > On 03/01/2015 21:45, jun wang wrote:
> >
> >> Dear all,
> >>
> >> Is there anyway to estimate the GOGARCH model with multivariate student
> t
> >> distribution errors in the *rmgarch* package in R? The rmgarch package
> for
> >> estimating gogarch model only covers "mvnorm",multivariate affine NIG
> >> (?manig?) and GHYP (?magh?).
> >>
> >> Any hints would be very appreciated.
> >>
> >> Thanks,
> >> Jun
> >>
> >>         [[alternative HTML version deleted]]
> >>
> >> _______________________________________________
> >> R-SIG-Finance at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> >> -- Subscriber-posting only. If you want to post, subscribe first.
> >> -- Also note that this is not the r-help list where general R questions
> >> should go.
> >>
> >>
> >
>
>         [[alternative HTML version deleted]]
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> R-SIG-Finance mailing list
> R-SIG-Finance at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>
>
> ------------------------------
>
> End of R-SIG-Finance Digest, Vol 128, Issue 5
> *********************************************
>



-- 
TQ

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list