Direct short rate generation. Object creation is managed internally.

rShortRate(horizon, nScenarios, ZC, vol, k)

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

Examples

data(ZC)
rShortRate(horizon=15, nScenarios=10, ZC=ZC, vol=.1, k=2)
#>            [,1]        [,2]         [,3]         [,4]         [,5]         [,6]
#>  [1,] 0.0034327 -0.13315802  0.047888549  0.007639738  0.055375633  0.084043318
#>  [2,] 0.0034327  0.11224847 -0.015170838  0.004635080 -0.017238259  0.085205293
#>  [3,] 0.0034327  0.03224739  0.076785267 -0.005800039 -0.036004378  0.076991665
#>  [4,] 0.0034327 -0.00769738  0.041976192  0.028639856  0.144082525 -0.013529855
#>  [5,] 0.0034327  0.02894402  0.001197139 -0.064228510  0.003751587  0.005002285
#>  [6,] 0.0034327  0.03830194  0.019206389  0.101933698  0.048930143 -0.051375457
#>  [7,] 0.0034327  0.05833132  0.005780608  0.004809138  0.070393905  0.045638452
#>  [8,] 0.0034327  0.04291440 -0.009106517  0.034155339  0.094016354  0.105811676
#>  [9,] 0.0034327  0.06734165 -0.044519717 -0.022927624  0.021035317  0.062455010
#> [10,] 0.0034327 -0.05876263  0.001084229  0.027156465  0.043078942  0.067732550
#>               [,7]        [,8]       [,9]        [,10]        [,11]       [,12]
#>  [1,]  0.003361873  0.07606889 0.10625519  0.016531194  0.021509898 -0.01172406
#>  [2,]  0.076578190  0.02402742 0.08111952  0.015933595 -0.048123897  0.02894031
#>  [3,]  0.091213838  0.01470340 0.06130405  0.002769253  0.102593291 -0.03564313
#>  [4,]  0.052394800 -0.04405454 0.07153916 -0.007666722  0.097957652  0.05261362
#>  [5,]  0.088865806 -0.02790014 0.02324764  0.040347256  0.040753192 -0.03852020
#>  [6,]  0.027169447  0.07619801 0.05864395  0.025053929  0.052023006  0.08113248
#>  [7,]  0.008453716  0.09299292 0.09660403  0.051907400  0.120550539  0.06780994
#>  [8,]  0.030434243  0.03044896 0.15730649  0.041228448  0.064345114  0.08531481
#>  [9,]  0.061105637  0.06102504 0.09666788 -0.002418624  0.006739431  0.04834898
#> [10,] -0.011380460  0.05914564 0.06255046  0.112196605  0.071080218 -0.02651645
#>              [,13]        [,14]        [,15]       [,16]
#>  [1,]  0.007426324 -0.030089646  0.094074502  0.07947500
#>  [2,] -0.040725376  0.020021771  0.021191875  0.03060886
#>  [3,]  0.025296165  0.061309447 -0.023007786 -0.05569417
#>  [4,]  0.005876385  0.003082789  0.044309004 -0.02431879
#>  [5,]  0.045735466  0.034341073  0.083419269  0.08136254
#>  [6,]  0.094720597 -0.001363182  0.015441198  0.04754375
#>  [7,]  0.011779160  0.009016809 -0.005879001  0.04636381
#>  [8,]  0.024393143 -0.035999772  0.044408964 -0.08459497
#>  [9,] -0.089740443  0.026167376  0.017094305  0.02791735
#> [10,]  0.045561341  0.060734528  0.079132231 -0.02517972