The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
We generate a Gaussian ARMA model.
A model spec can be fitted to data with the generic command
fit
.
copspec <- armacopula(pars = list(ar =0.01, ma =0.01))
margspec <- margin("norm")
fullspec <- tscm(copspec, margspec)
modfit <- fit(fullspec, data1, method = "full")
modfit
#> object class: tscmfit
#> _______
#> MARGIN:
#> name: gauss
#> parameters:
#> mu sigma
#> 0.5845416 2.1558708
#> _______
#> COPULA:
#> object class: armacopula
#> name: ARMA(1,1)
#> parameters:
#> ar1 ma1
#> 0.9380637 -0.8255022
#> _________________________
#> summary of all estimates:
#> ar.ar1 ma.ma1 margin.mu margin.sigma
#> 0.9380637 -0.8255022 0.5845416 2.1558708
#> convergence status: 0 , log-likelihood: -2135.118
copmod <- dvinecopula2(family = "joe",
kpacf = "kpacf_arma",
pars = list(ar = 0.9, ma = -0.8),
maxlag = 20)
vcopmod <- vtscopula(copmod,
Vtransform = V2p(delta = 0.5, kappa = 2))
margmod <- margin("slaplace",
pars = c(mu = 1, scale = 2, gamma = 0.7))
tscmmod <- tscm(vcopmod, margmod)
tscmmod
#> object class: tscm
#> _______
#> MARGIN:
#> name: slaplace
#> parameters:
#> mu scale gamma
#> 1.0 2.0 0.7
#> _______
#> COPULA:
#> object class: vtscopula
#> ____________
#> Base copula:
#> object class: dvinecopula2
#> name: type2-d-vine
#> copula family: joe
#> KPACF: kpacf_arma with max lag 20
#> parameters:
#> [1] 0.9 -0.8
#> ____________
#> V-transform:
#> name: V2p
#> parameters:
#> delta kappa
#> 0.5 2.0
First fit a marginal model only.
Now fit the time series copula model stepwise.
tscmfit_step <- fit(tscmmod, data2)
tscmfit_step
#> object class: tscmfit
#> _______
#> MARGIN:
#> name: slaplace
#> parameters:
#> mu scale gamma
#> 1.0136622 2.0855250 0.7108397
#> _______
#> COPULA:
#> object class: vtscopula
#> ____________
#> Base copula:
#> object class: dvinecopula2
#> name: type2-d-vine
#> copula family: joe
#> KPACF: kpacf_arma with max lag 20
#> parameters:
#> [1] 0.9045782 -0.7980417
#> ____________
#> V-transform:
#> name: V2p
#> parameters:
#> delta kappa
#> 0.50000 1.98948
#> _________________________
#> summary of all estimates:
#> ar ma vt.kappa margin.mu margin.scale margin.gamma
#> 0.9045782 -0.7980417 1.9894803 1.0136622 2.0855250 0.7108397
#> convergence status: 0 , log-likelihood: -4819.964
coef(tscmfit_step)
#> delta kappa mu scale gamma
#> 0.9045782 -0.7980417 0.5000000 1.9894803 1.0136622 2.0855250 0.7108397
coef(tscmmod)
#> delta kappa mu scale gamma
#> 0.9 -0.8 0.5 2.0 1.0 2.0 0.7
Final optimization over all parameters.
tscmfit_full <- fit(tscmfit_step, data2, method = "full")
tscmfit_full
#> object class: tscmfit
#> _______
#> MARGIN:
#> name: slaplace
#> parameters:
#> mu scale gamma
#> 1.0132969 2.0839697 0.7119104
#> _______
#> COPULA:
#> object class: vtscopula
#> ____________
#> Base copula:
#> object class: dvinecopula2
#> name: type2-d-vine
#> copula family: joe
#> KPACF: kpacf_arma with max lag 20
#> parameters:
#> [1] 0.9043820 -0.7981071
#> ____________
#> V-transform:
#> name: V2p
#> parameters:
#> delta kappa
#> 0.500000 1.979627
#> _________________________
#> summary of all estimates:
#> ar ma vt.kappa margin.mu margin.scale margin.gamma
#> 0.9043820 -0.7981071 1.9796267 1.0132969 2.0839697 0.7119104
#> convergence status: 0 , log-likelihood: -4819.961
Comparison of model.
We can plot the estimated v-transform and well as the goodness-of-fit
plots for the dvinecopula
object based on Kendall rank
correlations.
The first plots relate to the fitted copula.
The next plot is the QQplot of the marginal fit.
The next two plots are the estimated v-transform and the estimated volatility profile function.
The final plot shows aspect of the fit of the v-transform to the data.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.