% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discounting.R
\name{gb_discount_factor}
\alias{gb_discount_factor}
\title{Discount factor under the kinked STPR}
\usage{
gb_discount_factor(years, schedule = "standard", base_year = 0L)
}
\arguments{
\item{years}{Integer vector of years from the base year. Must be
\verb{>= base_year}.}

\item{schedule}{One of \code{"standard"}, \code{"health"}, \code{"catastrophic"}.}

\item{base_year}{Integer base year offset. Default \code{0}.}
}
\value{
A numeric vector of discount factors. \code{1} for \code{years == base_year}.
}
\description{
Returns the present-value discount factor for each year, applying
the kinked Social Time Preference Rate schedule annually.
}
\details{
The discount factor at year \code{t} is computed as the reciprocal of
the cumulative product of \code{(1 + r_k)} for periods \verb{k = 1, ..., t},
where \code{r_k} is the STPR for year \code{k}. This handles the kinked
schedule correctly across band transitions (e.g. year 30 to year
31). Within a single band, the closed-form annuity factor
\code{(1 - (1 + r)^(-n)) / r} agrees with \code{sum(gb_discount_factor(1:n))}
to machine precision.
}
\examples{
gb_discount_factor(0:5)
gb_discount_factor(c(0, 30, 31, 75, 76))
}
\references{
HM Treasury (2022). The Green Book, Annex A6.

HM Treasury (2003). Green Book Supplementary Guidance: Discounting.
}
\seealso{
\code{\link[=gb_stpr]{gb_stpr()}}, \code{\link[=gb_npv]{gb_npv()}}, \code{\link[=gb_eanc]{gb_eanc()}}.

Other discounting: 
\code{\link{gb_discount}()},
\code{\link{gb_eanc}()},
\code{\link{gb_npv}()},
\code{\link{gb_stpr}()}
}
\concept{discounting}
