| Title: | Download Data from the Bank of England Statistical Database |
| Version: | 0.1.0 |
| 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. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Language: | en-GB |
| RoxygenNote: | 7.3.3 |
| Imports: | cli (≥ 3.6.0), httr2 (≥ 1.0.0), tools |
| Suggests: | testthat (≥ 3.0.0), ggplot2, scales |
| Config/testthat/edition: | 3 |
| URL: | https://github.com/charlescoverdale/boe |
| BugReports: | https://github.com/charlescoverdale/boe/issues |
| Depends: | R (≥ 4.1.0) |
| NeedsCompilation: | no |
| Packaged: | 2026-03-08 17:24:20 UTC; charlescoverdale |
| Author: | Charles Coverdale [aut, cre] |
| Maintainer: | Charles Coverdale <charlesfcoverdale@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-12 09:00:23 UTC |
boe: 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.
Author(s)
Maintainer: Charles Coverdale charlesfcoverdale@gmail.com
See Also
Useful links:
Report bugs at https://github.com/charlescoverdale/boe/issues
Download Bank of England Bank Rate history
Description
Downloads the official Bank Rate (base interest rate) set by the Monetary Policy Committee. Available as a daily series from January 1975.
Usage
boe_bank_rate(
from = "1975-01-02",
to = Sys.Date(),
frequency = c("daily", "monthly"),
cache = TRUE
)
Arguments
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 |
Value
A data frame with columns:
- date
Date. Observation date.
- rate_pct
Numeric. Bank Rate (percent).
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
# Bank Rate since 2000
boe_bank_rate(from = "2000-01-01")
# Monthly average
boe_bank_rate(from = "2020-01-01", frequency = "monthly")
Download consumer credit outstanding
Description
Downloads monthly outstanding amounts of consumer credit (total, credit cards, and other consumer credit). Seasonally adjusted. Available from April 1993.
Usage
boe_consumer_credit(
type = c("total", "credit_card", "other"),
from = "1993-04-01",
to = Sys.Date(),
cache = TRUE
)
Arguments
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 |
Value
A data frame with columns:
- date
Date. End of month.
- type
Character. Credit type.
- amount_gbp_m
Numeric. Outstanding amount (millions of pounds).
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
boe_consumer_credit(from = "2015-01-01")
Download sterling exchange rates
Description
Downloads daily spot exchange rates for sterling against major currencies from the Bank of England. Most series available from January 1975.
Usage
boe_exchange_rate(
currency = "USD",
from = "1975-01-02",
to = Sys.Date(),
cache = TRUE
)
Arguments
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 |
Value
A data frame with columns:
- date
Date. Observation date.
- currency
Character. Currency code (e.g.
"USD").- rate
Numeric. Units of foreign currency per GBP.
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
# 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")
Fetch any series from the Bank of England Statistical Database
Description
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.
Usage
boe_get(series_codes, from = "1960-01-01", to = Sys.Date(), cache = TRUE)
Arguments
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 |
Details
Series codes can be found via the Bank of England Interactive Statistical Database at https://www.bankofengland.co.uk/boeapps/database/.
Value
A data frame with columns:
- date
Date. Observation date.
- code
Character. BoE series code.
- value
Numeric. Observation value.
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
# Bank Rate since 2000
boe_get("IUDBEDR", from = "2000-01-01")
# Multiple series
boe_get(c("IUDBEDR", "IUDSOIA"), from = "2020-01-01")
Download M4 money supply
Description
Downloads monthly M4 (broad money) amounts outstanding from the Bank of England. Available from June 1982.
Usage
boe_money_supply(
from = "1982-06-01",
to = Sys.Date(),
seasonally_adjusted = TRUE,
cache = TRUE
)
Arguments
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 |
Value
A data frame with columns:
- date
Date. End of month.
- amount_gbp_m
Numeric. M4 amounts outstanding (millions of pounds).
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
boe_money_supply(from = "2000-01-01")
Download mortgage approvals for house purchase
Description
Downloads the monthly count of mortgage approvals for house purchase, a widely watched leading indicator of housing market activity. Available from April 1993.
Usage
boe_mortgage_approvals(
from = "1993-04-01",
to = Sys.Date(),
seasonally_adjusted = TRUE,
cache = TRUE
)
Arguments
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 |
Value
A data frame with columns:
- date
Date. End of month.
- approvals
Numeric. Number of mortgage approvals.
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
boe_mortgage_approvals(from = "2015-01-01")
Download quoted mortgage interest rates
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.
Usage
boe_mortgage_rates(
type = c("2yr_fixed", "3yr_fixed", "5yr_fixed", "svr"),
from = "1995-01-01",
to = Sys.Date(),
cache = TRUE
)
Arguments
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 |
Value
A data frame with columns:
- date
Date. End of month.
- type
Character. Mortgage product type.
- rate_pct
Numeric. Quoted rate (percent).
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
# 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")
Download SONIA interest rate
Description
Downloads the Sterling Overnight Index Average (SONIA), the risk-free reference rate for sterling markets. Available daily from January 1997.
Usage
boe_sonia(
from = "1997-01-02",
to = Sys.Date(),
frequency = c("daily", "monthly", "annual"),
cache = TRUE
)
Arguments
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 |
Value
A data frame with columns:
- date
Date. Observation date.
- rate_pct
Numeric. SONIA rate (percent).
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
boe_sonia(from = "2020-01-01")
Download UK gilt yields
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.
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
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 |
Value
A data frame with columns:
- date
Date. Observation date.
- maturity
Character. Maturity label (e.g.
"5yr").- yield_pct
Numeric. Yield (percent).
Source
https://www.bankofengland.co.uk/boeapps/database/
Examples
# 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")
Clear locally cached Bank of England data
Description
Removes cached data files downloaded from the Bank of England.
Usage
clear_cache(max_age_days = NULL)
Arguments
max_age_days |
Numeric or |
Value
Invisibly returns the number of files removed.
Examples
# Remove files older than 7 days
clear_cache(max_age_days = 7)
# Remove everything
clear_cache()
List available exchange rate currencies
Description
Returns a data frame of currency codes and descriptions available from the Bank of England exchange rate series.
Usage
list_exchange_rates()
Value
A data frame with columns:
- currency
Character. ISO currency code.
- description
Character. Currency name.
- boe_code
Character. BoE series code.
Examples
list_exchange_rates()