Energy
Data - yahoo
Info
LAST_COMPILE
LAST_COMPILE |
---|
2025-10-11 |
Last
date | Nobs |
---|---|
2025-10-10 | 2 |
symbol
symbol | Symbol | Nobs |
---|---|---|
CL=F | Crude Oil Futures | 6311 |
TTF | Old Dutch TTF | 2431 |
TTF=F | Dutch TTF Natural Gas Calendar | 2005 |
Natural Gas prices
Linear
All
Code
%>%
energy filter(symbol %in% c("TTF=F")) %>%
left_join(symbol, by = "symbol") %>%
ggplot() + geom_line(aes(x = date, y = close, color = Symbol)) + theme_minimal() +
theme(legend.title = element_blank(),
legend.position = c(0.5, 0.9)) +
scale_y_continuous(breaks = seq(0, 1000, 20),
labels = dollar_format(pre = "", su = "€")) +
scale_x_date(breaks = as.Date(paste0(seq(1945, 2025, 1), "-01-01")),
labels = date_format("%Y")) +
xlab("") + ylab("Price per Megawatt-Hour")
2021-
Code
%>%
energy filter(symbol %in% c("TTF=F"),
>= as.Date("2021-01-01")) %>%
date left_join(symbol, by = "symbol") %>%
ggplot() + geom_line(aes(x = date, y = close, color = Symbol)) + theme_minimal() +
theme(legend.title = element_blank(),
legend.position = c(0.5, 0.9)) +
scale_y_continuous(breaks = seq(0, 1000, 20),
labels = dollar_format(pre = "", su = "€")) +
scale_x_date(breaks = as.Date(paste0(seq(1945, 2025, 1), "-01-01")),
labels = date_format("%Y")) +
xlab("") + ylab("Price per Megawatt-Hour")
Log
All
Code
%>%
energy filter(symbol %in% c("TTF=F")) %>%
left_join(symbol, by = "symbol") %>%
ggplot() + geom_line(aes(x = date, y = close, color = Symbol)) + theme_minimal() +
theme(legend.title = element_blank(),
legend.position = c(0.5, 0.9)) +
scale_y_log10(breaks = c(1, 2, 3, 5, 8, 10, 20, 50, 100, 200, 500),
labels = dollar_format(pre = "", su = "€", acc = 1)) +
scale_x_date(breaks = as.Date(paste0(seq(1945, 2025, 1), "-01-01")),
labels = date_format("%Y")) +
xlab("") + ylab("Price per Megawatt-Hour")
2021-
Code
%>%
energy filter(symbol %in% c("TTF=F"),
>= as.Date("2021-01-01")) %>%
date left_join(symbol, by = "symbol") %>%
ggplot() + geom_line(aes(x = date, y = close, color = Symbol)) + theme_minimal() +
theme(legend.title = element_blank(),
legend.position = c(0.5, 0.9)) +
scale_y_log10(breaks = c(1, 2, 3, 5, 8, 10, 20, 50, 100, 200, 500),
labels = dollar_format(pre = "", su = "€", acc = 1)) +
scale_x_date(breaks = as.Date(paste0(seq(1945, 2025, 1), "-01-01")),
labels = date_format("%Y")) +
xlab("") + ylab("Price per Megawatt-Hour")