(Acest articol a fost publicat pentru prima dată pe DateAgeeekși a contribuit cu drag la R-Bloggers). (Puteți raporta problema despre conținutul de pe această pagină aici)
Doriți să vă împărtășiți conținutul pe R-Bloggers? Faceți clic aici dacă aveți un blog sau aici dacă nu.
Actualizarea PECTRA pentru Ethereum ar putea cataliza creșterea preconizată, în ciuda apetitului cu risc redus cauzat de războiul tarifar dintre SUA și China.
Pe baza analizei tendinței anomaliei, acest lucru sugerează potențialul unei creșteri de 40% a termenului apropiat.
library(tidyverse)
library(tidyquant)
library(timetk)
#Ethereum (ETH-USD)
df_eth <-
tq_get("ETH-USD") %>%
select(date, close)
#Anomaly Plot
df_eth %>%
filter(date >= last(date) - months(12)) %>%
anomalize(date, close) %>%
plot_anomalies(date,
.line_size = 1,
.line_type = 1,
.interactive = FALSE,
.title = "Trend-Anomaly Chart of Ethereum ETH") +
ggrepel::geom_text_repel(
data = . %>% slice_tail(n = 1),
aes(label = paste0("$",format(round(recomposed_l2, 0), big.mark = ",")),
x= date,
y = recomposed_l2),
hjust = 1,
vjust = .5,
nudge_x = 0.5,
fontface = "bold",
family = "Roboto Slab",
size = 6,
color = "dimgray",
segment.color = NA
) +
ggrepel::geom_text_repel(
data = . %>% slice_tail(n = 1),
aes(label = paste0("$",format(round(observed , 0), big.mark = ",")),
x= date,
y = observed),
hjust = 1,
vjust = .5,
nudge_x = 0.5,
fontface = "bold",
family = "Roboto Slab",
size = 6,
color = "black",
segment.color = NA
) +
geom_line(size = 0.2) +
scale_y_continuous(labels = scales::label_currency()) +
scale_x_date(expand = expansion(mult = c(.1, .25)),
labels = scales::label_date("%b %Y")) +
theme_minimal(base_family = "Roboto Slab", base_size = 18) +
theme(legend.position = "none",
panel.grid = element_blank(),
axis.text = element_text(face = "bold"),
#axis.text.x = element_text(angle = 60, hjust = 1, vjust = 1),
plot.background = element_rect(fill = "azure", color = "azure"),
panel.grid.major.x = element_line(linetype = "dashed", color = "gray"),
panel.grid.major.y = element_line(linetype = "dashed", color = "gray"),
plot.title = ggtext::element_markdown(face = "bold", hjust = 0.5))