| boe_curve | R Documentation |
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. Five curves are supported: nominal gilt, real (index-linked) gilt, implied inflation, overnight index swap (OIS), and the commercial bank liability curve (BLC).
boe_curve(
curve = c("nominal", "real", "inflation", "ois", "blc"),
measure = c("spot", "forward"),
segment = c("standard", "short"),
frequency = c("daily", "monthly"),
from = NULL,
to = NULL,
cache = TRUE,
cache_ttl_h = NULL
)
curve |
Character. Which curve to fetch. One of |
measure |
Character. |
segment |
Character. |
frequency |
Character. |
from, to |
Date or character ("YYYY-MM-DD"). Optional inclusive bounds. When either is set, the function uses the BoE archive zip (multi-decade history) and filters by date. |
cache |
Logical. Use cached download if available and within the
TTL window (default |
cache_ttl_h |
Numeric. Cache time-to-live in hours. When |
Each curve is published in two segments. The default
segment = "standard" returns the full maturity spectrum in half-year
steps (0.5 years out to 25 or 40). segment = "short" returns the
short end of the curve in monthly steps (one month out to five years),
which the Bank fits separately and which is the segment most relevant
to near-term policy-rate and money-market analysis. The short end is
available for every curve in the latest month, and historically wherever
the BoE published it (e.g. OIS short-end data begins later than the OIS
standard curve); periods without a short-end sheet are skipped.
By default (from = NULL, to = NULL, frequency = "daily") returns
the latest published month of daily data, matching the behaviour of
earlier releases of this package. Setting from, to, or frequency
switches to the BoE's full archive, which goes back to 1979 for nominal
gilts, 1985 for real, 2000 for BLC, and 2009 for OIS.
Requires the readxl package. Data is published as Excel workbooks inside zip archives at https://www.bankofengland.co.uk/statistics/yield-curves. Each archive zip contains multiple per-period workbooks; this function concatenates them transparently.
A boe_tbl data frame with columns:
Date. Observation date.
Numeric. Maturity in years.
Numeric. Yield or implied rate (percent).
https://www.bankofengland.co.uk/statistics/yield-curves
Anderson, N. and Sleath, J. (2001). New estimates of the UK real and nominal yield curves. Bank of England Working Paper No. 126. https://www.bankofengland.co.uk/working-paper/2001/new-estimates-of-the-uk-real-and-nominal-yield-curves
Other interest rates:
boe_bank_rate(),
boe_curve_panel(),
boe_sonia(),
boe_yield_curve()
if (requireNamespace("readxl", quietly = TRUE)) {
op <- options(boe.cache_dir = tempdir())
# Latest nominal spot curve at all maturities (default behaviour)
curve <- boe_curve(curve = "nominal", measure = "spot")
head(curve)
# Short end of the nominal forward curve (monthly steps to 5 years)
se <- boe_curve(curve = "nominal", measure = "forward",
segment = "short")
range(se$maturity_years)
options(op)
}
## Not run:
# Historical archive: multi-decade downloads, so not run automatically.
# 10-year nominal spot back to 2010:
long <- boe_curve(curve = "nominal", from = "2010-01-01")
# End-of-month real curve since 1990:
real_m <- boe_curve(curve = "real", frequency = "monthly",
from = "1990-01-01")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.