ageOnePolicy: Age One Policy

Description Usage Arguments Value Note Examples

View source: R/Step4_MonteCarloValuation.R

Description

Age a VA policy specified in inPolicy 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

1
2
3
4
5
6
7
8
9
ageOnePolicy(
  inPolicy,
  mortTable,
  fundScen,
  scenDates,
  dT = 1/12,
  targetDate,
  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.

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 vector containing 45 attributes of a VA policy, where currentDate, gbAmt, GMWBbalance, withdrawal, & fundValue could be updated as a result of aging. Usually a row of a VA portfolio dataframe.

Note

Target date MUST be PRIOR to the last date of historical scenario date, Current date MUST be LATER than the first date of historical scenario date.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
exPolicy <- VAPort[1, ]
targetDate <- "2016-01-01"
histFundScen <- genFundScen(fundMap, histIdxScen)
ageOnePolicy(exPolicy, mortTable, histFundScen, histDates, dT = 1 / 12,
targetDate, cForwardCurve)
## Not run: 
targetDate <- "2001-01-01"
histFundScen <- genFundScen(fundMap, histIdxScen)
ageOnePolicy(exPolicy, mortTable, histFundScen, histDates, dT = 1 / 12,
targetDate, cForwardCurve)

## End(Not run)
## Not run: 
exPolicy <- VAPort[1, ]
exPolicy[1, c("currentDate", "issueDate")] <- c("2001-01-01", "2001-01-01")
histFundScen <- genFundScen(fundMap, histIdxScen)
ageOnePolicy(exPolicy, mortTable, histFundScen, histDates, dT = 1 / 12,
targetDate, cForwardCurve)

## End(Not run)

vamc documentation built on Feb. 28, 2020, 5:08 p.m.