Direct generation for all assets values. Object creation is managed internally.

rAssetDistribution(type, t, T, vol, k, ZC,
    nScenarios = NULL, volStock = NULL, stock0 = NULL,
    rho = NULL, volRealEstate = NULL, realEstate0 = NULL,
    eta = NULL, liquiditySpread0 = NULL,
    defaultSpread0 = NULL, volDefault = NULL, alpha = NULL,
    beta = NULL, nCoupons = NULL, couponsRate = NULL,
    omega = NULL, s = NULL, Strike = NULL)

Arguments

type

Type of asset. Can be : Zero-Coupon, Bond, CBond, ConvBond, EuroCall_S, EuroPut_Stock, EuroCall_ZC, EuroPut_ZC or CDS.

t

Date of pricing (has to be an integer)

T

Date of maturity for the option

vol

Volatility for short rates

k

k for rates in vasicek model

ZC

ZC rate input

nScenarios

Number of scenarios

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

nCoupons

Number of coupons

couponsRate

Rate of coupons

omega

Recoverables in case of default

s

Date of maturity for the underlying

Strike

Strike for options

Examples

data(ZC)
rAssetDistribution(type="Zero-Coupon",t=2,T=3,vol=.1, k=2, ZC=ZC, nScenarios=100)
#>   [1] 0.9835229 0.9555664 0.9734335 0.9819027 0.9775221 1.0104179 0.9820808
#>   [8] 0.9769661 0.9706560 0.9401906 0.9974686 0.9923582 0.9755051 0.9722557
#>  [15] 0.9511412 1.0295458 0.9919226 0.9683134 1.0180684 0.9624288 0.9970124
#>  [22] 0.9906506 0.9982107 1.0045035 0.9726825 0.9931156 0.9675407 0.9991878
#>  [29] 0.9697135 0.9915159 0.9430128 0.9794540 0.9742267 0.9820851 0.9677219
#>  [36] 0.9811419 0.9292024 0.9533272 0.9334815 0.9880614 0.9787111 0.9890462
#>  [43] 0.9791303 0.9938277 0.9739873 1.0031530 1.0082430 0.9992459 0.9851037
#>  [50] 0.9806553 0.9704058 1.0117960 1.0059834 1.0115720 0.9581753 0.9863942
#>  [57] 0.9714205 0.9961771 0.9905021 0.9934373 0.9730967 0.9620620 1.0326765
#>  [64] 0.9813147 0.9994319 0.9651467 0.9803365 0.9718550 1.0238517 1.0117013
#>  [71] 0.9741565 1.0043181 0.9701201 1.0081588 0.9770595 0.9486543 0.9973603
#>  [78] 0.9815450 0.9738313 1.0146596 1.0000775 1.0122394 0.9737586 0.9670777
#>  [85] 0.9811121 1.0054425 0.9924512 0.9760903 0.9818707 0.9696141 1.0114298
#>  [92] 0.9560040 0.9946120 0.9914491 0.9589993 0.9669686 1.0098642 0.9687959
#>  [99] 0.9616255 0.9658105
rAssetDistribution(type="Bond",t=3,T=35,nCoupons=20, couponsRate=0.3,vol=.1, k=2,
ZC=ZC, nScenarios=10)
#>  [1] 116.2913 117.3489 112.7560 107.5950 111.2378 114.1843 108.5316 111.6647
#>  [9] 116.5002 113.0965
rAssetDistribution(type="CBond",t=5,T=35,nCoupons=5, couponsRate=0.3, omega=5,vol=.1, k=2, ZC=ZC,
nScenarios=10,eta=.05, liquiditySpread0=.01, defaultSpread0=.01, volDefault=.2, alpha=.1, beta=1)
#>  [1] 1.971813e+05 7.619896e+01 1.617188e+06 4.865188e+07 3.654897e+03
#>  [6] 7.848391e+07 2.889864e+03 3.021823e+06 2.333809e+05 4.758474e+05
rAssetDistribution(type="EuroPut_Stock",5,25,Strike=98.5,vol=.1,k=2,ZC=ZC,volStock=.2,
stock0=100, rho=.5,nScenarios=10)
#>  [1] 12.147900  6.017191  5.794292 17.361053  3.363621  6.631414  9.932342
#>  [8] 11.059139 26.461082  4.841950
rAssetDistribution(type="EuroCall_ZC",4,4.5,s=5, Strike=.985,vol=.1, k=2, ZC=ZC,nScenarios=10)
#>  [1] 0.004170284 0.011674220 0.003121754 0.008098619 0.004473409 0.010754263
#>  [7] 0.007479264 0.005201808 0.002999006 0.003666473
rAssetDistribution(type="EuroPut_ZC",4,4.5,s=5, Strike=.9385,vol=.1, k=2, ZC=ZC,nScenarios=10)
#>  [1] 1.423199e-06 2.320679e-06 4.631614e-06 7.347817e-08 1.812861e-05
#>  [6] 3.133375e-07 2.547662e-05 3.024396e-06 1.438774e-06 4.822286e-07