Energy
Data - yahoo
Info
LAST_COMPILE
| LAST_COMPILE |
|---|
| 2025-12-24 |
Last
| date | Nobs |
|---|---|
| 2025-12-24 | 1 |
symbol
| symbol | Symbol | Nobs |
|---|---|---|
| CL=F | Crude Oil Futures | 6363 |
| TTF | Old Dutch TTF | 2431 |
| TTF=F | Dutch TTF Natural Gas Calendar | 2056 |
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"),
date >= as.Date("2021-01-01")) %>%
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"),
date >= as.Date("2021-01-01")) %>%
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")