joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
794 stars 219 forks source link

NYSE stock prices returns 0 #376

Closed camilaajler closed 1 year ago

camilaajler commented 1 year ago

Description

Stock prices of NYSE returns cero (bid and ask)

Expected behavior

The correct bid and ask price

Minimal, reproducible example

quantmod::getQuote(
            Symbols = "YPF;VIST;PAM;KO",
            src     = "yahoo",
            what    = yahooQF(c("Bid", "Ask", "Exchange Full Name"))
          ) 
# output:
              Trade Time Bid Ask Exchange Full Name
YPF  2023-03-30 11:35:23   0   0               NYSE
VIST 2023-03-30 11:35:24   0   0               NYSE
PAM  2023-03-30 11:29:37   0   0               NYSE
KO   2023-03-30 11:35:49   0   0               NYSE

Session Info

R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Argentina.utf8  LC_CTYPE=Spanish_Argentina.utf8   
[3] LC_MONETARY=Spanish_Argentina.utf8 LC_NUMERIC=C                      
[5] LC_TIME=Spanish_Argentina.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] acyRsa_0.0.0.9012    eikonapir_0.1.0      websocket_1.4.1     
 [4] slackr_3.3.1         lobstr_1.1.2         DBI_1.1.3           
 [7] dbplyr_2.3.1         log4r_0.4.3          rRofex_2.0.7        
[10] bizdays_1.0.13       googlesheets4_1.0.1  googledrive_2.0.0   
[13] quantmod_0.4.20      TTR_0.24.3           xts_0.13.0          
[16] zoo_1.8-11           glue_1.6.2           shinyjs_2.1.0       
[19] shinyalert_3.0.0     truncnorm_1.0-8      kableExtra_1.3.4    
[22] rvest_1.0.3          httr_1.4.5           jsonlite_1.8.4      
[25] DT_0.27              forcats_1.0.0        stringr_1.5.0       
[28] dplyr_1.1.0          purrr_1.0.1          readr_2.1.4         
[31] tidyr_1.3.0          tibble_3.1.8         ggplot2_3.4.1       
[34] tidyverse_2.0.0      lubridate_1.9.2      shinydashboard_0.7.2
[37] shiny_1.7.4          pacman_0.5.1         here_1.0.1          

loaded via a namespace (and not attached):
 [1] fs_1.6.1          bit64_4.0.5       webshot_0.5.4    
 [4] rprojroot_2.0.3   tools_4.2.2       utf8_1.2.3       
 [7] R6_2.5.1          colorspace_2.1-0  withr_2.5.0      
[10] tidyselect_1.2.0  bit_4.0.5         curl_5.0.0       
[13] compiler_4.2.2    cli_3.6.0         xml2_1.3.3       
[16] scales_1.2.1      systemfonts_1.0.4 digest_0.6.31    
[19] rmarkdown_2.20    svglite_2.1.1     pkgconfig_2.0.3  
[22] htmltools_0.5.4   fastmap_1.1.1     htmlwidgets_1.6.1
[25] rlang_1.0.6       rstudioapi_0.14   generics_0.1.3   
[28] vroom_1.6.1       magrittr_2.0.3    Rcpp_1.0.10      
[31] munsell_0.5.0     fansi_1.0.4       lifecycle_1.0.3  
[34] stringi_1.7.12    grid_4.2.2        parallel_4.2.2   
[37] promises_1.2.0.1  crayon_1.5.2      lattice_0.20-45  
[40] hms_1.1.2         knitr_1.42        pillar_1.8.1     
[43] evaluate_0.20     vctrs_0.5.2       tzdb_0.3.0       
[46] httpuv_1.6.9      cellranger_1.1.0  gtable_0.3.1     
[49] cachem_1.0.7      xfun_0.37         mime_0.12        
[52] xtable_1.8-4      later_1.3.0       viridisLite_0.4.1
[55] gargle_1.3.0      memoise_2.0.1     timechange_0.2.0 
[58] ellipsis_0.3.2 
joshuaulrich commented 1 year ago

This is very likely because Yahoo Finance does not provide bid/offer data for NYSE. So I'm going to close this because there's nothing I can change in quantmod to fix it. Please follow up if you think there is something we can do to get the data from Yahoo Finance.