FM %>%
filter(PROVIDER_FM_ID %in% c("DFR", "MLFR", "MRR_RT"),
DATA_TYPE_FM == "LEV",
FREQ == "D") %>%
day_to_date %>%
#add_row(date = as.Date("2024-09-12"), PROVIDER_FM_ID = "DFR", OBS_VALUE = 3.5) %>%
#add_row(date = as.Date("2024-09-12"), PROVIDER_FM_ID = "MRR_RT", OBS_VALUE = 3.65) %>%
#add_row(date = as.Date("2024-09-12"), PROVIDER_FM_ID = "MLFR", OBS_VALUE = 3.9) %>%
#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) %>%
left_join(PROVIDER_FM_ID, by = "PROVIDER_FM_ID") %>%
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("2022-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 = 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))