This function makes simulations of correlated or dependent gaussian shocks for risk factors.

simshocks(
  n,
  horizon,
  frequency = c("annual", "semi-annual", "quarterly", "monthly", "weekly", "daily"),
  method = c("classic", "antithetic", "mm", "hybridantimm", "TAG"),
  family = NULL,
  par = NULL,
  par2 = rep(0, length(par)),
  RVM = NULL, 
  type = c("CVine", "DVine", "RVine"),
  start = NULL,
  seed = 123
)

Arguments

n

number of independent observations for each risk factor.

horizon

horizon of projection.

frequency

either "annual", "semi-annual", "quarterly", "monthly", "weekly", or "daily" (1, 1/2, 1/4, 1/12, 1/52, 1/252).

method

either classic monte carlo, antithetic variates, moment matching, hybrid antithetic variates + moment matching, "TAG" (see the 4th reference for the latter. Options: "classic", "antithetic", "mm", "hybridantimm", "TAG".

family

A d*(d-1)/2 integer vector of C-/D-vine pair-copula families with values 0 = independence copula, 1 = Gaussian copula, 2 = Student t copula (t-copula), 3 = Clayton copula, 4 = Gumbel copula, 5 = Frank copula, 6 = Joe copula, 7 = BB1 copula, 8 = BB6 copula, 9 = BB7 copula, 10 = BB8 copula, 13 = rotated Clayton copula (180 degrees; "survival Clayton"), 14 = rotated Gumbel copula (180 degrees; "survival Gumbel"), 16 = rotated Joe copula (180 degrees; "survival Joe"), 17 = rotated BB1 copula (180 degrees; "survival BB1"), 18 = rotated BB6 copula (180 degrees; "survival BB6"), 19 = rotated BB7 copula (180 degrees; "survival BB7"), 20 = rotated BB8 copula (180 degrees; "survival BB8"), 23 = rotated Clayton copula (90 degrees), 24 = rotated Gumbel copula (90 degrees), 26 = rotated Joe copula (90 degrees), 27 = rotated BB1 copula (90 degrees), 28 = rotated BB6 copula (90 degrees), 29 = rotated BB7 copula (90 degrees), 30 = rotated BB8 copula (90 degrees), 33 = rotated Clayton copula (270 degrees), 34 = rotated Gumbel copula (270 degrees), 36 = rotated Joe copula (270 degrees), 37 = rotated BB1 copula (270 degrees), 38 = rotated BB6 copula (270 degrees), 39 = rotated BB7 copula (270 degrees), 40 = rotated BB8 copula (270 degrees)

par

A d*(d-1)/2 vector of pair-copula parameters.

par2

A d*(d-1)/2 vector of second parameters for pair-copula families with two parameters (t, BB1, BB6, BB7, BB8; no default).

RVM

An RVineMatrix object containing the information of the R-vine copula model. Optionally, a length-N list of VineCopula::RVineMatrix objects sharing the same structure, but possibly different family/parameter can be supplied. Must be not NULL for type == "RVine", not used otherwise. See also VineCopula::RVineMatrix.

type

type of vine model: "CVine", "DVine" or "RVine"

start

the time of the first observation. Either a single number or a vector of two numbers (the second of which is an integer), which specify a natural time unit and a (1-based) number of samples into the time unit. See `?ts`.

seed

reproducibility seed

Value

If family and par are not provided, a univariate time series object with simulated gaussian shocks for one risk factor. Otherwise, a list of time series objects, containing gaussian shocks for each risk factor.

Details

The function shall be used along with simdiff, in order to embed correlated or dependent random gaussian shocks into simulated diffusions. esgplotshocks can help in visualizing the type of dependence between the shocks.

References

Brechmann, E., Schepsmeier, U. (2013). Modeling Dependence with C- and D-Vine Copulas: The R Package CDVine. Journal of Statistical Software, 52(3), 1-27. URL https://www.jstatsoft.org/v52/i03/.

Genz, A. Bretz, F., Miwa, T. Mi, X., Leisch, F., Scheipl, F., Hothorn, T. (2013). mvtnorm: Multivariate Normal and t Distributions. R package version 0.9-9996.

Genz, A. Bretz, F. (2009), Computation of Multivariate Normal and t Probabilities. Lecture Notes in Statistics, Vol. 195., Springer-Verlag, Heidelberg. ISBN 978-3-642-01688-2.

Thomas Nagler, Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler and Tobias Erhardt (2020). VineCopula: Statistical Inference of Vine Copulas. R package version 2.4.0. https://CRAN.R-project.org/package=VineCopula

Nteukam T, O., & Planchet, F. (2012). Stochastic evaluation of life insurance contracts: Model point on asset trajectories and measurement of the error related to aggregation. Insurance: Mathematics and Economics, 51(3), 624-631. URL http://www.ressources-actuarielles.net/EXT/ISFA/1226.nsf/0/ab539dcebcc4e77ac12576c6004afa67/$FILE/Article_US_v1.5.pdf

Author

T. Moudiki

Examples


# Number of risk factors
d <- 6

# Number of possible combinations of the risk factors
dd <- d*(d-1)/2

# Family : Gaussian copula for all
fam1 <- rep(1,dd)

# Correlation coefficients between the risk factors (d*(d-1)/2)
par1 <- c(0.2,0.69,0.73,0.22,-0.09,0.51,0.32,0.01,0.82,0.01,
        -0.2,-0.32,-0.19,-0.17,-0.06)

                 
# Simulation of shocks for the 6 risk factors
simshocks(n = 10, horizon = 5, family = fam1, par = par1)
#> [[1]]
#> Time Series:
#> Start = 1 
#> End = 5 
#> Frequency = 1 
#>      Series 1   Series 2   Series 3    Series 4   Series 5   Series 6
#> 1 -0.56047566  1.7869131  0.4264642 -1.12310858  0.3796395  1.0255714
#> 2  0.07050839  0.7013559  0.8781335  0.77996513 -1.0185754  0.1813035
#> 3  0.46091620 -0.2179749  0.5539177 -0.02854677  0.4482098  0.3852804
#> 4 -0.44566197 -0.6250393 -0.3804710 -0.22577097  2.0500847 -0.2204866
#> 5  0.40077145  0.1533731 -1.2653963  0.58461376  1.0057385  0.4351815
#>     Series 7    Series 8    Series 9  Series 10
#> 1  0.9935039 -0.04502772  0.11764659  1.1313372
#> 2 -0.6279061 -0.38022652 -0.25609219  1.9091036
#> 3  2.1873329  0.60796431  0.23538659 -0.2621975
#> 4 -1.0264209  0.51940720 -0.07130809 -1.6015362
#> 5 -0.2466919 -0.64070600  0.04123292  0.6879168
#> 
#> [[2]]
#> Time Series:
#> Start = 1 
#> End = 5 
#> Frequency = 1 
#>    Series 1   Series 2   Series 3   Series 4   Series 5   Series 6    Series 7
#> 1 0.6722847  1.6259863 -1.1997314  0.1611324 -0.3828130  0.1990412 -0.28034381
#> 2 1.2285547 -0.6282633  1.0444471 -1.1362966 -1.5111093 -0.7306552  0.03375134
#> 3 0.2715668 -0.3717411 -3.0513335  1.6500208  0.7111874 -0.2358847  0.73675819
#> 4 1.5669032  0.9239720 -1.2719468 -1.0729361  0.2606856 -0.6573623 -0.02531700
#> 5 0.6181570 -0.7713037 -0.4136982 -0.9315257 -0.5190279  0.3812486  1.10311729
#>     Series 8   Series 9  Series 10
#> 1 -0.6607546  0.4338646 -2.2181617
#> 2 -0.3016553  1.7823892  0.2993802
#> 3  0.5973831 -0.5607160 -0.7926400
#> 4  1.4526781  1.0806470  0.1114811
#> 5 -0.3835993  0.1973435  1.0218549
#> 
#> [[3]]
#> Time Series:
#> Start = 1 
#> End = 5 
#> Frequency = 1 
#>     Series 1    Series 2   Series 3      Series 4    Series 5    Series 6
#> 1 -0.2345184  2.02088538 -0.3735909 -0.8804472359 -0.22362930  0.52805588
#> 2  0.5866966 -0.09997445  1.4447626 -0.0006061193 -1.86268367 -0.25031389
#> 3 -0.4020142 -0.91282603 -0.8476859  0.5774157185  0.57643548 -0.08283222
#> 4  1.0785287 -1.08620808 -1.1455943  0.4011543678  1.05258004 -0.17661800
#> 5  0.5481387 -0.90492837  0.4167594  0.0854874618 -0.01892002  0.20819535
#>      Series 7   Series 8   Series 9  Series 10
#> 1  0.84646854 -0.7653020 -0.3541279 -1.0497255
#> 2  0.47391942  0.2248134  1.6621095  0.3872504
#> 3  2.57622612 -0.4085458 -0.0180337 -1.4386109
#> 4 -1.08272768  1.0540553  1.2626901 -1.2729253
#> 5  0.04759496 -1.0673601 -0.1633536  2.1153488
#> 
#> [[4]]
#> Time Series:
#> Start = 1 
#> End = 5 
#> Frequency = 1 
#>    Series 1   Series 2   Series 3   Series 4   Series 5   Series 6   Series 7
#> 1 0.5350780  2.1253573 -0.3656586 -0.4750304 -0.3289986  0.3014879  0.2152953
#> 2 0.2528368 -0.1375451  0.7422637  0.2990548 -0.7212623 -0.5441165  0.4227429
#> 3 1.1974486 -0.9419773 -0.8015841  1.1438202  0.7330484  0.2637424  1.6191018
#> 4 0.3784485 -0.3271934 -0.2678103 -0.7216588  1.3118448 -0.8789891  0.4379789
#> 5 0.5676065  0.3690616 -0.1407855  1.2851167 -0.3555498  0.4297121 -0.2867318
#>     Series 8   Series 9  Series 10
#> 1 0.10924798  0.3914533 -0.3619871
#> 2 0.58282841  0.6246217  1.6133161
#> 3 0.36748054  0.5483001 -0.5377357
#> 4 0.56538482  0.9689123 -1.9032989
#> 5 0.09251165 -0.1845964 -0.1035075
#> 
#> [[5]]
#> Time Series:
#> Start = 1 
#> End = 5 
#> Frequency = 1 
#>     Series 1   Series 2    Series 3    Series 4     Series 5   Series 6
#> 1  1.1758670 -1.6866274  1.08740353 -0.67581850  0.004658218 -0.7398000
#> 2  1.6314701 -0.6298932  0.71522326  0.40744998  0.166758093  0.2062153
#> 3 -0.5270457 -0.3378476 -0.04448664  1.07970779  0.885028374  0.7432457
#> 4 -0.0742269  1.0145182 -0.23408538 -1.71441199 -1.579877042  1.0734505
#> 5 -0.4928885  1.2999148  0.20463945 -0.00950331 -0.033875816  1.2266263
#>     Series 7   Series 8    Series 9 Series 10
#> 1  0.4448549 -1.5104379 -0.30722882  1.381299
#> 2 -1.1999179 -1.0588108 -1.11902624  1.289987
#> 3 -0.0207182  0.4502425 -1.01550928 -1.131667
#> 4 -0.1673887  0.2008638 -0.07811612 -1.384104
#> 5 -0.7665062 -1.1133601 -1.76196703 -1.228187
#> 
#> [[6]]
#> Time Series:
#> Start = 1 
#> End = 5 
#> Frequency = 1 
#>     Series 1    Series 2   Series 3     Series 4    Series 5    Series 6
#> 1 -0.3103976  0.76318238 -1.0979225  0.003029124  0.89884202 -0.09187605
#> 2  0.8752863 -0.63069767  0.6623841 -1.372433719 -0.20222233 -0.75799037
#> 3 -0.6744436  0.01083422 -2.4413663  1.380614845  0.82236942 -0.66448955
#> 4  2.4825724  0.60567090 -0.4439584 -0.153376051 -0.60319687 -0.15155253
#> 5 -0.1691696 -0.74760262 -1.0647139 -1.239178814 -0.07938478  0.33159545
#>       Series 7   Series 8   Series 9  Series 10
#> 1 -0.563634349 -0.1043617  0.8055647 -1.4728195
#> 2 -0.404626944  0.5055419  0.7734823 -0.6155155
#> 3  0.006276974  0.7436983 -0.7123926 -0.6337279
#> 4  0.220477590  0.2029238  1.4070095  1.3902245
#> 5  0.625495921  0.3977599  0.3363244  0.8938468
#> 


# Simulation of shocks for the 6 risk factors
# on a quarterly basis
simshocks(n = 10, frequency = "quarterly", horizon = 2, family = fam1, 
par = par1)
#> [[1]]
#>         Series 1   Series 2    Series 3   Series 4    Series 5    Series 6
#> 0 Q2 -0.56047566 -0.6250393  0.77996513  1.0057385  2.18733289  0.11764659
#> 0 Q3  0.07050839  0.1533731 -0.02854677  1.0255714 -1.02642089 -0.25609219
#> 0 Q4  0.46091620  0.4264642 -0.22577097  0.1813035 -0.24669189  0.23538659
#> 1 Q1 -0.44566197  0.8781335  0.58461376  0.3852804 -0.04502772 -0.07130809
#> 1 Q2  0.40077145  0.5539177  0.37963949 -0.2204866 -0.38022652  0.04123292
#> 1 Q3  1.78691310 -0.3804710 -1.01857537  0.4351815  0.60796431  1.13133725
#> 1 Q4  0.70135592 -1.2653963  0.44820977  0.9935039  0.51940720  1.90910360
#> 2 Q1 -0.21797492 -1.1231086  2.05008471 -0.6279061 -0.64070600 -0.26219749
#>        Series 7    Series 8    Series 9   Series 10
#> 0 Q2 -1.6015362  0.51686204  0.09458353 -0.44116324
#> 0 Q3  0.6879168  0.06529305  1.99721339 -1.28471571
#> 0 Q4  0.7877389 -0.74133610 -0.61116592  1.10984813
#> 1 Q1 -1.0083766  0.31048073  1.31241296  0.05974994
#> 1 Q2  0.5629896 -1.06332611 -0.41433995  0.88465049
#> 1 Q3 -0.3745809 -0.86551286 -0.59461725 -0.09031959
#> 1 Q4 -1.2601552  1.10992030  0.11924524 -0.57438870
#> 2 Q1  0.2982276 -0.49929204 -0.51606383  0.41898241
#> 
#> [[2]]
#>        Series 1   Series 2   Series 3    Series 4   Series 5   Series 6
#> 0 Q2  0.6722847  0.9239720 -1.1362966 -0.51902791  0.7367582  0.4338646
#> 0 Q3  1.2285547 -0.7713037  1.6500208  0.19904124 -0.0253170  1.7823892
#> 0 Q4  0.2715668 -1.1997314 -1.0729361 -0.73065521  1.1031173 -0.5607160
#> 1 Q1  1.5669032  1.0444471 -0.9315257 -0.23588465 -0.6607546  1.0806470
#> 1 Q2  0.6181570 -3.0513335 -0.3828130 -0.65736226 -0.3016553  0.1973435
#> 1 Q3  1.6259863 -1.2719468 -1.5111093  0.38124855  0.5973831 -2.2181617
#> 1 Q4 -0.6282633 -0.4136982  0.7111874 -0.28034381  1.4526781  0.2993802
#> 2 Q1 -0.3717411  0.1611324  0.2606856  0.03375134 -0.3835993 -0.7926400
#>        Series 7   Series 8   Series 9   Series 10
#> 0 Q2  0.1114811  0.4584214  1.3570990  2.56521992
#> 0 Q3  1.0218549 -0.7268543 -0.1248126 -1.22662560
#> 0 Q4 -2.1432975  0.1595385 -1.3720053  0.76009706
#> 1 Q1 -2.5523994  2.2137317  0.4510361 -0.36610978
#> 1 Q2 -1.4506516 -1.0627030  0.3775403  0.83015454
#> 1 Q3  0.9699679 -2.2328758 -0.9718009 -0.97132083
#> 1 Q4 -2.0437120  0.1114964  0.3861933  0.74671964
#> 2 Q1 -0.4932235  1.7626357 -0.3814761 -0.05288537
#> 
#> [[3]]
#>         Series 1   Series 2      Series 3    Series 4    Series 5   Series 6
#> 0 Q2 -0.23451841 -1.0862081 -0.0006061193 -0.01892002  2.57622612 -0.3541279
#> 0 Q3  0.58669659 -0.9049284  0.5774157185  0.52805588 -1.08272768  1.6621095
#> 0 Q4 -0.40201424 -0.3735909  0.4011543678 -0.25031389  0.04759496 -0.0180337
#> 1 Q1  1.07852870  1.4447626  0.0854874618 -0.08283222 -0.76530203  1.2626901
#> 1 Q2  0.54813871 -0.8476859 -0.2236292983 -0.17661800  0.22481344 -0.1633536
#> 1 Q3  2.02088538 -1.1455943 -1.8626836685  0.20819535 -0.40854585 -1.0497255
#> 1 Q4 -0.09997445  0.4167594  0.5764354803  0.84646854  1.05405531  0.3872504
#> 2 Q1 -0.91282603 -0.8804472  1.0525800373  0.47391942 -1.06736010 -1.4386109
#>        Series 7   Series 8    Series 9  Series 10
#> 0 Q2 -1.2729253  0.7201194  0.01197392  0.2451157
#> 0 Q3  2.1153488 -0.2549239  1.55456424 -1.6091435
#> 0 Q4  0.1554928 -1.0779244 -1.63064472  1.4090834
#> 1 Q1 -1.6557978  1.2966512  0.81152344 -0.5398917
#> 1 Q2 -0.4323802 -0.2674888 -0.40894597  0.2242040
#> 1 Q3  0.7906248 -1.5203415  0.29624719 -0.2878922
#> 1 Q4  0.4733476  0.7769759  0.37051449 -0.8916945
#> 2 Q1  0.3938107  0.4907062 -1.07885833  0.4395150
#> 
#> [[4]]
#>        Series 1   Series 2   Series 3   Series 4    Series 5   Series 6
#> 0 Q2  0.5350780 -0.3271934  0.2990548 -0.3555498  1.61910177  0.3914533
#> 0 Q3  0.2528368  0.3690616  1.1438202  0.3014879  0.43797888  0.6246217
#> 0 Q4  1.1974486 -0.3656586 -0.7216588 -0.5441165 -0.28673181  0.5483001
#> 1 Q1  0.3784485  0.7422637  1.2851167  0.2637424  0.10924798  0.9689123
#> 1 Q2  0.5676065 -0.8015841 -0.3289986 -0.8789891  0.58282841 -0.1845964
#> 1 Q3  2.1253573 -0.2678103 -0.7212623  0.4297121  0.36748054 -0.3619871
#> 1 Q4 -0.1375451 -0.1407855  0.7330484  0.2152953  0.56538482  1.6133161
#> 2 Q1 -0.9419773 -0.4750304  1.3118448  0.4227429  0.09251165 -0.5377357
#>        Series 7   Series 8   Series 9   Series 10
#> 0 Q2 -1.9032989  1.7612249 -0.0111699  0.45092004
#> 0 Q3 -0.1035075 -0.3322140  1.8573443 -1.02086249
#> 0 Q4  0.4620407  0.7149256  0.8052670  0.25567007
#> 1 Q1 -1.2741089  0.5772326  0.9167462 -1.06196000
#> 1 Q2  0.6110959 -1.2822959  0.4190431  0.03938985
#> 1 Q3 -0.3806010 -1.1204490 -0.9134578 -0.67258353
#> 1 Q4 -2.4730755  1.9497361 -0.1298143  0.36219345
#> 2 Q1  0.7266751  0.5116701  0.2616873 -1.86614223
#> 
#> [[5]]
#>        Series 1    Series 2     Series 3    Series 4   Series 5    Series 6
#> 0 Q2  1.1758670  1.01451818  0.407449982 -0.03387582 -0.0207182 -0.30722882
#> 0 Q3  1.6314701  1.29991476  1.079707789 -0.73980004 -0.1673887 -1.11902624
#> 0 Q4 -0.5270457  1.08740353 -1.714411989  0.20621532 -0.7665062 -1.01550928
#> 1 Q1 -0.0742269  0.71522326 -0.009503310  0.74324570 -1.5104379 -0.07811612
#> 1 Q2 -0.4928885 -0.04448664  0.004658218  1.07345048 -1.0588108 -1.76196703
#> 1 Q3 -1.6866274 -0.23408538  0.166758093  1.22662627  0.4502425  1.38129940
#> 1 Q4 -0.6298932  0.20463945  0.885028374  0.44485492  0.2008638  1.28998730
#> 2 Q1 -0.3378476 -0.67581850 -1.579877042 -1.19991786 -1.1133601 -1.13166726
#>        Series 7   Series 8   Series 9  Series 10
#> 0 Q2 -1.3841045 -0.5220708 -0.9165161 -1.1415985
#> 0 Q3 -1.2281869  2.0709995 -1.0008727  0.3610987
#> 0 Q4  0.2011321 -0.2457595  1.7162297 -0.0392580
#> 1 Q1 -0.4815391 -0.3883673  0.8749420 -0.2410261
#> 1 Q2  0.9430166 -0.7259073 -0.9080290  2.4430972
#> 1 Q3 -1.1644793 -0.3421771 -0.4280247 -0.6533462
#> 1 Q4 -0.9891974  0.6077600  1.2227210 -0.2001274
#> 2 Q1 -0.6942303 -0.5665406  1.4514146 -0.1046049
#> 
#> [[6]]
#>         Series 1     Series 2   Series 3    Series 4     Series 5   Series 6
#> 0 Q2 -0.31039764  0.605670897 -1.3724337 -0.07938478  0.006276974  0.8055647
#> 0 Q3  0.87528627 -0.747602621  1.3806148 -0.09187605  0.220477590  0.7734823
#> 0 Q4 -0.67444356 -1.097922465 -0.1533761 -0.75799037  0.625495921 -0.7123926
#> 1 Q1  2.48257243  0.662384105 -1.2391788 -0.66448955 -0.104361740  1.4070095
#> 1 Q2 -0.16916958 -2.441366300  0.8988420 -0.15155253  0.505541870  0.3363244
#> 1 Q3  0.76318238 -0.443958401 -0.2022223  0.33159545  0.743698334 -1.4728195
#> 1 Q4 -0.63069767 -1.064713938  0.8223694 -0.56363435  0.202923777 -0.6155155
#> 2 Q1  0.01083422  0.003029124 -0.6031969 -0.40462694  0.397759881 -0.6337279
#>        Series 7   Series 8    Series 9  Series 10
#> 0 Q2  1.3902245 -0.6214579  0.93745844  2.3792090
#> 0 Q3  0.8938468 -0.8046557 -1.13493065 -1.1434792
#> 0 Q4 -2.2210951 -0.1690197 -1.63972237  0.5661017
#> 1 Q1 -1.8832011  2.2373134 -0.65595189  0.6269002
#> 1 Q2 -1.7741899 -0.3687168  0.44219698  0.6079844
#> 1 Q3  1.0800479 -1.8007328 -1.92958545 -0.4806883
#> 1 Q4 -1.0621723 -0.8270024  0.42096010  1.2994008
#> 2 Q1 -0.6873189  1.8946099 -0.07308333  0.4041804
#> 


# Simulation of shocks for the 6 risk factors simulation
# on a quarterly basis, with antithetic variates and moment matching. 
s0 <- simshocks(n = 10, method = "hyb", horizon = 4, 
family = fam1, par = par1)

 
s0[[2]]
#> Time Series:
#> Start = 1 
#> End = 4 
#> Frequency = 1 
#>     Series 1   Series 2   Series 3    Series 4   Series 5   Series 6   Series 7
#> 1 -0.4559612  0.2986849  0.8028743 -1.36113565 -0.5651429  0.4559612 -0.2986849
#> 2  0.5101199  1.2788266 -0.6691731 -0.09133266  1.4969870 -0.5101199 -1.2788266
#> 3 -1.1518928 -0.9134931 -1.0411869  0.52112934 -0.5182504  1.1518928  0.9134931
#> 4  1.0977341 -0.6640183  0.9074856  0.93133898 -0.4135937 -1.0977341  0.6640183
#>     Series 8    Series 9  Series 10
#> 1 -0.8028743  1.36113565  0.5651429
#> 2  0.6691731  0.09133266 -1.4969870
#> 3  1.0411869 -0.52112934  0.5182504
#> 4 -0.9074856 -0.93133898  0.4135937
colMeans(s0[[1]])
#>      Series 1      Series 2      Series 3      Series 4      Series 5 
#> -2.775558e-17  1.387779e-17 -2.081668e-17  5.551115e-17  2.775558e-17 
#>      Series 6      Series 7      Series 8      Series 9     Series 10 
#>  2.775558e-17 -1.387779e-17  2.081668e-17 -5.551115e-17 -2.775558e-17 
colMeans(s0[[5]])
#>      Series 1      Series 2      Series 3      Series 4      Series 5 
#> -2.775558e-17  5.551115e-17 -1.977585e-16  6.938894e-18  6.245005e-17 
#>      Series 6      Series 7      Series 8      Series 9     Series 10 
#>  2.775558e-17 -5.551115e-17  1.977585e-16 -6.938894e-18 -6.245005e-17 
apply(s0[[3]], 2, sd)
#>  Series 1  Series 2  Series 3  Series 4  Series 5  Series 6  Series 7  Series 8 
#>         1         1         1         1         1         1         1         1 
#>  Series 9 Series 10 
#>         1         1 
apply(s0[[4]], 2, sd)
#>  Series 1  Series 2  Series 3  Series 4  Series 5  Series 6  Series 7  Series 8 
#>         1         1         1         1         1         1         1         1 
#>  Series 9 Series 10 
#>         1         1