% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/boe_mortgage_rates.R
\name{boe_mortgage_rates}
\alias{boe_mortgage_rates}
\title{Download quoted mortgage interest rates}
\source{
\url{https://www.bankofengland.co.uk/boeapps/database/}
}
\usage{
boe_mortgage_rates(
  type = c("2yr_fixed", "3yr_fixed", "5yr_fixed", "svr"),
  from = "1995-01-01",
  to = Sys.Date(),
  cache = TRUE
)
}
\arguments{
\item{type}{Character vector. One or more of \code{"2yr_fixed"},
\code{"3yr_fixed"}, \code{"5yr_fixed"}, \code{"svr"}. Defaults to all four.}

\item{from}{Date or character (YYYY-MM-DD). Start date. Defaults to
\code{"1995-01-01"}.}

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

\item{cache}{Logical. Use cached data if available (default \code{TRUE}).}
}
\value{
A data frame with columns:
\describe{
\item{date}{Date. End of month.}
\item{type}{Character. Mortgage product type.}
\item{rate_pct}{Numeric. Quoted rate (percent).}
}
}
\description{
Downloads monthly quoted (advertised) mortgage rates from the Bank of
England, including fixed-rate products and the standard variable rate
(SVR). Available from January 1995.
}
\examples{
\donttest{
op <- options(boe.cache_dir = tempdir())
# All mortgage rate types since 2015
boe_mortgage_rates(from = "2015-01-01")

# 2-year fixed only
boe_mortgage_rates(type = "2yr_fixed", from = "2020-01-01")
options(op)
}

}
\seealso{
Other credit and housing: 
\code{\link{boe_consumer_credit}()},
\code{\link{boe_mortgage_approvals}()}
}
\concept{credit and housing}
