Code
indices_FRA |>
left_join(indices_FRA_var, by = "symbol") |>
group_by(symbol, full_name) |>
summarise(Nobs = n()) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}Data - Investing
indices_FRA |>
left_join(indices_FRA_var, by = "symbol") |>
group_by(symbol, full_name) |>
summarise(Nobs = n()) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}indices_FRA |>
filter(symbol %in% c("FCHI", "PX1GR")) |>
left_join(indices_FRA_var, by = "symbol") |>
group_by(symbol) |>
mutate(Close = Close / Close[1]) |>
ggplot() + geom_line(aes(x = Date, y = Close, color = name)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 20, 1)) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank())
indices_FRA |>
filter(symbol %in% c("FCHI", "PX1GR")) |>
left_join(indices_FRA_var, by = "symbol") |>
group_by(symbol) |>
filter(Date >= as.Date("2000-01-01")) |>
mutate(Close = 6944.77*Close / Close[Date == as.Date("2000-09-04")],
name = gsub("Gross TR", "Total Return", name)) |>
arrange(desc(Date)) |>
ggplot() + geom_line(aes(x = Date, y = Close, color = name)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(1000, 15000, 1000)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank()) +
geom_hline(yintercept = 6944.77, linetype = "dashed")
indices_FRA |>
filter(symbol %in% c("FCHI", "PX1GR")) |>
left_join(indices_FRA_var, by = "symbol") |>
group_by(symbol) |>
filter(Date >= as.Date("1999-12-30")) |>
transmute(date = Date,
variable = symbol,
value = 100*Close / Close[Date == as.Date("1999-12-30")],
Variable = gsub("Gross TR", "incluant les dividendes", name)) |>
ggplot() + geom_line(aes(x = date, y = value, color = Variable)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(10, 15000, 10)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank())
indices_FRA |>
filter(symbol %in% c("FCHI", "PX1GR")) |>
left_join(indices_FRA_var, by = "symbol") |>
group_by(symbol) |>
filter(Date >= as.Date("1994-12-30")) |>
mutate(Close = 100*Close / Close[Date == as.Date("1994-12-30")],
name = gsub("Gross TR", "Total Return", name)) |>
arrange(desc(Date)) |>
ggplot() + geom_line(aes(x = Date, y = Close, color = name)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(50, 15000, 50)) +
scale_color_manual(values = viridis(3)[1:2]) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank())
RPP |>
right_join(tibble(variable = c("RPP.Q.FR.N.ED.00.1.00",
"RPP.Q.FR.N.EF.CC.1.00"),
Variable = c("Immobilier, France sans les loyers",
"Immobilier, Paris sans les loyers")), by = "variable") |>
filter(date >= as.Date("1999-12-31")) |>
group_by(Variable) |>
mutate(value = 100*value/value[date == as.Date("1999-12-31")]) |>
bind_rows(indices_FRA |>
filter(symbol %in% c("FCHI", "PX1GR")) |>
left_join(indices_FRA_var, by = "symbol") |>
group_by(symbol) |>
filter(Date >= as.Date("1999-12-30")) |>
transmute(date = Date,
variable = symbol,
value = 100*Close / Close[Date == as.Date("1999-12-30")],
Variable = gsub("Gross TR", "incluant les dividendes", name))) |>
arrange(desc(date))# # A tibble: 11,386 × 5
# # Groups: Variable [4]
# variable date value Variable symbol
# <chr> <date> <dbl> <chr> <chr>
# 1 RPP.Q.FR.N.ED.00.1.00 2025-12-31 275. Immobilier, France sans les lo… <NA>
# 2 RPP.Q.FR.N.EF.CC.1.00 2025-12-31 365. Immobilier, Paris sans les loy… <NA>
# 3 RPP.Q.FR.N.ED.00.1.00 2025-09-30 277. Immobilier, France sans les lo… <NA>
# 4 RPP.Q.FR.N.EF.CC.1.00 2025-09-30 369. Immobilier, Paris sans les loy… <NA>
# 5 RPP.Q.FR.N.ED.00.1.00 2025-06-30 272. Immobilier, France sans les lo… <NA>
# 6 RPP.Q.FR.N.EF.CC.1.00 2025-06-30 361. Immobilier, Paris sans les loy… <NA>
# 7 RPP.Q.FR.N.ED.00.1.00 2025-03-31 272. Immobilier, France sans les lo… <NA>
# 8 RPP.Q.FR.N.EF.CC.1.00 2025-03-31 361. Immobilier, Paris sans les loy… <NA>
# 9 RPP.Q.FR.N.ED.00.1.00 2024-12-31 272. Immobilier, France sans les lo… <NA>
# 10 RPP.Q.FR.N.EF.CC.1.00 2024-12-31 360. Immobilier, Paris sans les loy… <NA>
# # ℹ 11,376 more rows
ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
scale_color_manual(values = viridis(5)[1:4]) +
theme_minimal() + xlab("") + ylab("Valeur de l'actif (2000 = 100)") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
theme(legend.position = c(0.18, 0.87),
legend.title = element_blank()) +
scale_y_log10(breaks = c(seq(0, 7000, 50), 80, 60, 30, 120))# NULL
indices_FRA |>
filter(symbol %in% c("FRCS", "FRIN", "FRHC", "FRFIN")) |>
left_join(indices_FRA_var, by = "symbol") |>
ggplot() + geom_line(aes(x = Date, y = Close, color = full_name)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 3000, 100)) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.3, 0.85),
legend.title = element_blank())
indices_FRA |>
filter(symbol %in% c("FRCG", "FROG", "FRBM", "FRTEC")) |>
left_join(indices_FRA_var, by = "symbol") |>
ggplot() + geom_line(aes(x = Date, y = Close, color = full_name)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 6000, 200)) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.29, 0.85),
legend.title = element_blank())
indices_FRA |>
filter(symbol %in% c("FCHI", "CACLG", "CACMD", "CACS")) |>
left_join(indices_FRA_var, by = "symbol") |>
ggplot() + geom_line(aes(x = Date, y = Close, color = full_name)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = seq(1960, 2100, 2) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_y_log10(breaks = seq(0, 20000, 1000)) +
scale_color_manual(values = viridis(5)[1:4]) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank())