% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/boe_curve.R
\name{boe_curve}
\alias{boe_curve}
\title{Download the BoE Anderson-Sleath fitted yield curves}
\source{
\url{https://www.bankofengland.co.uk/statistics/yield-curves}
}
\usage{
boe_curve(
  curve = c("nominal", "real", "inflation", "ois"),
  measure = c("spot", "forward"),
  cache = TRUE
)
}
\arguments{
\item{curve}{Character. Which curve to fetch. One of \code{"nominal"},
\code{"real"}, \code{"inflation"}, or \code{"ois"}. Defaults to \code{"nominal"}.}

\item{measure}{Character. \code{"spot"} (default) or \code{"forward"}.}

\item{cache}{Logical. Use cached download if available and less
than 24 hours old (default \code{TRUE}).}
}
\value{
A \code{boe_tbl} data frame with columns:
\describe{
\item{date}{Date. Observation date.}
\item{maturity_years}{Numeric. Maturity in years.}
\item{rate_pct}{Numeric. Yield or implied rate (percent).}
}
}
\description{
Downloads the Bank of England's published fitted yield curves at
all maturities (typically 0.5 to 25 or 40 years) using the Anderson
and Sleath (2001) smoothing methodology. Returns the latest month's
daily data covering the four published curves: nominal gilt, real
(index-linked) gilt, implied inflation, and overnight index swap
(OIS).
}
\details{
Coverage is limited to the latest published month. Historical archive
loading is planned for a subsequent release.

Requires the \pkg{readxl} package. The data is published as an
Excel workbook inside a zip archive at
\url{https://www.bankofengland.co.uk/statistics/yield-curves}.
}
\examples{
\donttest{
if (requireNamespace("readxl", quietly = TRUE)) {
  op <- options(boe.cache_dir = tempdir())
  # Latest nominal spot curve at all maturities
  curve <- boe_curve(curve = "nominal", measure = "spot")
  head(curve)
  options(op)
}
}

}
\references{
Anderson, N. and Sleath, J. (2001). New estimates of the UK real
and nominal yield curves. \emph{Bank of England Working Paper No.
126.} \url{https://www.bankofengland.co.uk/working-paper/2001/new-estimates-of-the-uk-real-and-nominal-yield-curves}
}
\seealso{
Other interest rates: 
\code{\link{boe_bank_rate}()},
\code{\link{boe_sonia}()},
\code{\link{boe_yield_curve}()}
}
\concept{interest rates}
