Financial Data - Investing.com - investing
Data - Investing
Last compile: 04 sept. 2026, 01:14
Datasets
Exemples
Courbe des taux souverains
Code
sy <- read_parquet("sovereign_yields.parquet")
maturity_years <- function(m) {
n <- readr::parse_number(m)
dplyr::case_when(m == "Overnight" ~ 1 / 365, grepl("W$", m) ~ n / 52,
grepl("M$", m) ~ n / 12, grepl("Y$", m) ~ n, TRUE ~ NA_real_)
}
pays <- c("France", "Germany", "Italy", "Spain", "U.S.", "U.K.")
sy |>
filter(scraped_date == max(scraped_date), country %in% pays) |>
mutate(t = maturity_years(maturity)) |>
filter(!is.na(t), t <= 30) |>
ggplot(aes(x = t, y = yield, color = country)) +
geom_line() + geom_point(size = 1) +
theme_minimal() + xlab("Maturité (années)") + ylab("Taux (%)") +
scale_x_log10(breaks = c(0.08, 0.25, 0.5, 1, 2, 5, 10, 20, 30)) +
scale_color_flag(pays) +
theme(legend.position =c(0.3, 0.9),
legend.title = element_blank(),
legend.direction = "horizontal")
Historique — France, Allemagne, Italie 10 ans
Code
obligations <- c("France 10Y", "Germany 10Y", "Italy 10Y")
read_parquet("bonds.parquet") |>
filter(symbol %in% obligations, Date >= as.Date("2000-01-01")) |>
ggplot() + geom_line(aes(x = Date, y = Close, color = symbol)) +
theme_minimal() + xlab("") + ylab("Taux 10 ans (%)") +
scale_x_date(breaks = seq(1960, 2100, 4) |> paste0("-01-01") |> as.Date(),
labels = date_format("%Y")) +
scale_color_flag(obligations) +
theme(legend.position = c(0.2, 0.85), legend.title = element_blank())