Skip to contents

This function computes annuity factors for a series of survival discount rates, incorporating cost-of-living adjustments (COLA). It optionally supports a one-time COLA adjustment.

Usage

annfactor(surv_DR_vec, cola_vec, one_time_cola = FALSE)

Arguments

surv_DR_vec

Numeric vector. A vector of survival discount rates, representing the probabilities of survival for each period.

cola_vec

Numeric vector. A vector of cost-of-living adjustment (COLA) rates for each period.

one_time_cola

Logical, optional. If TRUE, a one-time COLA is applied (default is FALSE), this is not coded as no COLAs.

Value

Numeric vector. A vector of annuity factors, considering COLAs where each element corresponds to a period's annuity factor.

Examples

# Example with survival discount rates and COLA rates
surv_DR_vec <- c(1.0, 0.9, 0.8, 0.7)
cola_vec <- c(0.02, 0.02, 0.02, 0.02)
annfactor(surv_DR_vec, cola_vec)
#> [1] 3.493166 2.715867 1.892500 1.000000

# Example with a one-time COLA
annfactor(surv_DR_vec, cola_vec, one_time_cola = FALSE)
#> [1] 3.493166 2.715867 1.892500 1.000000