[R-SIG-Finance] Copula in R
alexios
alexios at 4dscape.com
Fri Jan 30 16:56:20 CET 2009
No, first fit the standardized residuals with the distribution you want
(e.g. the spd), then apply the cdf transform on those residuals(i.e.
pspd(std.resids, fit) ) to get the pseudo-uniform
numbers, then collect into a matrix and fit using the copula.
Once you have fitted, use the random number generator of copula to get a
correlated sample which you then transform back by using the quantile
function (qspd), and then reintroduce them into the univariate garch
fit from stage 1 from which you can now simulate.
HTH.
Alexios
Yana Roth wrote:
> Yes, I filtered the residuals with GARCH. You mean, I should apply
> fit.copula.rank to standardised residuals directly?
> I thought, I should estimate CDFs before....
>
> Thank you
>
> --- On *Fri, 1/30/09, alexios /<alexios at 4dscape.com>/* wrote:
>
> From: alexios <alexios at 4dscape.com>
> Subject: Re: [R-SIG-Finance] Copula in R
> To: yana.roth at yahoo.com
> Cc: r-sig-finance at stat.math.ethz.ch
> Date: Friday, January 30, 2009, 3:05 PM
>
> The QRMlib function "fit.tcopula.rank" with method="kendall"
> will accept
> the uniform data from the cdf transformation.
>
> It is more commonplace to first filter the data with a process like
> garch, and then apply the fit to the standardized residuals.
>
> There is also a package on r-forge for the semi-parametric distribution
> with pareto tail which implements density, distribution, quantile and
> sampling (http://r-forge.r-project.org/projects/spd/).
>
> -Alexios
>
> Yana Roth wrote:
> > Hello,
> > I try to reproduce copula fitting from Matlab by R. I constructed pieswise
> distribution: Generalised Pareto at the tails and empirical distribution
> estimated with Gaussian Kernel. Like this I obtain 15 CDF. However, I dont find
> my way to convert them to uniforms and fit copula.
> >
> > If you could provide some help, I would be thanjful
> >
> > Thank You
> > Yana
> >
> >
> >
> > [[alternative HTML version deleted]]
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > R-SIG-Finance at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.
>
>
More information about the R-SIG-Finance
mailing list