% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chapter15_variable_interest.R
\name{variable_interest_apvs}
\alias{variable_interest_apvs}
\alias{nEx_var}
\alias{Axn1_var}
\alias{Axn_var}
\alias{axn_var}
\title{Actuarial present values under variable annual interest rates}
\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 probabilities.}

\item{i}{Numeric vector of annual effective interest rates. Each value
must be greater than \code{-1}.}

\item{benefit}{Nonnegative scalar benefit or annuity payment amount.}

\item{type}{Character string equal to \code{"immediate"} or
\code{"due"}.}
}
\value{
A numeric scalar.
}
\description{
Computes life-contingent actuarial present values using a specified
sequence of annual effective interest rates.
}
\details{
The vectors \code{qx} and \code{i} represent one valuation scenario and
must have the same positive length.

\code{nEx_var()} computes a pure endowment.

\code{Axn1_var()} computes term insurance payable at the end of the year
of death.

\code{Axn_var()} computes endowment insurance.

\code{axn_var()} computes a temporary annuity-immediate or
annuity-due.


Each year's payment is discounted using the cumulative product of the
annual effective interest rates supplied in \code{i}.

The pure endowment is
\deqn{
{}_nE
=
{}_np_x\,v_n,
}
where \eqn{v_n} is the cumulative discount factor implied by the sequence
of annual effective interest rates.

Term insurance is obtained by discounting each possible death benefit
using the cumulative discount factor applicable to its payment year.

Endowment insurance equals the sum of the corresponding term insurance
and pure endowment.

Temporary annuities discount each payment using the cumulative discount
factors derived from the interest-rate sequence.
}
\examples{
qx <- c(0.03, 0.04, 0.05, 0.06, 0.07)
rates <- c(0.06, 0.07, 0.08, 0.09, 0.10)

nEx_var(qx, rates, benefit = 1000)
Axn1_var(qx, rates)
Axn_var(qx, rates)
axn_var(qx, rates, type = "due")

}
