Direct generation for all risk factors. Object creation is managed internally.

rAllRisksFactors(horizon, nScenarios, ZC, vol, k,
    volStock, stock0, rho, volRealEstate, realEstate0, eta,
    liquiditySpread0, defaultSpread0, volDefault, alpha,
    beta)

Arguments

horizon

Horizon of projection

nScenarios

Number of scenarios

ZC

ZC rate input

vol

Volatility for short rates

k

k for rates in vasicek model

volStock

Volatility for stock

stock0

Initial value for stock

rho

Correlation between stock and short rates

volRealEstate

Volatility for real estate

realEstate0

Initial value for real estate

eta

eta Volatility for LMN model

liquiditySpread0

Initial value for liquidity spread

defaultSpread0

Initial value for default spread

volDefault

Volatilty for default spread

alpha

alpha for LMN model

beta

beta Volatility for LMN model

Examples

data(ZC)
rAllRisksFactors(horizon=5, nScenarios=10, ZC, vol=.1, k=2, volStock=.2, stock0=100, rho=.5,
volRealEstate=.15, realEstate0=50, eta=.05, liquiditySpread0=.01, defaultSpread0=.01,
volDefault=.2, alpha=.1, beta=1)
#> $shortRate
#>            [,1]         [,2]         [,3]         [,4]         [,5]
#>  [1,] 0.0034327 -0.030448647 -0.003959741 -0.010468622  0.135450082
#>  [2,] 0.0034327  0.022556290 -0.009081097  0.085893877  0.088497067
#>  [3,] 0.0034327 -0.015520485  0.076216289  0.084786518 -0.064872287
#>  [4,] 0.0034327 -0.008829486  0.021937307 -0.013894316 -0.011911184
#>  [5,] 0.0034327  0.091530959  0.035892355 -0.021874700  0.034451968
#>  [6,] 0.0034327  0.006864770 -0.005043609 -0.072655792  0.058100287
#>  [7,] 0.0034327 -0.028739843 -0.027523581 -0.078075586  0.023711194
#>  [8,] 0.0034327 -0.071418879  0.036785066  0.006348143  0.029927504
#>  [9,] 0.0034327  0.037220782  0.024505128  0.127455159 -0.001112218
#> [10,] 0.0034327  0.043932301 -0.008188359  0.040187487  0.067591285
#>               [,6]
#>  [1,]  0.029153419
#>  [2,] -0.000381538
#>  [3,]  0.055975329
#>  [4,] -0.033605183
#>  [5,]  0.022403138
#>  [6,]  0.048133288
#>  [7,]  0.040015452
#>  [8,] -0.042402032
#>  [9,] -0.043632283
#> [10,]  0.123356622
#> 
#> $s
#>       [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
#>  [1,]  100  74.19196  73.03727  56.61068  66.77431  60.19262
#>  [2,]  100 105.12105  94.28527 124.67814 156.70382 137.67515
#>  [3,]  100  99.27350 172.72170 207.76985 151.08462 192.37318
#>  [4,]  100  57.66931  60.17065  34.78768  28.83285  16.42159
#>  [5,]  100 121.89672 171.04882 130.61620 175.31220 140.08110
#>  [6,]  100  75.82276  73.96078  49.15219  68.18993  56.48169
#>  [7,]  100  80.94098  75.87513  57.24861  41.34934  34.64927
#>  [8,]  100  91.67028  98.39271 104.55042  85.86056  76.13067
#>  [9,]  100 107.11446  83.63526 100.25575  86.24614  60.41519
#> [10,]  100 112.71071  89.07464  99.12209 113.65656 108.46105
#> 
#> $realEstate
#>       [,1]     [,2]     [,3]     [,4]     [,5]     [,6]
#>  [1,]   50 42.31591 34.19158 29.14398 29.73612 30.72587
#>  [2,]   50 61.81855 58.31117 41.52542 39.77027 47.80916
#>  [3,]   50 40.13406 44.70624 50.38714 36.72275 34.37054
#>  [4,]   50 64.68002 61.72826 58.19752 70.50660 85.38142
#>  [5,]   50 43.73388 50.89625 56.02040 69.81887 51.47301
#>  [6,]   50 60.04671 61.69193 76.43295 73.54964 53.02402
#>  [7,]   50 59.67289 57.05081 55.53424 54.46065 54.79220
#>  [8,]   50 37.36009 38.40510 36.19613 31.69216 25.42192
#>  [9,]   50 46.38295 44.87318 48.31731 45.93118 48.17033
#> [10,]   50 49.36869 49.59541 54.24059 59.80129 69.61425
#> 
#> $liquiditySpread
#>       [,1]        [,2]         [,3]        [,4]        [,5]         [,6]
#>  [1,] 0.01 -0.08902356 -0.111251778 -0.06211951 -0.17120385 -0.174638362
#>  [2,] 0.01 -0.02968091 -0.025725646  0.07681632  0.06868202  0.119471284
#>  [3,] 0.01 -0.07965959 -0.097011431 -0.03730164 -0.01439975 -0.018008546
#>  [4,] 0.01 -0.02613483  0.004661393 -0.03043213 -0.08470339  0.001962618
#>  [5,] 0.01 -0.10034765 -0.157607323 -0.19300987 -0.28895202 -0.286561909
#>  [6,] 0.01  0.10479317  0.059392802  0.01381746  0.01283877 -0.022800364
#>  [7,] 0.01  0.07693844  0.071488484  0.03489222  0.05354796  0.077032502
#>  [8,] 0.01 -0.02642810 -0.044086669 -0.07319046 -0.03738336 -0.091291331
#>  [9,] 0.01  0.08425365  0.059141120  0.06935907  0.11037083  0.059912910
#> [10,] 0.01  0.04837814  0.104012946  0.07095431  0.09141850  0.056725502
#> 
#> $defaultSpread
#>       [,1]       [,2]       [,3]       [,4]      [,5]       [,6]
#>  [1,] 0.01 0.05165717 0.05925098 0.12034461 0.2471999 0.27060564
#>  [2,] 0.01 0.07045040 0.15333675 0.14964608 0.3034232 0.27321037
#>  [3,] 0.01 0.05700755 0.19595782 0.20699175 0.4098144 0.24012128
#>  [4,] 0.01 0.11733174 0.14050406 0.03726909 0.1559101 0.06988572
#>  [5,] 0.01 0.07411692 0.15125329 0.10745473 0.2147343 0.26966563
#>  [6,] 0.01 0.12902465 0.10883870 0.13923609 0.3095874 0.34119597
#>  [7,] 0.01 0.07149097 0.11553149 0.20458152 0.1497217 0.27432294
#>  [8,] 0.01 0.19555399 0.43235925 0.37528232 0.3462202 0.37531546
#>  [9,] 0.01 0.08760221 0.08268719 0.08324103 0.1191608 0.11725315
#> [10,] 0.01 0.10441077 0.12297562 0.04071620 0.0804117 0.10018420
#>