Closed joshuaulrich closed 6 years ago
R> expiry <- Rblpapi::bdp("TYV7P 124.5 Comdty", "OPT_EXPIRE_DT")[1,1]
R> expiry
[1] "2017-09-22"
R> class(expiry)
[1] "Date"
R> library(RQuantLib)
R> RQuantLib::businessDaysBetween("UnitedStates", expiry, Sys.Date())
[1] 64
R>
R> packageVersion("Rblpapi")
[1] ‘0.3.6.2’
R> packageVersion("RQuantLib")
[1] ‘0.4.4’
R>
Can we close this?
Closing, since this is not reproducible using RQuantLib 0.4.4 (QuantLib-1.11) on Windows. Sorry for the noise.
No apologies needed. Thank you for actually getting 0.4.4 onto Windows.
businessDaysBetween()
expectsfrom
andto
to be Dates represented usingREALSXP
. There is an error if the Date happens to be stored as anINTSXP
. The Details section of?Date
says:It's not clear if "integer" means "
INTSXP
" or "whole number" in that context, but it's possible to have aDate
that is anINTSXP
(this case is also handled in xts).Reproducible example below, with apologies that it also requires Rblpapi...