Movatterモバイル変換


[0]ホーム

URL:


Dirk Eddelbuettel

RcppQuantuccia:Rcpp bindings forQuantuccia

Build StatusLicenseCRANDependenciesDownloadsLast Commit

So what is Quantuccia?

Quantuccia isthe“little sister” ofQuantLib: A header-onlysubset of which aims to provide the essential parts ofQuantLib while beingeasier to deploy requiring onlyBoostheaders besides itself.

Being header-only makes providingQuantuccia forR a breeze as we can rely on theRcpp andBH packages.Nothing else is required, and as these packages are available on allrelevant platforms, deploying RcppQuantuccia is straightforward.

Example

Here we examine holiday lists for given calendars, specified bycountry 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 calendarand the NYSE calendar which we selected explicitly.

Status

Still fairly new. Functional bute.g. several of the otherQuantLib calendars still need to be ported.

Installation

The package can be installed fromCRAN via

install.packages("RcppQuantuccia")

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

remotes::install_github("eddelbuettel/rcppquantuccia")

or maybe just checkout the repository locally.

Authors

Dirk Eddelbuettel

License

GPL (>= 2)

Initially created: Thu Apr 19 20:20:12 CDT 2017
Last modified: Sun May 26 10:18:34 CDT 2024


[8]
ページ先頭

©2009-2025 Movatter.jp