RDP 2025-09: Forecasts of Period-average Exchange Rates: Insights from Real-time Daily Data Read me file

This ‘read me’ file details the supplementary information for RDP 2025-09.

  • Section 1 describes the raw data used to construct a dataset of bilateral exchange rates and effective exchange rates (EERs). These raw data are not provided in the supplementary information as they should be obtained directly from the data providers. It also describes the R code that uses the raw data, which is in the ‘R_code’ folder.
  • Section 2 describes our dataset of daily frequency EERs, which is in ‘Daily_EERs.zip’. The daily frequency bilateral exchange rates are not provided due to third-party provisions.
  • Section 3 describes our dataset of monthly frequency EERs, which is in ‘Monthly_EERs.zip’. The monthly frequency bilateral exchange rates are not provided due to third-party provisions.
  • Section 4 describes the Stata code used to produce the forecasts of period-average EERs, which is in the ‘Stata_code’ folder.
  • Section 5 describes the results produced by the Stata code, which are in the ‘Results’ folder.

The R code was run on R version 4.3.1 on Windows 11.

The Stata code can be run on Stata version 15 and on any operating system, as none of the code other than directory paths is specific to an operating system.

All data used to plot the figures in the paper are available to the public and can be found in ‘rdp-2025-09-graph-data.xlxs’.

Section 1 – Construction of dataset of bilateral and effective exchange rates.

Our bilateral and effective exchange rate dataset was constructed using raw data from a variety of sources and R code. To construct the dataset, the data and code is put into a folder with the structure below.

The ‘supplementary information’ includes a folder called ‘R_code’, which has this structure. In the supplementary information, the ‘Raw_data’ and ‘Mid_data’ folders do not contain any files, and are included simply to make the folder structure clear. The ‘Code’ folder contains the code we used.

Raw_data

Country_facts

EAER_data

Eikon_data

GDS_data

ENDA_EER

Ilzetzki_data

INS_data

ISO_data

World_Bank_data

Mid_data

FX

Bilateral_NER

RDS_by_country

RDS_by_vintage

CSV_by_country

Bilateral_RER

RDS_by_country

RDS_by_vintage

CSV_by_country

CPI

Monthly_CPI

cpi_m_extra

cpi_m_log_extra

EAER

NEER

RDS_by_country

RDS_by_vintage

CSV_by_country

Step_REER

RDS_by_country

RDS_by_vintage

CSV_by_country

Weights

Code

Import_functions

Interpolation_fx_functions

Scripts

Tidy_functions

Tidy_fx_functions

Raw data

We used the following types of raw data. The raw data is not available in the supplementary information, as the data should be obtained from data providers directly. Details are available in Appendix B of the RDP.

  • country_facts.xlsx: This is a table of country names, ISO country codes and International Financial Statistics (IFS) codes, which permits linking of different datasets. ISO country codes are available at <https://www.iso.org/iso-3166-country-codes.html>.
  • Monthly consumer price index (CPI) levels from the World Bank. These should go in the World_Bank_data folder. These data are available at <https://www.worldbank.org/en/research/brief/inflation-database>.
  • Daily nominal exchange rates (NER) from the International Monetary Fund (IMF) and Eikon. The IMF data should go in the GDS_data/ENDA_EER folder. The Eikon data should go in the Eikon_data folder.
  • Trade weights from the IMF. These data should go in the INS_data folder. They are available on request from the IMF.
  • ISO currency codes: Tables of country names, currencies, and the ISO codes of each currency. Available at <https://www.iso.org/iso-4217-currency-codes.html>.
  • IMF Annual Report on Exchange Arrangements and Exchange Restrictions (AREAER) data: These data should go in the ‘EAER_data’ folder. These are used to determine the exchange rate used by a country before the start of IMF NER data. They are available at <https://www.elibrary-areaer.imf.org/Pages/ChapterQuery.aspx>.
  • Data for Ilzetzki, Reinhart, and Rogoff (2019, 2022): These data should go in the ‘Ilzetzki_data’ folder. They are available at <https://www.ilzetzki.com/irr-data>.

R_code

The ‘Scripts’ folder contains R files to be run. They import input data, often from Raw_data or Mid_data, and then produce output data, which is always written to Mid_data.

The scripts are as follows, and should be run in order. These scripts call functions defined in the ‘Import_functions’, ‘Interpolation_fx_functions’, ‘Tidy_functions’ and ‘Tidy_fx_functions’ folders.

Script name Key inputs of the script Key outputs of script
make_raw_vintages_of _monthly_CPI.R Monthly frequency CPI:
Raw_data/World_Bank_data/Inflation-data.xlsx
Vintages of monthly frequency CPI:
Mid_data/FX/CPI/Monthly_CPI/cpi_m.rds
make_nice_vintages_of _CPI.R Vintages of monthly frequency CPI:
Mid_data/FX/CPI/Monthly_CPI/cpi_m.rds
Monthly vintages of monthly frequency CPI:
Mid_data/FX/CPI/Monthly_CPI/cpi_m_extra/

Monthly vintages of daily frequency
CPI:
Mid_data/FX/CPI/Daily_CPI/cpi_eom_to_d_Step/
splice_IMF_Eikon_NER.R Latest vintages of bilateral NERs from IMF:
Raw_data/GDS_data/ENDA_EER/

Latest vintage of bilateral NERs from Eikon:
Raw_data/Eikon_data/

ISO currency codes:
Raw_data/ISO_data/

Currencies according to EAER data:
Raw_data/EAER_data/EAER_currency.xlsx
Latest vintage of bilateral NERs:
Mid_data/FX/NER/ner_transformed.rds
make_vintages_of _bilateral_NER.R Latest vintage of bilateral NERs:
Mid_data/FX/Bilateral_NER/ner_transformed.rds
Monthly vintages of bilateral NERs:
Mid_data/FX/Bilateral_NER/RDS_by_vintage/
make_vintages_of _bilateral_NER_CPI.R Latest vintage of bilateral NERs:
Mid_data/FX/Bilateral_NER/
ner_transformed.rds

Monthly vintages of monthly frequency CPI:
Mid_data

Monthly vintages of daily frequency
CPI:
Mid_data/FX/CPI/Daily_CPI/cpi_eom_to_d_Step/
Vintages of daily NER*CPI:(a)
Mid_data/FX/Bilateral_NER_CPI/
Daily_Bilateral_NER_Daily_Step_CPI/

Monthly vintages of month-average
NER*CPI:
Mid_data/FX/Bilateral_NER_CPI/
Month_avg_Bilateral_NER_Monthly
_CPI/

Monthly vintages of end-of-month
NER*CPI:
Mid_data/FX/Bilateral_NER_CPI/
Month_end_Bilateral_NER_Monthly
_CPI/
make_vintages_of_bilateral _RER.R Monthly vintages of daily frequency bilateral NER:
Mid_data/FX/Bilateral_NER/ RDS_by_vintage/Daily_Bilateral_NER/

Monthly vintages of daily frequency
CPI:
Mid_data/FX/CPI/Daily_CPI/
cpi_eom_to_d_Step/
Monthly vintages of daily frequency bilateral RER:
Mid_data/FX/Bilateral_RER/ RDS_by_vintage/ Daily_Bilateral_Step_RER/
compute_EERs.R Monthly vintages of daily frequency bilateral NER:
Mid_data/FX/Bilateral_NER/RDS_by_vintage/Daily_Bilateral_NER/

Monthly vintages of daily frequency NER*CPI:
Mid_data/FX/Bilateral_NER_CPI/ Daily_Bilateral_NER_Daily_Step_CPI/

Weights:
Raw_data/INS_data/
Monthly vintages of daily frequency NEERs:
Mid_data/FX/NEER/RDS_by_vintage/Daily_NEER/

Monthly vintages of daily frequency REERs:
Mid_data/FX/REER/RDS_by_vintage/ Daily_Step_REER/

Realised daily frequency NEERs:
Mid_data/FX/NEER/RDS_by_vintage/
Daily_NEER_actuals/

Realised daily frequency REER:
Mid_data/FX/REER/RDS_by_vintage/
Daily_Step_REER_actuals/

Month-averages and end-of-month versions of the daily series.
tidy_fx_vintages.R Monthly vintages of bilateral NERs, bilateral RERs, NEERs, REERs made above. These are .rds files. The same, but as .csv files.
Note: (a) For a given vintage, each observation in the daily series is the product of NER and CPI on that day.

Section 2 – Daily frequency EER data

The supplementary material includes our new dataset of daily frequency effective exchange rates (EERs). This is found in the Daily EERs.zip file.

Each folder contains one csv file per country, identified by its ISO-3 country code (e.g., ALB.csv for Albania).

Monthly vintages of daily frequency EERs

The folders called ‘Daily_NEER’ and ‘Daily_REER’ contain monthly vintages of daily nominal and real EERs.

  • Each csv file has one column per monthly vintage.
  • Vintages are based on bilateral nominal exchange rates (NER), nowcast CPI, and trade weights available at midnight on the last day of each month.
  • Example: in Daily_REER/ALB.csv, the column titled Jan 2001 contains the real EER daily series as constructed using all information available on 31 January 2001.
Realisations of daily frequency EERs

The folders ‘Daily_NEER_actuals’ and ‘Daily_REER_actuals’ contain realisations (‘actuals’) of the nominal and real EERs targeted by the forecasts.

  • All actuals are constructed using the June 2023 vintage of NER and CPI, while retaining the trade weights available at the time of the forecast.
  • Each csv file has one column per historical set of trade weights.
  • Example: In Daily_NEER_actuals/ALB.csv, the column titled X1996_2003 contains NEER values computed using trade weights for the periods 1979–1989, 1990–1995, and 1996–2003, but not subsequent weights.

Section 3 – Monthly frequency EER data

The supplementary material also includes our dataset of monthly frequency EERs for 79 countries. These are derived from the daily frequency EERs described in the previous section. This dataset is found in the Monthly EERs.zip file. The monthly frequency EERs are in two forms:

  • LD (end-of-month): last daily observation of the month
  • AVE (monthly average): calendar month average of daily observations
Monthly vintages of monthly frequency EERs

The folders LD and AVE contain monthly vintages of monthly frequency EERs. Each monthly vintage is derived from the daily real-time inputs available as at the end of the last day of the month.

  • LD/NEER/ and LD/REER/: monthly vintages of end-of-month NEER/REER
  • AVE/NEER/ and AVE/REER/: monthly vintages of monthly-average NEER/REER

Each csv file contains:

  • ym = YYYYMM (string)
  • time = Monthly index (%tm)
  • One column per monthly vintage, labeled ld_MM_YYYY or ave_MM_YYYY (e.g., ld_1_2001, ave_1_2001)
Realisations of monthly frequency EERs

Four of the folders contain realisations (‘actuals’) of the nominal and real EERs targeted by the forecasts. The four folders are:

  • LD_Target/NEER/ and LD_Target/REER/: end-of-month NEER/REER targets
  • AVE_Target/NEER/ and AVE_Target/REER/: monthly-average NEER/REER targets

Each folder contains one csv file per country, identified by its ISO-3 country code (e.g., ALB.csv for Albania).

Each csv file contains:

  • ym = YYYYMM (string)
  • time = Monthly index (%tm)
  • One column per forecast year, labeled tar_ld_YYYY or tar_ave_YYYY (e.g., tar_ave_2001)

Targets are constructed using the June 2023 vintage of bilateral nominal exchange rates (NER) and CPI, together with the trade weights available in the forecast year (YYYY).

Example: In AVE_Target/NEER/can.csv, the series tar_ave_2001 contains the NEER monthly-average target for 2001 computed using June 2023 NER and CPI and the 1996–2003 trade weight regime applicable to 2001.

Out-of-sample forecast accuracy for period-average EERs is evaluated against tar_ave_YYYY. See Section 4.1 of the RDP for the out-of-sample design. Although period-average accuracy in the paper is evaluated against tar_ave_YYYY, we also provide tar_ld_YYYY for applications that require end-point targets.

Section 4 – Stata code used for analysis

Stata code was used to construct and evaluate forecasts of period-average EERs from real-time daily data. The code:

  1. Constructs real-time daily and monthly datasets for each country/rate.
  2. Computes end-of-month no-change forecasts.
  3. Estimates ARIMA forecasts using month-average data and period-end-point sampling.
  4. Estimates direct mixed-frequency (MIDAS) forecasts of period-average EERs.
  5. Estimates bottom-up daily autoregressive forecasts that are aggregated to period-average forecasts.

All of these steps are orchestrated by a single driver file, DriverFULL.do. When run, driverFULL.do loops over all exchange rate indices and all countries in the sample and calls the supporting .do files stored in the subfolders.

One can use the provided EER dataset and the Stata code to replicate NEER_results.xlsx and REER_results.xlsx using the following process:

  1. Rename ‘Stata_code’ to ‘ReplicationFiles’.
  2. Make a sub-folder called 'Data' and place the data in there.
  3. Open Stata and set the working directory to ReplicationFiles/.
  4. Run: DriverFULL.do
  5. Results appear in spreadsheets in the root directory, which are called: NEER_results.xlsx and REER_results.xlsx.

If the dataset of bilateral exchange rates are not provided, one could replicate NER_results.xlsx and RER_results.xlsx with the same process. However, our dataset of dataset of bilateral exchange rates is not provided in the supplementary information, so one cannot replicate NER_results.xlsx and RER-results.xlsx with the supplementary information. However, NER_results.xlsx and RER_results.xlsx are provided in the supplementary information (see Section 5 of this read me file).

Folder structure

The replication directory is organised as follows:

ReplicationFiles/

driverFULL.do

compiledaily.do

compilebench.do

compiledailymidas.do

LastdayNC/

LASTDNC.do

(log files and any intermediate datasets created by LASTDNC.do)

ARIMA/

ARIMA.do

ARIMA_PC.do

(log files and any intermediate datasets)

MIDAS/

gendata.do

MIDAS.do

(intermediate MIDAS datasets, logs)

BottomUP/

DAILY.do

DAILY_PC.do

(intermediate daily forecast datasets, logs)

(other intermediate/output files created when you run the code, e.g. *.dta, *.smcl, *.log, and results spreadsheets such as REERresults.xlsx, NEERresults.xlsx)

Data/

Daily_NEER/

Daily_NEER_actuals/

Daily_REER/

Daily_REER_actuals/

The compilation scripts (compiledaily.do, compiledailymidas.do, compilebench.do) require that the daily data be placed in the subfolders within ReplicationFiles/Data/.

Main driver and top-level .do files

All forecasting exercises in the paper are coordinated by a single master script, DriverFULL.do. Users

should begin by reading this file, as it documents the forecasting design, country coverage, date ranges, specifications, and the sequencing of each empirical exercise.

DriverFULL.do (main driver script)

Purpose: runs the complete forecasting replication for all exchange rate indices and countries.

Role: this file controls the entire experiment. It:

  • Defines the country lists and exchange rate indices.
  • Loops over all EER series and countries.
  • Calls the compilation routines to build country-specific datasets.
  • Executes each forecasting method (benchmarks, ARIMA, MIDAS, bottom-up).
  • Writes forecast evaluation results to Excel workbooks.
  • Produces log files for each class of model.

All arguments passed to other scripts, as well as all model settings (forecast types, variants, exclusions, and specifications), are defined in DriverFULL.do.

Users should consult this file directly to understand the logic and parameterisation of the forecasts.

compiledaily.do

Purpose: constructs the daily and monthly EER datasets used by the benchmark, ARIMA, and bottom-up forecasts.

Role: reads the raw daily EER data for a given country and rate and produces the aligned daily and monthly series used in estimation.

compilebench.do

Purpose: creates realised monthly targets and benchmark series used for forecast evaluation.

Role: generates the realised period-average EER used to evaluate all forecasts and aligns forecast and evaluation samples.

compiledailymidas.do

Purpose: constructs datasets for mixed-frequency (MIDAS) and direct daily-to-monthly models.

Role: prepares daily regressors and monthly targets required for MIDAS regressions.

Subfolder scripts

All forecasting models are stored in subdirectories by method. Each subfolder contains the scripts that implement one major class of forecasting approach.

LastdayNC/

LASTDNC.do

Implements the end-of-month ‘no-change’ benchmark forecast and computes associated forecast evaluation statistics.

ARIMA/

ARIMA.do: estimates monthly ARIMA models for period-average EERs in levels and produces recursive forecasts of EER levels.

ARIMA_PC.do: estimates monthly ARIMA models for period-average EERs in percentage change and produces recursive forecasts of EER levels.

MIDAS/

gendata.do: constructs mixed-frequency data lag structures for MIDAS estimation.

MIDAS.do: estimates MIDAS and direct daily-to-monthly regression models and outputs forecast evaluation statistics.

BottomUP/

DAILY.do: implements bottom-up forecasting by estimating daily autoregressions in levels and aggregating daily forecasts to monthly average levels.

DAILY_PC.do: implements bottom-up forecasting by estimating daily autoregressions in percent change and aggregating daily forecasts to monthly average levels.

Section 5 – Results produced by Stata code

Each spreadsheet of results (e.g. NEER_results.xlsx) has one sheet per forecasting method.

On the ‘No-change’ tab:

  • Columns A to Y compare month-average no-change relative to end-of-month no-change.
  • Columns AA to AS compare end-of-month no-change to month-average no-change.

On all other tabs:

  • Columns A to Y compare the named model (e.g. PEPS_AR1) to end-of-month no-change.
  • Columns AA to AS compare the named model to month-average no-change.

On each sheet, the top 81 rows contain results for individual countries. There is one row per country. Each column refers to a different horizon and statistic (mean square prediction error (MSPE) ratio, success ratio (SR), significance of MSPE, significance of SR). The ‘significance of MSPE’ and ‘Significance of SR’ columns report p-values from hypothesis tests.

On each sheet, the remaining rows contain summaries across countries. There is a row for ‘all’ countries, and some rows for summaries computed on subsets of countries. The MSPE and SR columns report medians across the specified countries. The ‘Significance of MSPE’ and ‘Significance of SR’ columns report the proportion of countries whose p-value is below 5%.

References

Ilzetzki E, CM Reinhart and K Rogoff (2019), ‘Exchange Arrangements Entering the Twenty-first Century: Which Anchor Will Hold?’, The Quarterly Journal of Economics, 134(2), pp 599–646.

Ilzetzki E, CM Reinhart and K Rogoff (2022), ‘Rethinking Exchange Rate Regimes’, in G Gopinath, E Helpman and K Rogoff (eds), Handbook of International Economics: International Trade, Volume 6, Handbooks in Economics, North Holland, Amsterdam, pp 91–145.

23 December 2025

Back to abstract