rAssetDistribution: rAssetDistribution

Description Usage Arguments Examples

View source: R/Interface.R

Description

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

Usage

1
2
3
4
5
6
7
  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

1
2
3
4
5
6
7
data(ZC)
rAssetDistribution(type="Zero-Coupon",t=2,T=3,vol=.1, k=2, ZC=ZC, nScenarios=100)
rAssetDistribution(type="Bond",t=3,T=35,nCoupons=20, couponsRate=0.3,vol=.1, k=2, ZC=ZC, nScenarios=10)
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)
rAssetDistribution(type="EuroPut_Stock",5,25,Strike=98.5,vol=.1,k=2,ZC=ZC,volStock=.2, stock0=100, rho=.5,nScenarios=10)
rAssetDistribution(type="EuroCall_ZC",4,4.5,s=5, Strike=.985,vol=.1, k=2, ZC=ZC,nScenarios=10)
rAssetDistribution(type="EuroPut_ZC",4,4.5,s=5, Strike=.9385,vol=.1, k=2, ZC=ZC,nScenarios=10)

Example output

  [1] 1.0200947 1.0267387 0.9744892 0.9606749 1.0110477 0.9912604 0.9663441
  [8] 1.0200963 0.9462587 1.0255628 0.9975338 0.9843497 0.9814071 0.9625840
 [15] 0.9421740 0.9564491 0.9785998 0.9865768 0.9620246 0.9607408 0.9687032
 [22] 0.9786704 0.9858158 0.9749318 0.9941408 0.9562401 0.9813432 1.0055123
 [29] 0.9621253 0.9758989 1.0030967 1.0157025 0.9719185 0.9850561 1.0068039
 [36] 0.9936155 0.9834051 1.0356481 0.9894903 1.0078486 0.9680811 0.9679315
 [43] 0.9961532 0.9845072 0.9740036 1.0021922 1.0101138 0.9897309 1.0208914
 [50] 0.9990090 1.0072297 0.9827502 0.9701166 1.0015219 0.9908135 0.9820379
 [57] 0.9786597 0.9995512 0.9897653 0.9871702 1.0114645 1.0187892 0.9935201
 [64] 0.9618987 0.9988964 0.9823950 0.9633089 0.9208667 0.9694336 1.0092161
 [71] 0.9750908 0.9907690 0.9886147 0.9885708 1.0186566 0.9720409 0.9916239
 [78] 0.9634454 0.9450112 0.9970693 0.9953612 0.9712089 0.9982044 0.9874066
 [85] 0.9999355 0.9850679 0.9865218 0.9952062 0.9639211 1.0028521 0.9807041
 [92] 0.9841520 0.9467185 1.0078211 0.9459669 0.9975983 0.9417879 1.0125087
 [99] 0.9765641 0.9642751
 [1] 114.6406 116.1968 108.8384 115.0922 114.1192 115.1478 112.3584 114.6775
 [9] 111.8710 109.7562
 [1]    28946.765  9521306.988 30516054.598     7461.356  1698660.932
 [6]     3989.352     1523.103  3860255.202     7224.388     4311.282
 [1] 13.768113 14.020257 14.932676 17.220664 10.862502  8.081972 12.342599
 [8]  9.520910  3.849802 18.030983
 [1] 0.005714792 0.004523395 0.004736132 0.003756932 0.006462070 0.005136196
 [7] 0.007411707 0.005864661 0.008045733 0.009693882
 [1] 2.321785e-06 9.650192e-07 1.389181e-05 2.661905e-05 3.933956e-08
 [6] 3.032010e-06 3.545145e-07 6.644446e-08 2.177689e-06 1.932096e-06

ESG documentation built on May 30, 2017, 12:34 a.m.