R/dayCounter.R

Defines functions dayCount yearFraction setEvaluationDate

Documented in dayCount setEvaluationDate yearFraction

## RQuantLib -- R interface to the QuantLib libraries
##
## Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Khanh Nguyen
##
## $Id: calendars.R 293 2010-08-07 15:56:13Z edd $
##
## This file is part of the RQuantLib library for GNU R.
## It is made available under the terms of the GNU General Public
## License, version 2, or at your option, any later version,
## incorporated herein by reference.
##
## This program is distributed in the hope that it will be
## useful, but WITHOUT ANY WARRANTY; without even the implied
## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE.  See the GNU General Public License for more
## details.
##
## You should have received a copy of the GNU General Public
## License along with this program; if not, write to the Free
## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
## MA 02111-1307, USA

dayCount <- function(startDates, endDates, dayCounters) {
    val <- .Call('dayCount', startDates, endDates, dayCounters, PACKAGE="RQuantLib")
    invisible(val)
}

yearFraction <- function(startDates, endDates, dayCounters) {
    val <- .Call('yearFraction', startDates, endDates, dayCounters, PACKAGE="RQuantLib")
    invisible(val)
}

setEvaluationDate <- function(evalDate) {
    val <- .Call("setEvaluationDate", evalDate, PACKAGE="RQuantLib")
    invisible(val)
}

Try the RQuantLib package in your browser

Any scripts or data that you put into this service are public.

RQuantLib documentation built on May 2, 2019, 4:48 p.m.