vamc (version 0.1.0)

valuateOnePolicy: 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.

Description

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.

Usage

valuateOnePolicy(inPolicy, mortTable, fundScen, dT, df)

Arguments

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.

Value

Outputs a list of doubles of policyValue, the average discounted payoff of the VA, and riskCharge, the average discounted risk charges.

Examples

Run this code
# NOT RUN {
fundScen <- genFundScen(fundMap, indexScen)[1, , ]
exPolicy <- VAPort[1, ]
valuateOnePolicy(exPolicy, mortTable, fundScen, 1 / 12, cForwardCurve)
# }

Run the code above in your browser using DataLab