Financial market data - FM

Data - ECB

Structure

Real Rates

USA, Euro Area

1999

Code
plot <- FM |>
  filter(PROVIDER_FM_ID %in% c("R_US10YT_RR", "R_U2_10Y")) |>
  month_to_date() |>
  mutate(Ref_area = ifelse(REF_AREA == "U2", "Zone euro", "États-Unis")) |>
  filter(date >= as.Date("1999-01-01")) |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Taux d'intérêt réels à 10 ans") +
  geom_line(aes(x = date, y = OBS_VALUE, color = Ref_area)) + 
  scale_color_manual(values = c("#B22234", "#003399")) +
  geom_rect(data = nber_recessions |>
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin =-Inf, ymax = +Inf), 
            fill = '#B22234', alpha = 0.1)  +
  geom_rect(data = cepr_recessions |>
              filter(Peak > as.Date("1999-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = -Inf, ymax = +Inf), 
            fill = '#003399', alpha = 0.1)  +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.26, 0.2),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  labs(caption = "Source: BCE, Données sur les marchés financiers")
save(plot, file = "FM_files/figure-html/real-rates-USA-EUR-1999-1.RData")
plot

USA, Japan, Euro Area

All

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("R_US10YT_RR", "R_JP10YT_RR", "R_U2_10Y")) |>
  month_to_date() |>
  mutate(Ref_area = ifelse(REF_AREA == "U2", "Europe", Ref_area)) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Real rates, 10-year") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  scale_x_date(breaks = seq(1900, 2100, 10) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1))

2010-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("R_US10YT_RR", "R_JP10YT_RR", "R_U2_10Y")) |>
  month_to_date() |>
  mutate(Ref_area = ifelse(REF_AREA == "U2", "Europe", Ref_area)) |>
  filter(date >= as.Date("2010-01-01")) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Real rates, 10-year") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1))

2015-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("R_US10YT_RR", "R_JP10YT_RR", "R_U2_10Y")) |>
  month_to_date() |>
  mutate(Ref_area = ifelse(REF_AREA == "U2", "Europe", Ref_area)) |>
  filter(date >= as.Date("2015-01-01")) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Real rates, 10-year") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1))

2017-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("R_US10YT_RR", "R_JP10YT_RR", "R_U2_10Y")) |>
  month_to_date() |>
  mutate(Ref_area = ifelse(REF_AREA == "U2", "Europe", Ref_area)) |>
  filter(date >= as.Date("2017-01-01")) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Real rates, 10-year") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1))

ECB Key Interest rates

EONIA

All

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT", "EONIA"),
         FREQ == "M") |>
  month_to_date() |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.45, 0.92),
        legend.title = element_blank())

Deposit Facility, Marginal Lending Facility

All

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT", "MRR_FR", "MRR_MBR", "MRR"),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.45, 0.92),
        legend.title = element_blank())

Deposit Facility, Marginal Lending Facility

All

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT"),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  mutate(Provider_fm_id = factor(PROVIDER_FM_ID,
                                 levels = c("MLFR", "MRR_RT", "DFR"),
                                 labels = c("ECB Marginal lending facility",
                                            "ECB Main refinancing operations",
                                            "ECB Deposit facility"))) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.65, 0.92),
        legend.title = element_blank()) +
  geom_hline(yintercept = 3.75/100, linetype = "dashed")

2010

Code
dates_ecb <- FM |>
  filter(PROVIDER_FM_ID == "DFR") |>
  day_to_date() |>
  mutate(OBS_VALUE = OBS_VALUE-lag(OBS_VALUE)) |>
  filter(OBS_VALUE != 0) |>
  pull(date)
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT"),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  mutate(Provider_fm_id = factor(PROVIDER_FM_ID,
                                 levels = c("MLFR", "MRR_RT", "DFR"),
                                 labels = c("ECB Marginal lending facility",
                                            "ECB Main refinancing operations - Minimum bid rate/fixed rate",
                                            "ECB Deposit facility"))) |>
  filter(date >= as.Date("2010-01-01"))|>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = dates_ecb,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 0.5),
                     labels = percent_format(accuracy = .1)) +
  theme(legend.position = c(0.45, 0.92),
        legend.title = element_blank())

2016-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT"),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  filter(date >= as.Date("2016-01-01"))|>
  mutate(Provider_fm_id = factor(PROVIDER_FM_ID,
                                 levels = c("MLFR", "MRR_RT", "DFR"),
                                 labels = c("ECB Marginal lending facility",
                                            "ECB Main refinancing operations - Minimum bid rate/fixed rate",
                                            "ECB Deposit facility"))) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.45, 0.92),
        legend.title = element_blank())

2022-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT"),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  filter(date >= as.Date("2022-01-01")) |>
  add_row(date = as.Date("2025-06-11"), PROVIDER_FM_ID = "DFR", OBS_VALUE = 2) |>
  add_row(date = as.Date("2025-06-11"), PROVIDER_FM_ID = "MRR_RT", OBS_VALUE = 2.15) |>
  add_row(date = as.Date("2025-06-11"), PROVIDER_FM_ID = "MLFR", OBS_VALUE = 2.4) |>
  add_row(date = as.Date("2025-06-10"), PROVIDER_FM_ID = "DFR", OBS_VALUE = 2.25) |>
  add_row(date = as.Date("2025-06-10"), PROVIDER_FM_ID = "MRR_RT", OBS_VALUE = 2.4) |>
  add_row(date = as.Date("2025-06-10"), PROVIDER_FM_ID = "MLFR", OBS_VALUE = 2.65) |>
  arrange(desc(date)) |>
  #add_row(date = as.Date("2024-09-17"), PROVIDER_FM_ID = "DFR", OBS_VALUE = 3.5) %>%
  #add_row(date = as.Date("2024-09-17"), PROVIDER_FM_ID = "MRR_RT", OBS_VALUE = 3.65) %>%
  #add_row(date = as.Date("2024-09-17"), PROVIDER_FM_ID = "MLFR", OBS_VALUE = 3.9) %>%
  mutate(Provider_fm_id = factor(PROVIDER_FM_ID,
                                 levels = c("MLFR", "MRR_RT", "DFR"),
                                 labels = c("ECB Marginal lending facility",
                                            "ECB Main refinancing operations - Minimum bid rate/fixed rate",
                                            "ECB Deposit facility"))) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = c(dates_ecb),
               labels = date_format("%d %B %Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 0.5),
                     labels = percent_format(accuracy = .1)) +
  theme(legend.position = c(0.65, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
  geom_label_repel(data = . %>% filter(date == max(date)),
                   aes(x = date, y = OBS_VALUE / 100, label = percent(OBS_VALUE / 100, acc = 0.01), color = Provider_fm_id))

2022- (en français)

Code
taux_fr <- c("MLFR" = "Prêt marginal",
             "MRR_RT" = "Refinancement principal",
             "DFR" = "Dépôt")
d <- FM |>
  filter(PROVIDER_FM_ID %in% names(taux_fr),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  filter(date >= as.Date("2022-01-01")) |>
  transmute(date, value = OBS_VALUE / 100,
            taux = factor(taux_fr[PROVIDER_FM_ID], levels = taux_fr))
d_fin <- d |>
  slice_max(date, by = taux) |>
  mutate(label = paste0(taux, " : ",
                        scales::label_percent(accuracy = .01, decimal.mark = ",",
                                              suffix = " %")(value)))
d |>
  ggplot(aes(x = date, y = value, color = taux)) +
  geom_hline(yintercept = 0, linewidth = 0.3, color = "grey40") +
  geom_step(linewidth = 0.7) +
  ggrepel::geom_text_repel(data = d_fin, aes(label = label),
                           nudge_x = 200, hjust = 0, direction = "y", box.padding = 0.4,
                           segment.size = 0.3, min.segment.length = 0,
                           arrow = arrow(length = unit(0.015, "npc")),
                           size = 3.3, show.legend = FALSE) +
  theme_minimal() + xlab("") + ylab("Taux directeurs de la BCE") +
  scale_x_date(breaks = seq(as.Date("2022-01-01"), max(d$date), "6 months"),
               labels = scales::label_date("%b %Y"),
               expand = expansion(mult = c(0.01, 0.36))) +
  scale_y_continuous(breaks = 0.01 * seq(-10, 50, 0.5),
                     labels = scales::label_percent(accuracy = .1, decimal.mark = ",",
                                                    suffix = " %")) +
  scale_color_manual(values = c("#C0392B", "black", "#2166AC")) +
  theme(legend.position = "none", panel.grid.minor = element_blank(),
        axis.text.x = element_text(angle = 45, hjust = 1))

2022 - Dates of change

  • Schedules for the meetings of the Governing Council. html

  • Key ECB interest rates: Dates of change. html

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT"),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  mutate(Provider_fm_id = factor(PROVIDER_FM_ID,
                                 levels = c("MLFR", "MRR_RT", "DFR"),
                                 labels = c("ECB Marginal lending facility",
                                            "ECB Main refinancing operations",
                                            "ECB Deposit facility"))) |>
  filter(date >= as.Date("2022-07-01")) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = c(dates_ecb, Sys.Date()),
               labels = date_format("%d %B %Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 0.5),
                     labels = percent_format(accuracy = .1)) +
  theme(legend.position = c(0.7, 0.2),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

Around September 2022

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT"),
         DATA_TYPE_FM == "LEV",
         FREQ == "D") |>
  day_to_date() |>
  filter(date >= as.Date("2022-09-05"),
         date <= as.Date("2022-09-20")) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(from = as.Date("2022-01-01"), as.Date("2026-01-01"), by = "1 day"),
               labels = date_format("%d %b %Y")) +
  scale_y_continuous(breaks = 0.01*seq(-10, 50, 0.25),
                     labels = percent_format(accuracy = .01)) +
  theme(legend.position = c(0.4, 0.92),
        legend.title = element_blank(),
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

Japan

1970-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("JP10YT_RR", "R_JP10YT_RR")) |>
  month_to_date() |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 50, 2),
                     labels = percent_format(accuracy = 1)) +
  theme(legend.position = c(0.75, 0.9),
        legend.title = element_blank())

2000-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("JP10YT_RR", "R_JP10YT_RR")) |>
  month_to_date() |>
  filter(date >= as.Date("2000-01-01")) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.9),
        legend.title = element_blank())

United States

1970-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("US10YT_RR", "R_US10YT_RR")) |>
  month_to_date() |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1900, 2100, 10) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 50, 2),
                     labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.9),
        legend.title = element_blank())

2000-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("US10YT_RR", "R_US10YT_RR")) |>
  month_to_date() |>
  filter(date >= as.Date("2000-01-01")) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.9),
        legend.title = element_blank())

Euro area

1970-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("U2_10Y", "R_U2_10Y")) |>
  month_to_date() |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1900, 2100, 10) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 50, 2),
                     labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.75, 0.9),
        legend.title = element_blank())

2000-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("U2_10Y", "R_U2_10Y")) |>
  month_to_date() |>
  filter(date >= as.Date("2000-01-01")) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank())

2015-

Code
FM |>
  filter(PROVIDER_FM_ID %in% c("U2_10Y", "R_U2_10Y")) |>
  month_to_date() |>
  filter(date >= as.Date("2015-01-01")) |>
  ggplot() + 
  geom_line(aes(x = date, y = OBS_VALUE / 100, color = Provider_fm_id)) + 
  theme_minimal() + xlab("") + ylab("Interest Rates (%)") +
  scale_x_date(breaks = seq(1960, 2100, 1) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(-50, 50, 1),
                     labels = percent_format(accuracy = 1)) +
  
  theme(legend.position = c(0.35, 0.2),
        legend.title = element_blank())