[R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

David Reiner David.Reiner at xrtrading.com
Wed Aug 8 23:01:29 CEST 2012


Thanks, Dirk. You're the best!

-- David


-----Original Message-----
From: Dirk Eddelbuettel [mailto:edd at debian.org]
Sent: Wednesday, August 08, 2012 1:02 PM
To: David Reiner
Cc: r-sig-finance at r-project.org; dirk at eddelbuettel.com
Subject: Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?


Ok, bug found.  In the R file definining the convenience functions

getEndOfBizWeek <- function(date = Sys.Date()) {
    stopifnot(inherits(date, "Date"))
    bdt$getEndOfBizWeek(date)
}

getEndOfMonth <- function(date = Sys.Date()) {
    stopifnot(inherits(date, "Date"))
    bdt$getEndOfMonth(date)
}

both of these miss the crucial

    bdt$fromDate(date)

to actually set the date you supply.  You could write yourself a local
variant til the updated package comes through.

Thanks for spotting this.

Dirk

--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


This e-mail and any materials attached hereto, including, without limitation, all content hereof and thereof (collectively, "XR Content") are confidential and proprietary to XR Trading, LLC ("XR") and/or its affiliates, and are protected by intellectual property laws.  Without the prior written consent of XR, the XR Content may not (i) be disclosed to any third party or (ii) be reproduced or otherwise used by anyone other than current employees of XR or its affiliates, on behalf of XR or its affiliates.

THE XR CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY KIND.  TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, XR HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE XR CONTENT, AND NEITHER XR NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR INABILITY TO USE, ANY XR CONTENT, EVEN IF XR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.



More information about the R-SIG-Finance mailing list