% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chapter15_variable_interest.R
\name{spot_interest_apvs}
\alias{spot_interest_apvs}
\alias{nEx_spot}
\alias{Axn1_spot}
\alias{Axn_spot}
\alias{axn_spot}
\title{Actuarial present values under spot rates}
\usage{
nEx_spot(qx, z, benefit = 1)

Axn1_spot(qx, z, benefit = 1)

Axn_spot(qx, z, benefit = 1)

axn_spot(qx, z, type = c("immediate", "due"), benefit = 1)
}
\arguments{
\item{qx}{Numeric vector of one-year mortality probabilities.}

\item{z}{Numeric vector of annual effective spot rates for maturities
\code{1, \dots, n}. 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 annual effective
spot rates by maturity.
}
\details{
If \eqn{z_t} denotes the annual effective spot rate for maturity
\eqn{t}, the corresponding discount factor is
\deqn{(1+z_t)^{-t}.}

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

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

\code{Axn_spot()} computes endowment insurance.

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


Each payment is discounted using the spot rate corresponding to its
maturity rather than a single level interest rate.

The pure endowment is
\deqn{
{}_nE
=
{}_np_x(1+z_n)^{-n}.
}

Term insurance is obtained by discounting each death benefit using the
spot rate corresponding to its payment year.

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

Temporary annuities discount each payment using the spot rate for its
payment time.
}
\examples{
qx <- c(0.02, 0.03, 0.04, 0.05, 0.06)
spot <- c(0.03, 0.04, 0.05, 0.06, 0.07)

nEx_spot(qx, spot, benefit = 1000)
Axn1_spot(qx, spot)
Axn_spot(qx, spot)
axn_spot(qx, spot, type = "due")

}
