Risk Assessment Indicators - RAI

Data - ECB

Structure

Table: Average 2016-2022

Code
RAI |>
  filter(FREQ == "M") |>
  month_to_date() |>
  filter(date >= as.Date("2016-01-01")) |>
  group_by(DD_ECON_CONCEPT, Dd_econ_concept, REF_AREA, Ref_area) |>
  summarise(OBS_VALUE = mean(OBS_VALUE),
            Nobs = n()) |>
  print_table_conditional()

France

Table

Code
RAI |>
  filter(FREQ == "M",
         REF_AREA %in% c("FR", "U2")) %>%
  select_if(~ n_distinct(.) > 1) |>
  group_by(DD_ECON_CONCEPT, Ref_area) |>
  filter(TIME_PERIOD == max(TIME_PERIOD)) |>
  select(Ref_area, DD_ECON_CONCEPT, OBS_VALUE) |>
  spread(Ref_area, OBS_VALUE) |>
  arrange(-`France`) |>
  print_table_conditional()
DD_ECON_CONCEPT Euro area (changing composition) France
MMTCH 77.447942 78.4134930
ST1TMF 69.119675 77.0253831
SVLHHNFC 66.652555 40.5665177
IBL1TL 24.675718 36.8736954
LC1DHHS NA 36.3093054
NDEPFUN 14.770732 15.7210583
LEVR 8.357061 7.1423100
GRNLHHNFC NA 5.1158837
CT1DGGV NA 4.2882380
SVLHPHH 16.286922 3.1223864
LMGLNFC NA 1.1322222
LMGBLNFCH NA 0.9438662
LMGLHH NA 0.5008726
LMGOLNFCH NA 0.2650209

SVLHHNFC, LC1DHHS

Code
RAI |>
  filter(DD_ECON_CONCEPT %in% c("SVLHHNFC", "LC1DHHS"),
         REF_AREA %in% c("FR", "U2")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  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("Share of variable rate") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color, linetype = Dd_econ_concept)) + 
  add_flags(3) + scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.7, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 5),
                     labels = percent_format(accuracy = 1))

CT1DGGV, SVLHPHH

Code
RAI |>
  filter(DD_ECON_CONCEPT %in% c("CT1DGGV", "SVLHPHH"),
         REF_AREA %in% c("FR", "U2")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  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("Share of variable rate") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color, linetype = Dd_econ_concept)) + 
  add_flags(3) + scale_color_identity() +
  scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  theme(legend.position = c(0.7, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-10, 100, 5),
                     labels = percent_format(accuracy = 1))

SVLHPHH - Share of floating rates, Households

Table: Last Time

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH") |>
  filter(TIME_PERIOD == max(TIME_PERIOD)) |>
  select_if(~n_distinct(.) > 1) |>
  select(REF_AREA, Ref_area, OBS_VALUE, OBS_VALUE) |>
  mutate(OBS_VALUE = round(OBS_VALUE, 1)) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Ref_area))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) |>
  select(Flag, everything()) |>
  arrange(OBS_VALUE) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Table: Many dates

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH",
         TIME_PERIOD %in% c(last_time, "2020-01", "2015-01", "2010-01", "2005-01")) |>
  select_if(~n_distinct(.) > 1) |>
  select(REF_AREA, Ref_area, TIME_PERIOD, OBS_VALUE) |>
  mutate(OBS_VALUE = round(OBS_VALUE, 1)) |>
  spread(TIME_PERIOD, OBS_VALUE) |>
  print_table_conditional()
REF_AREA Ref_area 2005-01 2010-01 2015-01 2020-01 2026-09
AT Austria 65.7 76.2 87.3 40.6 21.6
BE Belgium 58.2 58.4 2.4 4.5 6.1
BG Bulgaria NA 96.2 84.0 97.3 99.6
CY Cyprus NA 61.7 95.1 90.7 9.8
CZ Czech Republic NA NA 7.2 2.1 6.8
DE Germany 19.1 21.6 13.2 11.6 12.8
DK Denmark 70.1 49.2 NA NA NA
EE Estonia 99.3 56.7 85.4 NA 97.8
ES Spain 93.1 90.1 66.6 32.1 8.0
FI Finland 97.8 97.5 96.8 97.6 95.5
FR France 36.5 12.8 3.8 1.9 3.1
GR Greece 84.4 72.2 93.1 70.2 16.8
HR Croatia NA NA 84.9 20.5 1.9
HU Hungary 58.1 84.4 44.1 2.1 7.5
IE Ireland 93.6 84.1 66.0 25.8 5.8
IT Italy 87.3 81.3 71.7 18.0 16.9
LT Lithuania 97.9 84.7 89.8 97.8 94.4
LU Luxembourg 88.5 NA 63.9 30.1 51.4
LV Latvia 72.3 84.4 NA 94.3 94.0
MT Malta NA 88.0 77.9 47.4 36.5
NL Netherlands 43.2 24.9 19.9 17.4 21.6
PL Poland 90.9 100.0 99.9 100.0 27.7
PT Portugal 97.8 99.5 93.0 86.7 13.9
RO Romania NA NA 89.9 73.6 24.9
SE Sweden NA 85.6 85.5 64.2 87.7
SI Slovenia 99.1 98.1 93.4 55.5 2.4
SK Slovakia 62.4 36.0 6.4 1.1 2.2
U2 Euro area (changing composition) 54.7 42.6 21.6 15.8 16.3

Germany, France, Italy, Spain, Netherlands

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH",
         REF_AREA %in% c("FR", "DE", "IT", "ES",  "NL")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  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("Share of variable rate, households (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(5) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

Netherlands, Germany, Belgium, France, Europe

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH",
         REF_AREA %in% c("NL", "DE", "BE", "FR",  "U2")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  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("Share of variable rate, households (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(5) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

France, Spain, Portugal, latvia, Lithuania, Estonia

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH",
         REF_AREA %in% c("FR", "ES", "PT", "EE", "LT", "U2")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  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("Share of variable rate, households (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(6) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

France, Spain, Portugal

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH",
         REF_AREA %in% c("FR", "ES", "PT")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Share of variable rate, households (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

Italy, Sweden, Poland

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH",
         REF_AREA %in% c("PL", "IT", "SE")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Share of variable rate, households (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

Netherlands, Germany, Belgium

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHPHH",
         REF_AREA %in% c("NL", "DE", "BE")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Share of variable rate, households (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

SVLHHNFC - Share of floating rates, Households, and Corporations

Table

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHHNFC",
         TIME_PERIOD %in% c(last_time, "2020-01", "2015-01", "2010-01", "2005-01")) |>
  select_if(~n_distinct(.) > 1) |>
  select(REF_AREA, Ref_area, TIME_PERIOD, OBS_VALUE) |>
  mutate(OBS_VALUE = round(OBS_VALUE, 1)) |>
  spread(TIME_PERIOD, OBS_VALUE) |>
  print_table_conditional()
REF_AREA Ref_area 2005-01 2010-01 2015-01 2020-01 2026-09
AT Austria 91.7 92.3 89.7 70.1 65.8
BE Belgium 90.7 90.4 76.4 73.3 76.8
BG Bulgaria NA 98.7 95.8 95.8 97.8
CY Cyprus NA 85.4 96.1 94.2 73.8
CZ Czech Republic 80.8 76.5 51.7 48.7 46.5
DE Germany 61.5 72.6 59.4 61.3 69.8
DK Denmark 76.4 64.5 43.6 50.2 71.5
EE Estonia 92.0 71.1 80.4 83.6 NA
ES Spain 91.5 91.4 88.1 70.8 72.1
FI Finland 94.3 NA NA 94.8 NA
FR France 64.8 45.3 39.8 32.3 40.6
GR Greece 82.9 86.1 97.7 91.6 NA
HR Croatia NA NA 88.8 57.8 43.9
HU Hungary 95.3 94.5 75.0 52.4 33.4
IE Ireland 83.0 87.3 82.3 67.3 52.5
IT Italy 90.4 93.9 92.4 73.4 76.2
LT Lithuania 93.6 88.3 93.9 89.1 81.3
LU Luxembourg 98.4 99.1 95.0 91.3 88.7
LV Latvia 72.6 82.3 80.1 95.3 90.0
MT Malta NA 98.7 89.4 59.6 NA
NL Netherlands 71.1 73.5 57.2 45.0 60.0
PL Poland 94.5 93.6 86.6 90.2 64.4
PT Portugal 95.7 95.9 90.9 74.8 44.7
RO Romania NA 96.6 85.9 67.3 54.2
SE Sweden NA 89.2 90.6 78.7 87.2
SI Slovenia 89.5 93.5 91.5 78.9 52.0
SK Slovakia 83.2 78.9 66.7 23.4 34.6
U2 Euro area (changing composition) 79.2 81.5 69.9 60.5 66.7

France, Spain, Portugal

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHHNFC",
         REF_AREA %in% c("FR", "ES", "PT")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Share of variable rate, households and firms (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

Italy, Sweden, Poland

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHHNFC",
         REF_AREA %in% c("PL", "IT", "SE")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Share of variable rate, households and firms (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))

Netherlands, Germany, Belgium

Code
RAI |>
  filter(DD_ECON_CONCEPT == "SVLHHNFC",
         REF_AREA %in% c("NL", "DE", "BE")) |>
  month_to_date() %>%
  select_if(~n_distinct(.) > 1) |>
  add_flag_color("Ref_area") |>
  mutate(OBS_VALUE = OBS_VALUE/100) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Share of variable rate, households and firms (%)") +
  geom_line(aes(x = date, y = OBS_VALUE, color = color)) + 
  add_flags(3) + scale_color_identity() +
  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, 100, 5),
                     labels = percent_format(accuracy = 1))