Treasury Rates - treasury

Data - GFD

Tickers

Code
treasury_info %>%
  select(Ticker = Ticker, Name, Country) %>%
  right_join(treasury %>%
               group_by(Ticker) %>%
               summarise(Nobs = n(),
                         start = first(year(date)),
                         end = last(year(date))), by = "Ticker") %>%
  arrange(-Nobs) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Country)),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Metadata

Code
treasury_info %>% 
  select(Ticker = Ticker, Name, Metadata) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

1925-1970

Germany, Switzerland, UK, US

1925-1970

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGGBR10D", "IGUSA10D", "IGCHE10D", "IGDEU10D"),
         date >= as.Date("1925-01-01"),
         date <= as.Date("1970-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country, linetype = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.45, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 5), "-01-01")),
               labels = date_format("%y")) + 
  xlab("") + ylab("Interest Rates")

1925-2021

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGGBR10D", "IGUSA10D", "IGFRA10D", "IGDEU10D"),
         date >= as.Date("1925-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country, linetype = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.45, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 5), "-01-01")),
               labels = date_format("%y")) + 
  xlab("") + ylab("Interest Rates")

1925-2021

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGUSA10D", "IGFRA10D", "IGDEU10D"),
         date >= as.Date("1925-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = c("#002395", "#000000", "#B22234")) +
  theme(legend.position = c(0.15, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 10), "-01-01")),
               labels = date_format("%y")) + 
  xlab("") + ylab("Treasury 10-Year Interest Rates")

France, Italy, Netherlands, Norway

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker = Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGNLD10D", "IGFRA10D", "IGNOR10D", "IGITA10D"),
         date >= as.Date("1925-01-01"),
         date <= as.Date("1970-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country, linetype = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.45, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 5), "-01-01")),
               labels = date_format("%y")) + 
  xlab("") + ylab("Interest Rates")

1800-1925

Germany, Switzerland, UK, US

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker = Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGGBR10D", "IGUSA10D", "IGCHE10D", "IGDEU10D"),
         date >= as.Date("1800-01-01"),
         date <= as.Date("1925-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country, linetype = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.45, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 20), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Interest Rates")

France, Italy, Netherlands, Norway

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker = Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGNLD10D", "IGFRA10D", "IGNOR10D", "IGITA10D"),
         date >= as.Date("1800-01-01"),
         date <= as.Date("1925-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country, linetype = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.45, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 20), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Interest Rates")

1970-2020

Germany, Switzerland, UK, US

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker = Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGGBR10D", "IGUSA10D", "IGCHE10D", "IGDEU10D"),
         date >= as.Date("1970-01-01"),
         date <= as.Date("2020-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country, linetype = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.85, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 5), "-01-01")),
               labels = date_format("%y")) + 
  xlab("") + ylab("Interest Rates")

France, Italy, Netherlands, Norway

Code
treasury %>%
  left_join(treasury_info %>% 
              select(Ticker = Ticker, Country), by = "Ticker") %>%
  filter(Ticker %in% c("IGNLD10D", "IGFRA10D", "IGNOR10D", "IGITA10D"),
         date >= as.Date("1970-01-01"),
         date <= as.Date("2020-01-01")) %>%
  group_by(Ticker) %>%
  ggplot(.) + theme_minimal() +
  geom_line(aes(x = date, y = value / 100, color = Country, linetype = Country)) +
  scale_y_continuous(breaks = 0.01*seq(0, 300, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.85, 0.85),
        legend.title = element_blank()) +
  scale_x_date(breaks = as.Date(paste0(seq(1700, 2020, 5), "-01-01")),
               labels = date_format("%y")) + 
  xlab("") + ylab("Interest Rates")