% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chapter15_variable_interest.R
\name{chapter15_variable_interest_apv}
\alias{chapter15_variable_interest_apv}
\alias{nEx_var}
\alias{Axn1_var}
\alias{Axn_var}
\alias{axn_var}
\title{Variable-interest actuarial present value functions}
\usage{
nEx_var(qx, i, benefit = 1)

Axn1_var(qx, i, benefit = 1)

Axn_var(qx, i, benefit = 1)

axn_var(qx, i, type = c("immediate", "due"), benefit = 1)
}
\arguments{
\item{qx}{Numeric vector of one-year mortality rates
\eqn{q_x, q_{x+1}, \dots, q_{x+n-1}}.}

\item{i}{Numeric vector of annual effective interest rates
\eqn{i_1, i_2, \dots, i_n}.}

\item{benefit}{Amount of each annuity payment.}

\item{type}{Either \code{"immediate"} or \code{"due"}.}
}
\value{
A numeric scalar.

A numeric scalar.

A numeric scalar.

A numeric scalar.
}
\description{
Chapter 15 functions for actuarial present values under variable annual
effective interest rates interpreted as a yearly scenario
\eqn{i_1, i_2, \dots, i_n}.

Computes the APV of an \eqn{n}-year pure endowment under a variable annual
interest scenario:
\deqn{
{}_nE_x = v_n \cdot {}_np_x.
}

Computes the APV of an \eqn{n}-year term insurance with benefit paid at the
end of the year of death under a variable annual interest scenario:
\deqn{
A_{x:\overline{n}|}^1 = \sum_{t=1}^{n} v_t \cdot {}_{t-1}p_x \cdot q_{x+t-1}.
}

Computes the APV of an \eqn{n}-year endowment insurance under a variable
annual interest scenario:
\deqn{
A_{x:\overline{n}|} = A_{x:\overline{n}|}^1 + {}_nE_x.
}

Computes the APV of an \eqn{n}-year temporary life annuity under a variable
annual interest scenario.
}
\details{
If a benefit amount is supplied, the function returns that benefit times the
APV factor.

If a benefit amount is supplied, the function returns that benefit times the
APV factor.

If a benefit amount is supplied, the function returns that benefit times the
APV factor.

For an immediate annuity,
\deqn{
a_{x:\overline{n}|} = \sum_{t=1}^{n} v_t \cdot {}_tp_x.
}

For an annuity-due,
\deqn{
\ddot{a}_{x:\overline{n}|} = \sum_{t=0}^{n-1} v_t \cdot {}_tp_x,
}
with \eqn{v_0 = 1}.
}
\examples{
qx <- c(.03, .04, .05, .06, .07)
nEx_var(qx = qx, i = c(.06, .07, .08, .09, .10), benefit = 1000)

qx <- c(.03, .04, .05, .06, .07)
Axn1_var(qx = qx, i = c(.06, .07, .08, .09, .10))

qx <- c(.03, .04, .05, .06, .07)
Axn_var(qx = qx, i = c(.06, .07, .08, .09, .10))

qx <- rep(.02, 5)
axn_var(qx = qx, i = c(.06, .05, .04, .03, .03), type = "immediate")
axn_var(qx = qx, i = c(.03, .04, .05, .06, .07), type = "due")

}
