R/rba_forecasts.R
rba_forecasts.Rd
Compile the RBA's public forecasts of key economic variables over time
rba_forecasts(
refresh = TRUE,
all_or_latest = c("all", "latest"),
remove_old = TRUE
)
read_forecasts(...)
logical; default is TRUE
. When set to TRUE
, up-to-date
forecasts will be downloaded from the RBA's website. When FALSE
, only
the package's internal data will be returned, which may be out of date.
character; default is "all"
. When "all"
is specified,
all publicly-available forecasts will be returned; when "latest"
, only the
latest forecasts will be used.
logical; default is TRUE
. When TRUE
, any observations
for which the date
is more than 180 days prior to the forecast_date
is excluded.
Arguments passed to rba_forecasts()
A tidy tbl_df
containing 8 columns:
forecast_date
The (approximate) date on which the forecast was published. Note that this is the first day of the publication month, so the forecast_date
for forecasts in the February 2020 Statement on Monetary Policy is as.Date("2020-02-01")
.
date
The date to which the forecast pertains. Note that this is the first day of the final month of the relevant quarter. For example, a forecast of GDP in the June quarter 2021 will be as.Date("2021-06-01")
.
year_qtr
The year and quarter to which the forecast pertains, such as 2019.1.
series
Short, snake_case description of the data series being forecast, such as gdp_change
or unemp_rate
. These are consistent over time.
value
The forecast value, in per cent. For example, if GDP growth is forecast to be 3 per cent, the value will be 3
. Note that where a forecast is given as a range (eg. 3.5-4.5%) the value
will be the midpoint of the range (eg. 4%).
series_desc
Full description of the series being forecast, as per the RBA website, such as "Real household disposable income". Note that series descriptions are not necessarily consistent over time; the values here are those published by the RBA. The series
column is consistent over time.
source
For recent forecasts, this is 'SMP', meaning the RBA's Statement on Monetary Policy. Forecasts prior to 2014 are sourced from various places; see Details
.
notes
Notes accompanying the forecasts, as per the RBA's website. Note these are identical for item in a given forecast_date
.
Forecasts are not available for all series on all forecast dates. CPI inflation and GDP growth are included in all forecasts. The unemployment rate is included in most forecasts. Other series are included inconsistently, based on their availability in the underlying source data.
All forecasts issued on or before November 2014 come from Tulip and Wallace (2012), RBA RDP2012-07. Data available: https://www.rba.gov.au/statistics/historical-forecasts.html.
Data from 2015 to August 2018 are scraped from the RBA's quarterly Statement on Monetary Policy (https://www.rba.gov.au/publications/smp/2020/aug/). Note from from Feb 2015 to August 2018 (inclusive) only include a few series; those from November 2018 onwards include more series.
Data from November 2018 to present comes from the published 'Forecasts Archive' file on the RBA website (https://www.rba.gov.au/publications/smp/forecasts-archive.html).
read_forecasts()
is a wrapper around rba_forecasts()
.
forecasts <- read_forecasts()