vamc (version 0.1.0)

agePortfolio: Age a portfolio of VA policies specified in each inPolicy of inPortfolio from currentDate (specified in inPolicy) to targetDate. The againg scenario is given in fundScen. The time step length is specified in dT. Here we input a rather irrelevant parameter df to "hack" for a more flexible user-defined projection function.

Description

Age a portfolio of VA policies specified in each inPolicy of inPortfolio from currentDate (specified in inPolicy) to targetDate. The againg scenario is given in fundScen. The time step length is specified in dT. Here we input a rather irrelevant parameter df to "hack" for a more flexible user-defined projection function.

Usage

agePortfolio(inPortfolio, mortTable, fundScen, scenDates, dT = 1/12,
  targetDate, df)

Arguments

inPortfolio

A dataframe containing numPolicy rows and 45 attributes of each VA policy.

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.

scenDates

A vector containing strings in the format of "YYYY-MM-DD" of dates corresponding to each period in fundScen.

dT

A double of stepsize in years; dT = 1 / 12 would be monthly.

targetDate

A string in the format of "YYYY-MM-DD" of valuation date of the portfolio.

df

A vector of doubles of risk-free discount rates of different tenor (not forward rates), should have length being numStep.

Value

Outputs a dataframe containing numPolicy rows and 45 attributes of each VA policy, where currentDate, gbAmt, GMWBbalance, withdrawal, & fundValue of each policy could be updated as a result of aging.

Examples

Run this code
# NOT RUN {
targetDate <- "2016-01-01"
histFundScen <- genFundScen(fundMap, histIdxScen)
agePortfolio(VAPort[1:2, ], mortTable, histFundScen, histDates, dT = 1 / 12,
targetDate, cForwardCurve)
# }
# NOT RUN {
targetDate <- "2001-01-01"
histFundScen <- genFundScen(fundMap, histIdxScen)
agePortfolio(VAPort, mortTable, histFundScen, histDates, dT = 1 / 12,
targetDate, cForwardCurve)
# }
# NOT RUN {
VAPort[1, c("currentDate", "issueDate")] <- c("2001-01-01", "2001-01-01")
histFundScen <- genFundScen(fundMap, histIdxScen)
agePortfolio(VAPort, mortTable, histFundScen, histDates, dT = 1 / 12,
targetDate, cForwardCurve)
# }

Run the code above in your browser using DataLab