Skip to content

24-7 Today

Menu
  • Home
  • Ads Guide
  • Blogging
  • Sec Tips
  • SEO Strategies
Menu

Correlation Analysis of Silver, Bitcoin, SOXX, and Blockchain Index with {corrr} package

Posted on June 17, 2025 by 24-7

[This article was first published on DataGeeek, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)


Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.

Silver, Nasdaq Blockchain Economy Index, Bitcoin, and iShares Semiconductor ETF are always thought of as correlated with each other by investors.

We will test this perception with the corrr package.

#iShares Semiconductor ETF (SOXX)
df_soxx <- 
  tq_get(x = "SOXX") %>% 
  select(date, soxx = close)

#Nasdaq Blockchain Economy Index
df_nasdaq_blockchain <- 
  openxlsx::read.xlsx("https://github.com/mesdi/investingcom/raw/refs/heads/main/nasdaq_blockchain.xlsx",
                      sheet = "History",
                      detectDates = TRUE) %>% 
  as_tibble() %>% 
  janitor::clean_names() %>%
  select(date = trade_date, blcn = index_value)

#Bitcoin
df_btc <- 
  tq_get("BTC-USD") %>% 
  select(date, btc = close)


#Merging the datasets
df_merged <- 
  df_silver %>% 
  left_join(df_soxx) %>% 
  left_join(df_nasdaq_blockchain) %>% 
  left_join(df_btc) %>% 
  drop_na() %>% 
  filter(date >= last(date) - months(36))

#Correlation
d <- correlate(df_merged, quiet = TRUE)

d %>% 
  focus(silver:btc, mirror = TRUE) %>%  
  fashion()

#    term silver soxx blcn  btc
#1 silver         .78  .89  .89
#2   soxx    .78       .85  .80
#3   blcn    .89  .85       .97
#4    btc    .89  .80  .97     

#Network plot
df_merged %>% 
  correlate() %>% 
  network_plot(min_cor = .7,
               legend = "full")

The common perception appears to be correct based on the correlation analysis, specifically between the Nasdaq Blockchain Economy index and Bitcoin.

Related

Related

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

©2025 24-7 Today | Design: WordPress | Design: Facts