Description Usage Arguments Details Value See Also Examples
Simulation for copula GARCH models with factor structure, with links to C code
| 1 2 3 4 5 6 | rgarch1fact(n,garchpar,cpar,sigma0,copcode)
rgarch2fact(n,garchpar,cpar,sigma0,copcode)
rgarchbifact(n,grsize,garchpar,cpar,sigma0,copcode)
rgarchnestfact(n,grsize,garchpar,cpar,sigma0,copcode)
rgarchbifactmvt(n,grsize,garchpar,cpar,sigma0,copcode=2) # monotone interpolation
rgarchnestfactmvt(n,grsize,garchpar,cpar,sigma0,copcode=2) # monotone interpolation
 | 
| n | sample size | 
| garchpar | 6xd matrix, where d is the number of assets, rows are mu,ar1,omega,alpha1,beta1,nu; set ar1 to be 0 vector if AR term not used in GARCH model | 
| cpar | copula parameter vector | 
| grsize | vector of group sizes for mgrp groups with sum(grsize)=d | 
| sigma0 | d-vector with starting values for conditional SDs (from GARCH output) | 
| copcode | current options are 1 for Gaussian, 2 for t, 3 for Gumbel, -3 for reflected Gumbel, 5 for Frank; 9 for BB1 1-factor, 9 for BB1/Frank 2-factor and b-factor; 11 for Gumbel/BB1 nested factor | 
rgarchbifactmvt and rgarchnestfactmvt use monotone interpolation for the Student t univariate cdf, for faster computations
| lgret | dxn matrix of log returns | 
| portfret | nx1 portfolio return vector, assuming equally weighted | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |  
garchpar=matrix(c(0.094, 0.125, 0.068, 0.212, 0.092,
 -0.062,-0.040,-0.082,-0.020,-0.051,
  0.019, 0.014, 0.016, 0.082, 0.014,
  0.071, 0.075, 0.088, 0.092, 0.080,
  0.909, 0.914, 0.882, 0.842, 0.902,
 9.4, 8.3,9.5, 7.9,9.6), 6,5,byrow=TRUE)
sigma0=c(1.113,1.286,0.857,1.176,0.968)
garchpar6=cbind(garchpar,c(0.1, -0.05,0.01,0.08,0.9,10.))
sigma6=c(sigma0,1)
grsize=c(2,2,2)
cpar1=seq(1.1,1.5,.1)
cpar2=c(seq(1.1,1.5,.1),rep(1.1,5))
cparbi=c(seq(1.1,1.6,.1),rep(1.1,6))
cparne=c(rep(1.1,3),seq(1.1,1.6,.1))
#
set.seed(123)
out=rgarch1fact(3,garchpar,cpar1,sigma0,copcode=3)
print(out)
set.seed(123)
out=rgarch2fact(3,garchpar,cpar2,sigma0,copcode=3)
print(out)
set.seed(123)
out=rgarchbifact(3,grsize,garchpar6,cparbi,sigma6,copcode=3)
print(out)
set.seed(123)
out=rgarchnestfact(3,grsize,garchpar6,cparne,sigma6,copcode=3)
print(out)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.