From 58e8db3c7fa209cc01f68ca79bd2f7d5422aea90 Mon Sep 17 00:00:00 2001 From: Matt Dancho Date: Sun, 18 Aug 2024 21:09:04 -0400 Subject: [PATCH] fixes #246 - tq_index("SP500") --- R/tq_stock_list.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/tq_stock_list.R b/R/tq_stock_list.R index 302ccc1c..f1f3a3ca 100644 --- a/R/tq_stock_list.R +++ b/R/tq_stock_list.R @@ -233,9 +233,10 @@ index_download <- function(x, index_name) { # Contruct download link # OLD (< 2019-12-15): https://us.spdrs.com/site-content/xls/SPY_All_Holdings.xls - # NEW (> 2019-12-15) https://www.ssga.com/us/en/institutional/etfs/library-content/products/fund-data/etfs/us/holdings-daily-us-en-spy.xlsx + # NEW (> 2019-12-15): https://www.ssga.com/us/en/institutional/etfs/library-content/products/fund-data/etfs/us/holdings-daily-us-en-spy.xlsx + # NEW (> 2024-08-16): https://www.ssga.com/us/en/institutional/library-content/products/fund-data/etfs/us/holdings-daily-us-en-spy.xlsx # spdr_link <- paste0("https://us.spdrs.com/site-content/xls/", x, "_All_Holdings.xls") - spdr_link <- paste0("https://www.ssga.com/us/en/institutional/etfs/library-content/products/fund-data/etfs/us/holdings-daily-us-en-", tolower(x), ".xlsx") + spdr_link <- paste0("https://www.ssga.com/us/en/institutional/library-content/products/fund-data/etfs/us/holdings-daily-us-en-", tolower(x), ".xlsx") # Results container res <- list(df = NULL, err = NULL)