Skip to content
New issue

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

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

Already on GitHub? # to your account

getSymbols cannot be quietened #399

Closed
eddelbuettel opened this issue Aug 10, 2023 · 2 comments
Closed

getSymbols cannot be quietened #399

eddelbuettel opened this issue Aug 10, 2023 · 2 comments
Labels

Comments

@eddelbuettel
Copy link

eddelbuettel commented Aug 10, 2023

Description

getSymbols in the new (and awesome!) 'intraday mode' is noisy about NAs.

Expected behavior

No warning as we said warnings=FALSE

Minimal, reproducible example

> suppressMessages(QQQ <- getSymbols("QQQ", from=Sys.Date()-7, periodicity="1 minutes", warnings=FALSE, verbose=FALSE))
Warning message:
QQQ contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them. 
> 

Session Info

> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 23.04

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/Chicago
tzcode source: system (glibc)

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

other attached packages:
[1] quantmod_0.4.24.1 TTR_0.24.3        xts_0.13.1        zoo_1.8-12       

loaded via a namespace (and not attached):
 [1] desc_1.4.2        R6_2.5.1          lattice_0.21-8    remotes_2.4.2.1   parallel_4.3.1    ps_1.7.5          cli_3.6.1         fortunes_1.5-4    processx_3.8.2    callr_3.7.3      
[11] grid_4.3.1        compiler_4.3.1    prettyunits_1.1.1 rprojroot_2.0.3   tools_4.3.1       pkgbuild_1.4.2    curl_5.0.1        jsonlite_1.8.7    crayon_1.5.2      colorout_1.2-2   
> 
@joshuaulrich joshuaulrich added this to the Release 0.4.25 milestone Aug 10, 2023
@joshuaulrich
Copy link
Owner

Thanks for the report! I had actually started working on this last week. Thanks for the nudge to finish it.

@eddelbuettel
Copy link
Author

Works like a charm, thanks for fixing it.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 4, 2025
### Changes in 0.4.25 (2023-08-21)

1. Fix `getQuote.yahoo()` for API changes. Thanks to Ethan B. Smith for the
    report and patch! Also add error message for users in GDPR countries, since
    we cannot automatically consent to GDPR and the request fails without
    consent.
    [#392](joshuaulrich/quantmod#392)
    [#393](joshuaulrich/quantmod#393)
    [#395](joshuaulrich/quantmod#395)

1. Fix `getQuote.yahoo()` when the user only requested metrics that do not have
    have a value for 'regularMarketTime'. Set the value to NA in these cases
    so the output remains the same regardless of whether the endpoint returns
    a 'regularMarketTime' or not. Thanks to @mehdiMBH for the report!
    [#255](joshuaulrich/quantmod#255)

1. Add fields to `getQuote.yahoo()` that are returned when no fields are
    explicitly requested. Thanks to @Courvoisier13 for the report!
    [#335](joshuaulrich/quantmod#335)

1. Add intraday endpoint to `getSymbols.yahoo()`. Thanks to @kapsner for the
    report and patch! Also allow suppressing the warning if more than 7 days
    of data are requested (@eddelbuettel).
    [#351](joshuaulrich/quantmod#351)
    [#381](joshuaulrich/quantmod#381)
    [#399](joshuaulrich/quantmod#399)

1. Add warning if `getSymbols()` is called with tickers that are reserved words
    because accessing them requires back-quotes (e.g. ``NA``).
    [#401](joshuaulrich/quantmod#401)

1. Fix `allReturns()` when 'subset' is specified. Thanks to @Panagis1980 for
    the report!
    [#402](joshuaulrich/quantmod#402)

### Changes in 0.4.24 (2023-07-17)

1. Fix `getSymbols.oanda()` URL. Thanks to @macray76 for the report.
    [#387](joshuaulrich/quantmod#387)

### Changes in 0.4.23 (2023-06-14)

1. Fix `getQuote.yahoo()` error. Thanks to Ethan B. Smith for the report and
    patch!
    [#382](joshuaulrich/quantmod#382)
    [#383](joshuaulrich/quantmod#383)

1. Add `name` argument to `add_TA()`. Thanks to @SamoPP for the suggestion!
    [#377](joshuaulrich/quantmod#377)
    [#205](joshuaulrich/quantmod#205)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants