| Title: | Download Data from the 'Bank of England' Statistical Database |
|---|---|
| Description: | Provides functions to download and tidy statistical data published by the 'Bank of England' <https://www.bankofengland.co.uk>. Covers Bank Rate, 'SONIA', gilt yields, exchange rates, mortgage rates, mortgage approvals, consumer credit, and money supply. Series are fetched from the 'Bank of England Interactive Statistical Database' using its CSV endpoint. Data is cached locally between sessions. |
| Authors: | Charles Coverdale [aut, cre] |
| Maintainer: | Charles Coverdale <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0 |
| Built: | 2026-05-30 15:07:13 UTC |
| Source: | https://github.com/charlescoverdale/boe |
Downloads the official Bank Rate (base interest rate) set by the Monetary Policy Committee. Available as a daily series from January 1975.
boe_bank_rate( from = "1975-01-02", to = Sys.Date(), frequency = c("daily", "monthly"), cache = TRUE )boe_bank_rate( from = "1975-01-02", to = Sys.Date(), frequency = c("daily", "monthly"), cache = TRUE )
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
frequency |
Character. One of |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. Observation date.
Numeric. Bank Rate (percent).
https://www.bankofengland.co.uk/boeapps/database/
Other interest rates:
boe_curve(),
boe_curve_panel(),
boe_sonia(),
boe_yield_curve()
op <- options(boe.cache_dir = tempdir()) # Bank Rate since 2000 boe_bank_rate(from = "2000-01-01") # Monthly average boe_bank_rate(from = "2020-01-01", frequency = "monthly") options(op)op <- options(boe.cache_dir = tempdir()) # Bank Rate since 2000 boe_bank_rate(from = "2000-01-01") # Monthly average boe_bank_rate(from = "2020-01-01", frequency = "monthly") options(op)
Returns the catalogue with optional category or frequency filters.
Equivalent to boe_search(query = NULL, category, frequency) but
framed as a browse / inspect action rather than a keyword search.
boe_browse(category = NULL, frequency = NULL)boe_browse(category = NULL, frequency = NULL)
category |
Character. Optional filter on the |
frequency |
Character. Optional filter on the |
A data frame with the same columns as boe_series.
Other discovery:
boe_search()
# The whole catalogue nrow(boe_browse()) # All exchange rate series boe_browse(category = "exchange_rates") # All monthly series boe_browse(frequency = "monthly")# The whole catalogue nrow(boe_browse()) # All exchange rate series boe_browse(category = "exchange_rates") # All monthly series boe_browse(frequency = "monthly")
Reports the cache directory, number of cached files, total size, and oldest / newest modification timestamps. Prints a short summary and returns the underlying values invisibly.
boe_cache_info()boe_cache_info()
The cache directory defaults to tools::R_user_dir("boe", "cache")
and can be overridden with options(boe.cache_dir = ...).
Invisibly, a list with elements:
Character. Cache directory.
Integer. Number of cached files.
Numeric. Total size on disk (bytes).
POSIXct. Modification time of oldest file (or
NA if cache is empty).
POSIXct. Modification time of newest file (or
NA if cache is empty).
op <- options(boe.cache_dir = tempdir()) boe_cache_info() options(op)op <- options(boe.cache_dir = tempdir()) boe_cache_info() options(op)
Downloads monthly outstanding amounts of consumer credit (total, credit cards, and other consumer credit). Seasonally adjusted. Available from April 1993.
boe_consumer_credit( type = c("total", "credit_card", "other"), from = "1993-04-01", to = Sys.Date(), cache = TRUE )boe_consumer_credit( type = c("total", "credit_card", "other"), from = "1993-04-01", to = Sys.Date(), cache = TRUE )
type |
Character vector. One or more of |
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. End of month.
Character. Credit type.
Numeric. Outstanding amount (millions of pounds).
https://www.bankofengland.co.uk/boeapps/database/
Other credit and housing:
boe_mortgage_approvals(),
boe_mortgage_rates()
op <- options(boe.cache_dir = tempdir()) boe_consumer_credit(from = "2015-01-01") options(op)op <- options(boe.cache_dir = tempdir()) boe_consumer_credit(from = "2015-01-01") options(op)
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 )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)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)
Convenience wrapper around boe_curve() that returns a wide-format
panel: one row per date, one column per requested pillar maturity.
This is the form most users want for time-series modelling and quick
plotting.
boe_curve_panel( curve = c("nominal", "real", "inflation", "ois", "blc"), measure = c("spot", "forward"), segment = c("standard", "short"), frequency = c("daily", "monthly"), from = NULL, to = NULL, maturities = NULL, cache = TRUE, cache_ttl_h = NULL )boe_curve_panel( curve = c("nominal", "real", "inflation", "ois", "blc"), measure = c("spot", "forward"), segment = c("standard", "short"), frequency = c("daily", "monthly"), from = NULL, to = NULL, maturities = 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. |
maturities |
Numeric vector of pillar maturities in years. When
|
cache |
Logical. Use cached download if available and within the
TTL window (default |
cache_ttl_h |
Numeric. Cache time-to-live in hours. When |
For each requested pillar, the function picks the published maturity
closest to the request (within a 0.05-year tolerance) and uses that.
The standard grid steps in 0.5-year increments and the short-end grid
(segment = "short") in monthly increments, so pillars at integer,
half-integer, or whole-month maturities align exactly.
A boe_tbl data frame with columns date and one numeric
column per pillar named like m0.5, m1, m2, m5, m10, m20.
Other interest rates:
boe_bank_rate(),
boe_curve(),
boe_sonia(),
boe_yield_curve()
if (requireNamespace("readxl", quietly = TRUE)) { op <- options(boe.cache_dir = tempdir()) # Latest month: wide panel at chosen pillar maturities panel <- boe_curve_panel(curve = "nominal", measure = "spot", maturities = c(2, 5, 10, 20)) head(panel) options(op) } ## Not run: # Historical panel (multi-decade archive download; not run automatically) hist <- boe_curve_panel(curve = "nominal", measure = "spot", from = "2020-01-01", maturities = c(2, 5, 10, 20)) ## End(Not run)if (requireNamespace("readxl", quietly = TRUE)) { op <- options(boe.cache_dir = tempdir()) # Latest month: wide panel at chosen pillar maturities panel <- boe_curve_panel(curve = "nominal", measure = "spot", maturities = c(2, 5, 10, 20)) head(panel) options(op) } ## Not run: # Historical panel (multi-decade archive download; not run automatically) hist <- boe_curve_panel(curve = "nominal", measure = "spot", from = "2020-01-01", maturities = c(2, 5, 10, 20)) ## End(Not run)
Downloads daily spot exchange rates for sterling against major currencies from the Bank of England. Most series available from January 1975.
boe_exchange_rate( currency = "USD", from = "1975-01-02", to = Sys.Date(), cache = TRUE )boe_exchange_rate( currency = "USD", from = "1975-01-02", to = Sys.Date(), cache = TRUE )
currency |
Character vector. One or more currency codes. Use
|
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. Observation date.
Character. Currency code (e.g. "USD").
Numeric. Units of foreign currency per GBP.
https://www.bankofengland.co.uk/boeapps/database/
Other exchange rates:
list_exchange_rates()
op <- options(boe.cache_dir = tempdir()) # GBP/USD since 2020 boe_exchange_rate("USD", from = "2020-01-01") # Multiple currencies boe_exchange_rate(c("USD", "EUR", "JPY"), from = "2020-01-01") options(op)op <- options(boe.cache_dir = tempdir()) # GBP/USD since 2020 boe_exchange_rate("USD", from = "2020-01-01") # Multiple currencies boe_exchange_rate(c("USD", "EUR", "JPY"), from = "2020-01-01") options(op)
The core data retrieval function. Fetches one or more series by their
BoE series codes and returns a tidy data frame. Use this when the
convenience functions (e.g. boe_bank_rate(), boe_exchange_rate())
do not cover the series you need.
boe_get(series_codes, from = "1960-01-01", to = Sys.Date(), cache = TRUE)boe_get(series_codes, from = "1960-01-01", to = Sys.Date(), cache = TRUE)
series_codes |
Character vector of one or more BoE series codes. |
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
cache |
Logical. Use cached data if available (default |
Series codes can be found via the Bank of England Interactive Statistical Database at https://www.bankofengland.co.uk/boeapps/database/.
A data frame with columns:
Date. Observation date.
Character. BoE series code.
Numeric. Observation value.
https://www.bankofengland.co.uk/boeapps/database/
Other data access:
clear_cache()
op <- options(boe.cache_dir = tempdir()) # Bank Rate since 2000 boe_get("IUDBEDR", from = "2000-01-01") # Multiple series boe_get(c("IUDBEDR", "IUDSOIA"), from = "2020-01-01") options(op)op <- options(boe.cache_dir = tempdir()) # Bank Rate since 2000 boe_get("IUDBEDR", from = "2000-01-01") # Multiple series boe_get(c("IUDBEDR", "IUDSOIA"), from = "2020-01-01") options(op)
Downloads monthly M4 (broad money) amounts outstanding from the Bank of England. Available from June 1982.
boe_money_supply( from = "1982-06-01", to = Sys.Date(), seasonally_adjusted = TRUE, cache = TRUE )boe_money_supply( from = "1982-06-01", to = Sys.Date(), seasonally_adjusted = TRUE, cache = TRUE )
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
seasonally_adjusted |
Logical. Return seasonally adjusted series
(default |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. End of month.
Numeric. M4 amounts outstanding (millions of pounds).
https://www.bankofengland.co.uk/boeapps/database/
op <- options(boe.cache_dir = tempdir()) boe_money_supply(from = "2000-01-01") options(op)op <- options(boe.cache_dir = tempdir()) boe_money_supply(from = "2000-01-01") options(op)
Downloads the monthly count of mortgage approvals for house purchase, a widely watched leading indicator of housing market activity. Available from April 1993.
boe_mortgage_approvals( from = "1993-04-01", to = Sys.Date(), seasonally_adjusted = TRUE, cache = TRUE )boe_mortgage_approvals( from = "1993-04-01", to = Sys.Date(), seasonally_adjusted = TRUE, cache = TRUE )
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
seasonally_adjusted |
Logical. Return seasonally adjusted series
(default |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. End of month.
Numeric. Number of mortgage approvals.
https://www.bankofengland.co.uk/boeapps/database/
Other credit and housing:
boe_consumer_credit(),
boe_mortgage_rates()
op <- options(boe.cache_dir = tempdir()) boe_mortgage_approvals(from = "2015-01-01") options(op)op <- options(boe.cache_dir = tempdir()) boe_mortgage_approvals(from = "2015-01-01") options(op)
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.
boe_mortgage_rates( type = c("2yr_fixed", "3yr_fixed", "5yr_fixed", "svr"), from = "1995-01-01", to = Sys.Date(), cache = TRUE )boe_mortgage_rates( type = c("2yr_fixed", "3yr_fixed", "5yr_fixed", "svr"), from = "1995-01-01", to = Sys.Date(), cache = TRUE )
type |
Character vector. One or more of |
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. End of month.
Character. Mortgage product type.
Numeric. Quoted rate (percent).
https://www.bankofengland.co.uk/boeapps/database/
Other credit and housing:
boe_consumer_credit(),
boe_mortgage_approvals()
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)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)
Returns the history of Monetary Policy Committee decisions to change
Bank Rate, derived from the daily Bank Rate series. Each row is one
rate-change event, showing the effective date, the new rate, the
previous rate, and the change in basis points. Holds (meetings where
the rate was unchanged) are not included; for the full meeting-level
record including holds, see boe_mpc_votes().
boe_mpc_decisions(from = "1997-06-06", to = Sys.Date(), cache = TRUE)boe_mpc_decisions(from = "1997-06-06", to = Sys.Date(), cache = TRUE)
from |
Date or character. Start date. Defaults to
|
to |
Date or character. End date. Defaults to today. |
cache |
Logical. Use cached Bank Rate data if available
(default |
A boe_tbl data frame with columns:
Date. Effective date of the rate change.
Numeric. Bank Rate after the decision (percent).
Numeric. Bank Rate before the decision (percent).
Integer. Change in basis points (positive = hike, negative = cut).
Character. "hike" or "cut".
Derived from BoE series IUDBEDR (daily Bank Rate). See
https://www.bankofengland.co.uk/monetary-policy.
boe_bank_rate(), boe_mpc_votes()
Other monetary policy:
boe_mpc_votes(),
boe_mpr_forecasts()
op <- options(boe.cache_dir = tempdir()) # All MPC decisions since the global financial crisis boe_mpc_decisions(from = "2007-01-01") # Just decisions in 2024 to date boe_mpc_decisions(from = "2024-01-01") options(op)op <- options(boe.cache_dir = tempdir()) # All MPC decisions since the global financial crisis boe_mpc_decisions(from = "2007-01-01") # Just decisions in 2024 to date boe_mpc_decisions(from = "2024-01-01") options(op)
Downloads the Bank of England's published MPC voting record and returns it in long format. Each row is one (meeting, member) pair showing the rate the member voted for and whether that constituted a dissent from the committee's decision.
boe_mpc_votes(cache = TRUE)boe_mpc_votes(cache = TRUE)
cache |
Logical. Use cached download if less than 24 hours old
(default |
Coverage runs from the first MPC meeting in June 1997 through the most recent published minutes. Both current and past committee members are included.
Requires the readxl package.
A boe_tbl data frame with columns:
Date. Meeting date.
Character. MPC member name.
Numeric. The Bank Rate the member voted for (percent).
Numeric. The committee's decision (percent).
Logical. TRUE if the member's vote differed from
the committee decision.
https://www.bankofengland.co.uk/monetary-policy
Other monetary policy:
boe_mpc_decisions(),
boe_mpr_forecasts()
if (requireNamespace("readxl", quietly = TRUE)) { op <- options(boe.cache_dir = tempdir()) votes <- boe_mpc_votes() # Recent dissents recent <- subset(votes, dissent & date >= as.Date("2024-01-01")) head(recent) options(op) }if (requireNamespace("readxl", quietly = TRUE)) { op <- options(boe.cache_dir = tempdir()) votes <- boe_mpc_votes() # Recent dissents recent <- subset(votes, dissent & date >= as.Date("2024-01-01")) head(recent) options(op) }
Downloads the Bank of England's Monetary Policy Report (MPR) and parses headline projections from the Projections Databank workbook. Returns a long-format data frame where each row is one (publication date, forecast horizon, series) triple.
boe_mpr_forecasts( series = c("cpi_inflation", "gdp_growth", "gdp_level", "unemployment", "bank_rate"), month = NULL, year = NULL, cache = TRUE )boe_mpr_forecasts( series = c("cpi_inflation", "gdp_growth", "gdp_level", "unemployment", "bank_rate"), month = NULL, year = NULL, cache = TRUE )
series |
Character vector. One or more of:
|
month |
Character. Publication month of the report, e.g.
|
year |
Integer. MPR year, 2019 or later. Supply with |
cache |
Logical. Use cached download if available (default
|
Coverage runs quarterly from November 2019 (when the report was renamed from Inflation Report) to the latest published release.
Requires the readxl package. The MPR is published as a zip archive containing a Projections Databank workbook plus chart data and slides; this function only reads the projection sheets.
Each row of a projection sheet is one MPR publication; columns are forecast quarters. The same publication therefore contributes multiple rows here, one per forecast horizon.
A boe_tbl data frame with columns:
Date. Publication date of the MPR (start of quarter the report covers).
Character. Forecast horizon label (e.g. "2026 Q1").
Date. Start of the forecast quarter.
Character. Series identifier (e.g. "cpi_inflation").
Numeric. Forecast value (percent for rates and
growth; index for gdp_level).
From the April 2026 report the Bank moved to a scenario-based
"Scenario Projections Databank" with a transposed layout (following
the Bernanke review of forecasting). That format is not parsed by
this function yet. When automatic selection encounters such a
release it skips it, falls back to the most recent compatible release
(the classic "Projections Databank" workbook), and warns. Requesting
a scenario-format release explicitly via month/year raises a
clear error. Pre-2020 MPRs that predate the single "Projections
Databank" workbook may also error.
https://www.bankofengland.co.uk/monetary-policy
boe_mpc_decisions(), boe_mpc_votes()
Other monetary policy:
boe_mpc_decisions(),
boe_mpc_votes()
if (requireNamespace("readxl", quietly = TRUE)) { op <- options(boe.cache_dir = tempdir()) # Latest CPI inflation projections cpi <- boe_mpr_forecasts(series = "cpi_inflation") head(cpi) options(op) }if (requireNamespace("readxl", quietly = TRUE)) { op <- options(boe.cache_dir = tempdir()) # Latest CPI inflation projections cpi <- boe_mpr_forecasts(series = "cpi_inflation") head(cpi) options(op) }
Filters the boe_series catalogue by keyword and optional category
and frequency. Useful for finding a series code without leaving R.
Equivalent to a grepl against the title and code columns.
boe_search(query = NULL, category = NULL, frequency = NULL)boe_search(query = NULL, category = NULL, frequency = NULL)
query |
Character. Keyword(s) to match against the |
category |
Character. Optional filter on the |
frequency |
Character. Optional filter on the |
A data frame with the same columns as boe_series, restricted to matching rows.
Other discovery:
boe_browse()
# Find mortgage-related series boe_search("mortgage") # All daily interest-rate series boe_search(category = "interest_rates", frequency = "daily") # Locate the Bank Rate code boe_search("bank rate")# Find mortgage-related series boe_search("mortgage") # All daily interest-rate series boe_search(category = "interest_rates", frequency = "daily") # Locate the Bank Rate code boe_search("bank rate")
A reference data frame of Bank of England Statistical Database series
codes for which the package provides a named convenience function.
Used by boe_search() and boe_browse().
boe_seriesboe_series
A data frame with 8 columns:
Character. BoE series code (e.g. "IUDBEDR").
Character. Human-readable description.
Character. Topic grouping. One of "interest_rates",
"exchange_rates", "mortgage_market", "consumer_credit",
"monetary_aggregates".
Character. Native publication frequency
("daily", "monthly", "annual").
Character. Unit of measurement ("percent",
"millions_gbp", "currency_per_gbp", "index", "count").
Date. Earliest available observation date.
Character or NA. "SA", "NSA", or
NA if not applicable.
Character. Convenience function in the package that wraps the series.
https://www.bankofengland.co.uk/boeapps/database/
head(boe_series) table(boe_series$category)head(boe_series) table(boe_series$category)
Downloads the Sterling Overnight Index Average (SONIA), the risk-free reference rate for sterling markets. Available daily from January 1997.
boe_sonia( from = "1997-01-02", to = Sys.Date(), frequency = c("daily", "monthly", "annual"), cache = TRUE )boe_sonia( from = "1997-01-02", to = Sys.Date(), frequency = c("daily", "monthly", "annual"), cache = TRUE )
from |
Date or character (YYYY-MM-DD). Start date. Defaults to
|
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
frequency |
Character. One of |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. Observation date.
Numeric. SONIA rate (percent).
https://www.bankofengland.co.uk/boeapps/database/
Other interest rates:
boe_bank_rate(),
boe_curve(),
boe_curve_panel(),
boe_yield_curve()
op <- options(boe.cache_dir = tempdir()) boe_sonia(from = "2020-01-01") options(op)op <- options(boe.cache_dir = tempdir()) boe_sonia(from = "2020-01-01") options(op)
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.
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 )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 )
from |
Date or character (YYYY-MM-DD). Start date. |
to |
Date or character (YYYY-MM-DD). End date. Defaults to today. |
maturity |
Character vector. One or more of |
type |
Character. |
measure |
Character. |
cache |
Logical. Use cached data if available (default |
A data frame with columns:
Date. Observation date.
Character. Maturity label (e.g. "5yr").
Numeric. Yield (percent).
https://www.bankofengland.co.uk/boeapps/database/
Other interest rates:
boe_bank_rate(),
boe_curve(),
boe_curve_panel(),
boe_sonia()
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)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)
Removes cached data files downloaded from the Bank of England.
clear_cache(max_age_days = NULL)clear_cache(max_age_days = NULL)
max_age_days |
Numeric or |
Invisibly returns the number of files removed.
Other data access:
boe_get()
op <- options(boe.cache_dir = tempdir()) # Remove files older than 7 days clear_cache(max_age_days = 7) # Remove everything clear_cache() options(op)op <- options(boe.cache_dir = tempdir()) # Remove files older than 7 days clear_cache(max_age_days = 7) # Remove everything clear_cache() options(op)
Returns a data frame of currency codes and descriptions available from the Bank of England exchange rate series.
list_exchange_rates()list_exchange_rates()
A data frame with columns:
Character. ISO currency code.
Character. Currency name.
Character. BoE series code.
Other exchange rates:
boe_exchange_rate()
list_exchange_rates()list_exchange_rates()
Adds a one-line provenance header above the data frame body. The header summarises the request: number of series (and codes if few), observation count, date range, frequency, and any vintage tag.
## S3 method for class 'boe_tbl' print(x, ...)## S3 method for class 'boe_tbl' print(x, ...)
x |
A |
... |
Passed to the underlying |
x, invisibly.
op <- options(boe.cache_dir = tempdir()) x <- boe_bank_rate(from = "2020-01-01", frequency = "monthly") print(x) options(op)op <- options(boe.cache_dir = tempdir()) x <- boe_bank_rate(from = "2020-01-01", frequency = "monthly") print(x) options(op)