% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/boe_yield_curve.R
\name{boe_yield_curve}
\alias{boe_yield_curve}
\title{Download UK gilt yields}
\source{
\url{https://www.bankofengland.co.uk/boeapps/database/}
}
\usage{
boe_yield_curve(
  from = "2000-01-01",
  to = Sys.Date(),
  maturity = c("5yr", "10yr", "20yr"),
  type = c("nominal", "real"),
  measure = c("par_yield", "zero_coupon"),
  cache = TRUE
)
}
\arguments{
\item{from}{Date or character (YYYY-MM-DD). Start date.}

\item{to}{Date or character (YYYY-MM-DD). End date. Defaults to today.}

\item{maturity}{Character vector. One or more of \code{"5yr"}, \code{"10yr"},
\code{"20yr"}. Defaults to all three.}

\item{type}{Character. \code{"nominal"} (default) or \code{"real"}.}

\item{measure}{Character. \code{"par_yield"} (default, nominal only) or
\code{"zero_coupon"}.}

\item{cache}{Logical. Use cached data if available (default \code{TRUE}).}
}
\value{
A data frame with columns:
\describe{
\item{date}{Date. Observation date.}
\item{maturity}{Character. Maturity label (e.g. \code{"5yr"}).}
\item{yield_pct}{Numeric. Yield (percent).}
}
}
\description{
Downloads nominal or real gilt yields at specified maturities from the
Bank of England yield curve data. Nominal par yields are available
daily from late 1993; real zero-coupon yields from 1985.
}
\examples{
\donttest{
op <- options(boe.cache_dir = tempdir())
# 10-year nominal gilt yield since 2020
boe_yield_curve(from = "2020-01-01", maturity = "10yr")

# Full nominal curve
boe_yield_curve(from = "2020-01-01")

# Real yields
boe_yield_curve(from = "2020-01-01", type = "real", measure = "zero_coupon")
options(op)
}

}
\seealso{
Other interest rates: 
\code{\link{boe_bank_rate}()},
\code{\link{boe_curve}()},
\code{\link{boe_sonia}()}
}
\concept{interest rates}
