Credit-to-GDP gaps - CREDIT_GAP

Data - BIS

Info

Last observation: Q: 2025-12-31 (N = 132)

First observation: Q: 1947-12-31 (N = 1)

Last data update: 25 jul 2026, 09:54. Last compile: 17 aoû 2026, 22:31

Structure

iso3c, iso2c, Borrowers’ country

Code
CREDIT_GAP |>
  arrange(iso3c, date) |>
  group_by(iso3c, iso2c, `Borrowers' country`) |>
  summarise(Nobs = n(),
            start = first(date),
            end = last(date)) |>
  arrange(-Nobs) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(`Borrowers' 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 .}

date

Code
CREDIT_GAP |>
  group_by(date) |>
  summarise(Nobs = n()) |>
  arrange(desc(date)) |>
  print_table_conditional()

Spain, Italy, United States

Credit to GDP Ratio

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "A",
         iso3c %in% c("ESP", "USA", "ITA")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 300, 20),
                     labels = scales::percent_format(accuracy = 1))

Credit to GDP Gaps

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "C",
         iso3c %in% c("ESP", "USA", "ITA")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 300, 20),
                     labels = scales::percent_format(accuracy = 1))

Denmark, Netherlands, Germany

Credit to GDP Ratio

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "A",
         iso3c %in% c("DNK", "NLD", "DEU")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 300, 20),
                     labels = scales::percent_format(accuracy = 1))

Credit to GDP Gaps

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "C",
         iso3c %in% c("DNK", "NLD", "DEU")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.15, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 300, 10),
                     labels = scales::percent_format(accuracy = 1))

Spain, Ireland, Portugal

Credit to GDP Ratio

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "A",
         iso3c %in% c("IRL", "ESP", "PRT")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 600, 20),
                     labels = scales::percent_format(accuracy = 1))

Credit to GDP Gaps

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "C",
         iso3c %in% c("IRL", "ESP", "PRT")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.15, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-300, 300, 10),
                     labels = scales::percent_format(accuracy = 1))

France, Spain, Italy

Credit to GDP Ratio

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "A",
         iso3c %in% c("FRA", "ESP", "ITA")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.2, 0.85),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 300, 20),
                     labels = scales::percent_format(accuracy = 1))

Credit to GDP Gaps

Code
CREDIT_GAP |>
  filter(CG_DTYPE == "C",
         iso3c %in% c("FRA", "ESP", "ITA")) |>
  left_join(colors, by = c("Borrowers' country" = "country")) |>
  mutate(value = value/100) |>
  ggplot() + theme_minimal() + ylab("Credit-to-GDP ratio") + xlab("") +
  geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_flags +
  scale_x_date(breaks = seq(1920, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.15, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-300, 300, 10),
                     labels = scales::percent_format(accuracy = 1))