Description Usage Arguments Value Examples
View source: R/Step4_MonteCarloValuation.R
Valuate a VA policy specified in inPolicy based on the simulated fund scenarios fundScen. The time step length is specified in dT and the discount rate for each period is specified in df.
1 | valuateOnePolicy(inPolicy, mortTable, fundScen, dT = 1/12, df)
|
inPolicy |
A vector containing 45 attributes of a VA policy, usually a row of a VA portfolio dataframe. |
mortTable |
A dataframe with three columns of doubles representing the mortality table. |
fundScen |
A numScen-by-numStep-by-numFund array of doubles of return factors (i.e., exp(mu_t dt)) in each period. |
dT |
A double of stepsize in years; dT = 1 / 12 would be monthly. |
df |
A vector of doubles of risk-free discount rates of different tenor (not forward rates), should have length being numStep. |
Outputs a list of doubles of policyValue, the average discounted payoff of the VA, and riskCharge, the average discounted risk charges.
1 2 3 | fundScen <- genFundScen(fundMap, indexScen)[1, , ]
exPolicy <- VAPort[1, ]
valuateOnePolicy(exPolicy, mortTable, fundScen, 1 / 12, cForwardCurve)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.