R Bindings to the 'Quantuccia' Header-Only Essentials of 'QuantLib'

'QuantLib' bindings are provided for R using 'Rcpp' and the header-only 'Quantuccia' variant (put together by Peter Caspers) offering an essential subset of 'QuantLib'. See the included file 'AUTHORS' for a full list of contributors to both 'QuantLib' and 'Quantuccia'.


About

Quantuccia is the "little sister" of QuantLib: A header-only subset of which aims to provide the essential parts of QuantLib while being easier to deploy requiring only Boost headers besides itself.

Being header-only makes providing Quantuccia for R a breeze as we can rely on the Rcpp and BH packages. Nothing else is required, and as these packages are available on all relevant platforms, deploying RcppQuantuccia is straightforward.

Example

Here we examine holiday lists for given calendars, specified by country and possibly exchange:

R> library(RcppQuantuccia)
R> fromD <- as.Date("2017-01-01")
R> toD <- as.Date("2017-12-31")
R> getHolidays(fromD, toD)        # default calender ie TARGET
[1] "2017-04-14" "2017-04-17" "2017-05-01" "2017-12-25" "2017-12-26"
R> setCalendar("UnitedStates")
R> getHolidays(fromD, toD)        # US aka US::Settlement
[1] "2017-01-02" "2017-01-16" "2017-02-20" "2017-05-29" "2017-07-04" "2017-09-04"
[7] "2017-10-09" "2017-11-10" "2017-11-23" "2017-12-25"
R> setCalendar("UnitedStates::NYSE")
R> getHolidays(fromD, toD)        # US New York Stock Exchange
[1] "2017-01-02" "2017-01-16" "2017-02-20" "2017-04-14" "2017-05-29" "2017-07-04"
[7] "2017-09-04" "2017-11-23" "2017-12-25"
R>

This shows the difference between the default US settlement calendar and the NYSE calendar which we selected explicitly.

Status

Still fairly new. Functional but e.g. several of the other QuantLib calendars still need to be ported.

Installation

The package can be installed from CRAN via

install.packages("RcppQuantuccia")

or if you prefer non-release development version these can be installed from GitHub via e.g.

remotes::install_github("eddelbuettel/rcppquantuccia")

or maybe just checkout the repository locally.

Authors

Dirk Eddelbuettel

License

GPL (>= 2)

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("RcppQuantuccia")

0.0.2 by Dirk Eddelbuettel, 4 months ago


Browse source code at https://github.com/cran/RcppQuantuccia


Authors: Dirk Eddelbuettel; the authors and contributors of QuantLib


Documentation:   PDF Manual  


Task views: Empirical Finance


GPL (>= 2) license


Imports Rcpp

Linking to Rcpp, BH


See at CRAN