Exchange Rates

Data - ECB

Info

source dataset .html .RData
ecb EXR 2024-11-24 2024-11-24

Data on xrates

source dataset .html .RData
bdf EXR 2024-07-26 2024-11-21
bis EER 2024-11-24 2024-11-24
bis EER_D 2024-11-18 2024-05-10
bis XRU 2024-11-24 2024-11-24
bis XRU_D 2024-11-24 2024-11-24
ecb EXR 2024-11-24 2024-11-24
eurostat ert_bil_eur_d 2024-11-24 2024-11-24
eurostat ert_h_eur_d 2024-11-24 2024-11-24
fred xrates 2024-11-24 2024-11-24
gfd xrates 2024-06-20 2021-01-08
oecd REFSERIES_MSIT 2024-09-15 2024-11-24
oecd SNA_TABLE4 2024-09-15 2024-11-24
wdi PA.NUS.FCRF 2024-11-24 2024-11-24

LAST_COMPILE

LAST_COMPILE
2024-11-24

Last

TIME_PERIOD FREQ Nobs
2024-S1 H 30
2024-Q3 Q 620
2024-11-22 D 244
2024-10 M 683
2023 A 1256

FREQ

Code
EXR %>%
  left_join(FREQ, by = "FREQ") %>%
  group_by(FREQ, Freq) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
FREQ Freq Nobs
D Daily 2797253
M Monthly 321609
Q Quarterly 172881
A Annual 37314
H Half-yearly 1921

COLLECTION

Code
EXR %>%
  left_join(COLLECTION, by = "COLLECTION") %>%
  group_by(COLLECTION, Collection) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
COLLECTION Collection Nobs
A Average of observations through period 3315111
E End of period 15867

OBS_STATUS

Code
EXR %>%
  left_join(OBS_STATUS, by = "OBS_STATUS") %>%
  group_by(OBS_STATUS, Obs_status) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
OBS_STATUS Obs_status Nobs
A Normal value 2536854
M Missing value; data cannot exist 769866
P Provisional value 21841
H Missing value; holiday or weekend 2417

Last

Code
EXR %>%
  filter(TIME_PERIOD == last_time) %>%
  select_if(function(col) length(unique(col)) > 1) %>%
  select(KEY, CURRENCY, CURRENCY_DENOM, OBS_VALUE) %>%
  print_table_conditional()

Swiss Franc, Dollar, Pound

All

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0.1, 3, 0.1),
                     labels = dollar_format(accuracy = .1, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.8, 0.80),
        legend.title = element_blank())

2008-

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= as.Date("2008-01-01")) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0.1, 3, 0.1),
                     labels = dollar_format(accuracy = .1, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.8, 0.80),
        legend.title = element_blank())

2021-

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= as.Date("2021-01-01")) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "3 months",
               labels = date_format("%b %Y")) +
  scale_y_continuous(breaks = seq(0.1, 3, 0.05),
                     labels = dollar_format(accuracy = .1, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.8, 0.9),
        legend.title = element_blank())

2 years before

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= Sys.Date() - years(2)) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "2 months",
               labels = date_format("%b %Y")) +
  scale_y_continuous(breaks = seq(0.1, 3, 0.05),
                     labels = dollar_format(accuracy = .01, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.8, 0.9),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

2022-

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= as.Date("2022-01-01")) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "3 months",
               labels = date_format("%b %Y")) +
  scale_y_continuous(breaks = seq(0.1, 3, 0.05),
                     labels = dollar_format(accuracy = .1, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.8, 0.9),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

1 year-before

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= Sys.Date() - years(1)) %>%
  arrange(desc(date)) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "1 month",
               labels = date_format("%b %Y")) +
  scale_y_log10(breaks = seq(0.1, 3, 0.04),
                     labels = dollar_format(accuracy = .01, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.15, 0.9),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

6 months

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= Sys.Date() - months(3)) %>%
  arrange(desc(date)) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "7 days",
               labels = date_format("%d %b %Y")) +
  scale_y_log10(breaks = seq(0.1, 3, 0.04),
                     labels = dollar_format(accuracy = .01, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.15, 0.3),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  geom_text_repel(aes(x = date, y = OBS_VALUE, label = OBS_VALUE),
                  fontface ="plain", color = "black", size = 3)

3 months

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= Sys.Date() - months(3)) %>%
  arrange(desc(date)) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "3 days",
               labels = date_format("%d %b %Y")) +
  scale_y_log10(breaks = seq(0.1, 3, 0.04),
                     labels = dollar_format(accuracy = .01, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.15, 0.3),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  geom_text_repel(aes(x = date, y = OBS_VALUE, label = OBS_VALUE),
                  fontface ="plain", color = "black", size = 3)

1 month

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF", "GBP")) %>%
  month_to_date %>%
  filter(date >= Sys.Date() - months(1)) %>%
  arrange(desc(date)) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = "1 day",
               labels = date_format("%d %b %Y")) +
  scale_y_log10(breaks = seq(0.1, 3, 0.04),
                     labels = dollar_format(accuracy = .01, prefix = "", suffix = "/€")) +
  
  theme(legend.position = c(0.15, 0.75),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  geom_text_repel(aes(x = date, y = OBS_VALUE, label = OBS_VALUE), fontface ="plain", color = "black", size = 3)

Swiss Franc, Dollar

All

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF")) %>%
  month_to_date %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0.1, 3, 0.1),
                     labels = dollar_format(accuracy = .1, prefix = "", suffix = "/€")) +
  theme(legend.position = c(0.8, 0.80),
        legend.title = element_blank())

2008-

Code
EXR %>%
  filter(FREQ == "D",
         CURRENCY %in% c("USD", "CHF")) %>%
  month_to_date %>%
  filter(date >= as.Date("2008-01-01")) %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = seq(1960, 2100, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0.1, 3, 0.1),
                     labels = dollar_format(accuracy = .1, prefix = "", suffix = "/€")) +
  theme(legend.position = c(0.8, 0.80),
        legend.title = element_blank())

Argentine Peso : Euro

Linear

Code
plot_linear <- EXR %>%
  filter(FREQ == "M",
         CURRENCY == "ARS") %>%
  month_to_date %>%
  ggplot(.) + geom_line(aes(x = date, y = OBS_VALUE)) + 
  theme_minimal() + xlab("") + ylab("") +
  scale_x_date(breaks = seq(1960, 2100, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 100, 10),
                     labels = dollar_format(accuracy = 1, prefix = "", suffix = "/€")) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.8, 0.80),
        legend.title = element_blank())

plot_linear

Log

Code
plot_log <- plot_linear +
  scale_y_log10(breaks = c(1, 2, 3, 5, 8, 10, 20, 30, 50, 80, 100),
                     labels = dollar_format(accuracy = 1, prefix = "", suffix = "/€"))

plot_log

Bind

Code
ggarrange(plot_linear + ggtitle("Linear Scale"), plot_log  + ggtitle("Log Scale"))