Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tq_index("SP500") is failing #246

Closed
mdancho84 opened this issue Aug 19, 2024 · 1 comment
Closed

tq_index("SP500") is failing #246

mdancho84 opened this issue Aug 19, 2024 · 1 comment

Comments

@mdancho84
Copy link
Collaborator

Example:

> tq_index("SP500")
Getting holdings for SP500
# A tibble: 0 × 0
Warning message:
In tq_index("SP500") : Error at SP500 during download.
Error in utils::unzip(zip_path, list = TRUE): zip file '/private/var/folders/j1/fwc3c69n4d53mzmtjvn4msz00000gn/T/RtmpxsHoeQ/file39564db0d75.xlsx' cannot be opened
@mdancho84
Copy link
Collaborator Author

Should work on latest tidyquant 1.0.7.9001.

Installation:

remotes::install_github("business-science/tidyquant")

Working Example:

> tq_index("SP500")
Getting holdings for SP500
# A tibble: 505 × 8                                                                                                                             
   symbol company                     identifier sedol   weight sector shares_held local_currency
   <chr>  <chr>                       <chr>      <chr>    <dbl> <chr>        <dbl> <chr>         
 1 AAPL   APPLE INC                   037833100  2046251 0.0695 -        173160171 USD           
 2 MSFT   MICROSOFT CORP              594918104  2588173 0.0671 -         89288120 USD           
 3 NVDA   NVIDIA CORP                 67066G104  2379504 0.0648 -        295504264 USD           
 4 AMZN   AMAZON.COM INC              023135106  2000019 0.0349 -        109978071 USD           
 5 META   META PLATFORMS INC CLASS A  30303M102  B7TL820 0.0253 -         26339566 USD           
 6 GOOGL  ALPHABET INC CL A           02079K305  BYVY8G0 0.0203 -         70600527 USD           
 7 BRK-B  BERKSHIRE HATHAWAY INC CL B 084670702  2073390 0.0171 -         21759342 USD           
 8 GOOG   ALPHABET INC CL C           02079K107  BYY88Y7 0.0171 -         58734815 USD           
 9 LLY    ELI LILLY + CO              532457108  2516152 0.0159 -          9585065 USD           
10 AVGO   BROADCOM INC                11135F101  BDZ78H9 0.0155 -         52354257 USD           
# ℹ 495 more rows
# ℹ Use `print(n = ...)` to see more rows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant