File: RcppExports.R

package info (click to toggle)
rquantlib 0.4.17-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,308 kB
  • sloc: cpp: 3,690; sh: 69; makefile: 6; ansic: 4
file content (254 lines) | stat: -rw-r--r-- 13,571 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

affineWithRebuiltCurveEngine <- function(rparam, legparams, dateVec, zeroVec, swaptionMat, swapLengths, swaptionVols) {
    .Call(`_RQuantLib_affineWithRebuiltCurveEngine`, rparam, legparams, dateVec, zeroVec, swaptionMat, swapLengths, swaptionVols)
}

asianOptionEngine <- function(averageType, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, first, length, fixings) {
    .Call(`_RQuantLib_asianOptionEngine`, averageType, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, first, length, fixings)
}

binaryOptionEngine <- function(binType, type, excType, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, cashPayoff) {
    .Call(`_RQuantLib_binaryOptionEngine`, binType, type, excType, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, cashPayoff)
}

binaryOptionImpliedVolatilityEngine <- function(type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, cashPayoff) {
    .Call(`_RQuantLib_binaryOptionImpliedVolatilityEngine`, type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, cashPayoff)
}

barrierOptionEngine <- function(barrType, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, barrier, rebate) {
    .Call(`_RQuantLib_barrierOptionEngine`, barrType, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, barrier, rebate)
}

bermudanFromYieldEngine <- function(rparam, yield, swaptionMat, swapLengths, swaptionVols) {
    .Call(`_RQuantLib_bermudanFromYieldEngine`, rparam, yield, swaptionMat, swapLengths, swaptionVols)
}

bermudanWithRebuiltCurveEngine <- function(rparam, dateVec, zeroVec, swaptionMat, swapLengths, swaptionVols) {
    .Call(`_RQuantLib_bermudanWithRebuiltCurveEngine`, rparam, dateVec, zeroVec, swaptionMat, swapLengths, swaptionVols)
}

zeroPriceByYieldEngine <- function(yield, faceAmount, dayCounter, frequency, businessDayConvention, compound, maturityDate, issueDate) {
    .Call(`_RQuantLib_zeroPriceByYieldEngine`, yield, faceAmount, dayCounter, frequency, businessDayConvention, compound, maturityDate, issueDate)
}

zeroYieldByPriceEngine <- function(price, faceAmount, dayCounter, frequency, businessDayConvention, compound, maturityDate, issueDate) {
    .Call(`_RQuantLib_zeroYieldByPriceEngine`, price, faceAmount, dayCounter, frequency, businessDayConvention, compound, maturityDate, issueDate)
}

fixedRateBondYieldByPriceEngine <- function(settlementDays, price, cal, faceAmount, businessDayConvention, compound, redemption, dayCounter, frequency, maturityDate, issueDate, effectiveDate, rates) {
    .Call(`_RQuantLib_fixedRateBondYieldByPriceEngine`, settlementDays, price, cal, faceAmount, businessDayConvention, compound, redemption, dayCounter, frequency, maturityDate, issueDate, effectiveDate, rates)
}

fixedRateBondPriceByYieldEngine <- function(settlementDays, yield, cal, faceAmount, businessDayConvention, compound, redemption, dayCounter, frequency, maturityDate, issueDate, effectiveDate, rates) {
    .Call(`_RQuantLib_fixedRateBondPriceByYieldEngine`, settlementDays, yield, cal, faceAmount, businessDayConvention, compound, redemption, dayCounter, frequency, maturityDate, issueDate, effectiveDate, rates)
}

FloatBond1 <- function(bond, gearings, caps, spreads, floors, indexparams, index, discountCurve, dateparams) {
    .Call(`_RQuantLib_FloatBond1`, bond, gearings, caps, spreads, floors, indexparams, index, discountCurve, dateparams)
}

FloatBond2 <- function(bond, gearings, caps, spreads, floors, indexparams, index_params, index_tsQuotes, index_times, discountCurve, dateparams) {
    .Call(`_RQuantLib_FloatBond2`, bond, gearings, caps, spreads, floors, indexparams, index_params, index_tsQuotes, index_times, discountCurve, dateparams)
}

FloatBond3 <- function(bond, gearings, caps, spreads, floors, indexparams, index, disc_params, disc_tsQuotes, disc_times, dateparams) {
    .Call(`_RQuantLib_FloatBond3`, bond, gearings, caps, spreads, floors, indexparams, index, disc_params, disc_tsQuotes, disc_times, dateparams)
}

FloatBond4 <- function(bond, gearings, caps, spreads, floors, indexparams, index_params, index_tsQuotes, index_times, disc_params, disc_tsQuotes, disc_times, dateparams) {
    .Call(`_RQuantLib_FloatBond4`, bond, gearings, caps, spreads, floors, indexparams, index_params, index_tsQuotes, index_times, disc_params, disc_tsQuotes, disc_times, dateparams)
}

floatingWithRebuiltCurveEngine <- function(bondparams, gearings, spreads, caps, floors, indexparams, iborDateVec, iborzeroVec, dateVec, zeroVec, dateparams) {
    .Call(`_RQuantLib_floatingWithRebuiltCurveEngine`, bondparams, gearings, spreads, caps, floors, indexparams, iborDateVec, iborzeroVec, dateVec, zeroVec, dateparams)
}

FixedRateWithYield <- function(bondparam, ratesVec, scheduleparam, calcparam, yield) {
    .Call(`_RQuantLib_FixedRateWithYield`, bondparam, ratesVec, scheduleparam, calcparam, yield)
}

FixedRateWithPrice <- function(bondparam, ratesVec, scheduleparam, calcparam, price) {
    .Call(`_RQuantLib_FixedRateWithPrice`, bondparam, ratesVec, scheduleparam, calcparam, price)
}

FixedRateWithRebuiltCurve <- function(bondparam, ratesVec, scheduleparam, calcparam, dateVec, zeroVec) {
    .Call(`_RQuantLib_FixedRateWithRebuiltCurve`, bondparam, ratesVec, scheduleparam, calcparam, dateVec, zeroVec)
}

ZeroBondWithRebuiltCurve <- function(bond, dateVec, zeroVec, dateparams) {
    .Call(`_RQuantLib_ZeroBondWithRebuiltCurve`, bond, dateVec, zeroVec, dateparams)
}

convertibleZeroBondEngine <- function(rparam, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, dividendScheduleFrame, callabilityScheduleFrame, datemisc) {
    .Call(`_RQuantLib_convertibleZeroBondEngine`, rparam, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, dividendScheduleFrame, callabilityScheduleFrame, datemisc)
}

convertibleFixedBondEngine <- function(rparam, rates, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, dividendScheduleFrame, callabilityScheduleFrame, datemisc) {
    .Call(`_RQuantLib_convertibleFixedBondEngine`, rparam, rates, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, dividendScheduleFrame, callabilityScheduleFrame, datemisc)
}

convertibleFloatingBondEngine <- function(rparam, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, iborIndexDateVec, iborIndexZeroVec, iborparams, spreads, dividendScheduleFrame, callabilityScheduleFrame, datemisc) {
    .Call(`_RQuantLib_convertibleFloatingBondEngine`, rparam, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, iborIndexDateVec, iborIndexZeroVec, iborparams, spreads, dividendScheduleFrame, callabilityScheduleFrame, datemisc)
}

callableBondEngine <- function(rparam, hwparam, coupon, callabilityScheduleFrame, datemisc) {
    .Call(`_RQuantLib_callableBondEngine`, rparam, hwparam, coupon, callabilityScheduleFrame, datemisc)
}

fittedBondCurveEngine <- function(curveparam, length, coupons, marketQuotes, datemisc) {
    .Call(`_RQuantLib_fittedBondCurveEngine`, curveparam, length, coupons, marketQuotes, datemisc)
}

setCalendarContext <- function(calendar, fixingDays, settleDate) {
    .Call(`_RQuantLib_setCalendarContext`, calendar, fixingDays, settleDate)
}

isBusinessDay <- function(calendar, dates) {
    .Call(`_RQuantLib_isBusinessDay`, calendar, dates)
}

isHoliday <- function(calendar, dates) {
    .Call(`_RQuantLib_isHoliday`, calendar, dates)
}

isWeekend <- function(calendar, dates) {
    .Call(`_RQuantLib_isWeekend`, calendar, dates)
}

isEndOfMonth <- function(calendar, dates) {
    .Call(`_RQuantLib_isEndOfMonth`, calendar, dates)
}

getEndOfMonth <- function(calendar, dates) {
    .Call(`_RQuantLib_getEndOfMonth`, calendar, dates)
}

adjust <- function(calendar, dates, bdc = 0L) {
    .Call(`_RQuantLib_adjust`, calendar, dates, bdc)
}

advance1 <- function(calendar, amount, unit, bdcVal, emr, dates) {
    .Call(`_RQuantLib_advance1`, calendar, amount, unit, bdcVal, emr, dates)
}

advance2 <- function(calendar, period, bdcVal, emr, dates) {
    .Call(`_RQuantLib_advance2`, calendar, period, bdcVal, emr, dates)
}

businessDaysBetween <- function(calendar, from, to, includeFirst = TRUE, includeLast = FALSE) {
    .Call(`_RQuantLib_businessDaysBetween`, calendar, from, to, includeFirst, includeLast)
}

getHolidayList <- function(calendar, from, to, includeWeekends = FALSE) {
    .Call(`_RQuantLib_getHolidayList`, calendar, from, to, includeWeekends)
}

getBusinessDayList <- function(calendar, from, to) {
    .Call(`_RQuantLib_getBusinessDayList`, calendar, from, to)
}

addHolidays <- function(calendar, dates) {
    invisible(.Call(`_RQuantLib_addHolidays`, calendar, dates))
}

removeHolidays <- function(calendar, dates) {
    invisible(.Call(`_RQuantLib_removeHolidays`, calendar, dates))
}

advanceDate <- function(issueDate, days) {
    .Call(`_RQuantLib_advanceDate`, issueDate, days)
}

dayCount <- function(startDates, endDates, dayCounters) {
    .Call(`_RQuantLib_dayCount`, startDates, endDates, dayCounters)
}

yearFraction <- function(startDates, endDates, dayCounters) {
    .Call(`_RQuantLib_yearFraction`, startDates, endDates, dayCounters)
}

setEvaluationDate <- function(evalDate) {
    .Call(`_RQuantLib_setEvaluationDate`, evalDate)
}

discountCurveEngine <- function(rparams, tslist, times, legParams) {
    .Call(`_RQuantLib_discountCurveEngine`, rparams, tslist, times, legParams)
}

calibrateHullWhiteUsingCapsEngine <- function(termStrcDateVec, termStrcZeroVec, capDF, iborDateVec, iborZeroVec, iborType, evalDate) {
    .Call(`_RQuantLib_calibrateHullWhiteUsingCapsEngine`, termStrcDateVec, termStrcZeroVec, capDF, iborDateVec, iborZeroVec, iborType, evalDate)
}

calibrateHullWhiteUsingSwapsEngine <- function(termStrcDateVec, termStrcZeroVec, swapDF, iborDateVec, iborZeroVec, iborType, evalDate) {
    .Call(`_RQuantLib_calibrateHullWhiteUsingSwapsEngine`, termStrcDateVec, termStrcZeroVec, swapDF, iborDateVec, iborZeroVec, iborType, evalDate)
}

europeanOptionImpliedVolatilityEngine <- function(type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility) {
    .Call(`_RQuantLib_europeanOptionImpliedVolatilityEngine`, type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility)
}

americanOptionImpliedVolatilityEngine <- function(type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volguess, timesteps, gridpoints) {
    .Call(`_RQuantLib_americanOptionImpliedVolatilityEngine`, type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volguess, timesteps, gridpoints)
}

sabrengine <- function(rparam, legParams, dateVec, zeroVec, swaptionMat, swapLengths, atmVols, strikes, smirkVols) {
    .Call(`_RQuantLib_sabrengine`, rparam, legParams, dateVec, zeroVec, swaptionMat, swapLengths, atmVols, strikes, smirkVols)
}

CreateSchedule <- function(params) {
    .Call(`_RQuantLib_CreateSchedule`, params)
}

#' This function returns the QuantLib version string as encoded in the header
#' file \code{config.hpp} and determined at compilation time of the QuantLib library.
#'
#' @title Return the QuantLib version number
#' @return A character variable
#' @references \url{https://www.quantlib.org} for details on \code{QuantLib}.
#' @author Dirk Eddelbuettel
#' @examples
#'   getQuantLibVersion()
getQuantLibVersion <- function() {
    .Call(`_RQuantLib_getQuantLibVersion`)
}

#' This function returns a named vector of boolean variables describing several
#' configuration options determined at compilation time of the QuantLib library.
#'
#' Not all of these features are used (yet) by RQuantLib.
#' @title Return configuration options of the QuantLib library
#' @return A named vector of logical variables
#' @references \url{https://www.quantlib.org} for details on \code{QuantLib}.
#' @author Dirk Eddelbuettel
#' @examples
#'   getQuantLibCapabilities()
getQuantLibCapabilities <- function() {
    .Call(`_RQuantLib_getQuantLibCapabilities`)
}

europeanOptionEngine <- function(type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, discreteDividends, discreteDividendsTimeUntil) {
    .Call(`_RQuantLib_europeanOptionEngine`, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, discreteDividends, discreteDividendsTimeUntil)
}

americanOptionEngine <- function(type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, timeSteps, gridPoints, engine, discreteDividends, discreteDividendsTimeUntil) {
    .Call(`_RQuantLib_americanOptionEngine`, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, timeSteps, gridPoints, engine, discreteDividends, discreteDividendsTimeUntil)
}

europeanOptionArraysEngine <- function(type, par) {
    .Call(`_RQuantLib_europeanOptionArraysEngine`, type, par)
}

zeroprice <- function(yield, maturity, settle, period, basis) {
    .Call(`_RQuantLib_zeroprice`, yield, maturity, settle, period, basis)
}

zeroyield <- function(price, maturity, settle, period, basis) {
    .Call(`_RQuantLib_zeroyield`, price, maturity, settle, period, basis)
}

# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
    .Call('_RQuantLib_RcppExport_registerCCallable', PACKAGE = 'RQuantLib')
})