# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

asianOptionEngine <- function(averageType, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, first, length, fixings) {
    .Call('RQuantLib_asianOptionEngine', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', binType, type, excType, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, cashPayoff)
}

binaryOptionImpliedVolatilityEngine <- function(type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, cashPayoff) {
    .Call('RQuantLib_binaryOptionImpliedVolatilityEngine', PACKAGE = 'RQuantLib', type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, cashPayoff)
}

barrierOptionEngine <- function(barrType, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, barrier, rebate) {
    .Call('RQuantLib_barrierOptionEngine', PACKAGE = 'RQuantLib', barrType, type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, barrier, rebate)
}

bermudanSwaptionEngine <- function(rparam, tslist, swaptionMat, swapLengths, swaptionVols) {
    .Call('RQuantLib_bermudanSwaptionEngine', PACKAGE = 'RQuantLib', rparam, tslist, swaptionMat, swapLengths, swaptionVols)
}

zeroPriceByYieldEngine <- function(yield, faceAmount, dayCounter, frequency, businessDayConvention, compound, maturityDate, issueDate) {
    .Call('RQuantLib_zeroPriceByYieldEngine', PACKAGE = 'RQuantLib', yield, faceAmount, dayCounter, frequency, businessDayConvention, compound, maturityDate, issueDate)
}

zeroYieldByPriceEngine <- function(price, faceAmount, dayCounter, frequency, businessDayConvention, compound, maturityDate, issueDate) {
    .Call('RQuantLib_zeroYieldByPriceEngine', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', bondparams, gearings, spreads, caps, floors, indexparams, iborDateVec, iborzeroVec, dateVec, zeroVec, dateparams)
}

FixedRateWithYield <- function(bondparam, ratesVec, scheduleparam, calcparam, yield) {
    .Call('RQuantLib_FixedRateWithYield', PACKAGE = 'RQuantLib', bondparam, ratesVec, scheduleparam, calcparam, yield)
}

FixedRateWithPrice <- function(bondparam, ratesVec, scheduleparam, calcparam, price) {
    .Call('RQuantLib_FixedRateWithPrice', PACKAGE = 'RQuantLib', bondparam, ratesVec, scheduleparam, calcparam, price)
}

FixedRateWithRebuiltCurve <- function(bondparam, ratesVec, scheduleparam, calcparam, dateVec, zeroVec) {
    .Call('RQuantLib_FixedRateWithRebuiltCurve', PACKAGE = 'RQuantLib', bondparam, ratesVec, scheduleparam, calcparam, dateVec, zeroVec)
}

ZeroBondWithRebuiltCurve <- function(bond, dateVec, zeroVec, dateparams) {
    .Call('RQuantLib_ZeroBondWithRebuiltCurve', PACKAGE = 'RQuantLib', bond, dateVec, zeroVec, dateparams)
}

convertibleZeroBondEngine <- function(rparam, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, dividendScheduleFrame, callabilityScheduleFrame, datemisc) {
    .Call('RQuantLib_convertibleZeroBondEngine', PACKAGE = 'RQuantLib', rparam, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, dividendScheduleFrame, callabilityScheduleFrame, datemisc)
}

convertibleFixedBondEngine <- function(rparam, rates, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, dividendScheduleFrame, callabilityScheduleFrame, datemisc) {
    .Call('RQuantLib_convertibleFixedBondEngine', PACKAGE = 'RQuantLib', 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', PACKAGE = 'RQuantLib', rparam, processParam, dividendYieldDateVec, dividendYieldZeroVec, rffDateVec, rffZeroVec, iborIndexDateVec, iborIndexZeroVec, iborparams, spreads, dividendScheduleFrame, callabilityScheduleFrame, datemisc)
}

callableBondEngine <- function(rparam, hwparam, coupon, callabilityScheduleFrame, datemisc) {
    .Call('RQuantLib_callableBondEngine', PACKAGE = 'RQuantLib', rparam, hwparam, coupon, callabilityScheduleFrame, datemisc)
}

fittedBondCurveEngine <- function(curveparam, length, coupons, marketQuotes, datemisc) {
    .Call('RQuantLib_fittedBondCurveEngine', PACKAGE = 'RQuantLib', curveparam, length, coupons, marketQuotes, datemisc)
}

setCalendarContext <- function(calendar, fixingDays, settleDate) {
    .Call('RQuantLib_setCalendarContext', PACKAGE = 'RQuantLib', calendar, fixingDays, settleDate)
}

isBusinessDay <- function(calendar, dates) {
    .Call('RQuantLib_isBusinessDay', PACKAGE = 'RQuantLib', calendar, dates)
}

isHoliday <- function(calendar, dates) {
    .Call('RQuantLib_isHoliday', PACKAGE = 'RQuantLib', calendar, dates)
}

isWeekend <- function(calendar, dates) {
    .Call('RQuantLib_isWeekend', PACKAGE = 'RQuantLib', calendar, dates)
}

isEndOfMonth <- function(calendar, dates) {
    .Call('RQuantLib_isEndOfMonth', PACKAGE = 'RQuantLib', calendar, dates)
}

getEndOfMonth <- function(calendar, dates) {
    .Call('RQuantLib_getEndOfMonth', PACKAGE = 'RQuantLib', calendar, dates)
}

adjust <- function(calendar, dates, bdc = 0L) {
    .Call('RQuantLib_adjust', PACKAGE = 'RQuantLib', calendar, dates, bdc)
}

advance1 <- function(calendar, amount, unit, bdcVal, emr, dates) {
    .Call('RQuantLib_advance1', PACKAGE = 'RQuantLib', calendar, amount, unit, bdcVal, emr, dates)
}

advance2 <- function(calendar, period, bdcVal, emr, dates) {
    .Call('RQuantLib_advance2', PACKAGE = 'RQuantLib', calendar, period, bdcVal, emr, dates)
}

businessDaysBetween <- function(calendar, from, to, includeFirst = TRUE, includeLast = FALSE) {
    .Call('RQuantLib_businessDaysBetween', PACKAGE = 'RQuantLib', calendar, from, to, includeFirst, includeLast)
}

getHolidayList <- function(calendar, from, to, includeWeekends = FALSE) {
    .Call('RQuantLib_getHolidayList', PACKAGE = 'RQuantLib', calendar, from, to, includeWeekends)
}

advanceDate <- function(issueDate, days) {
    .Call('RQuantLib_advanceDate', PACKAGE = 'RQuantLib', issueDate, days)
}

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

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

setEvaluationDate <- function(evalDate) {
    .Call('RQuantLib_setEvaluationDate', PACKAGE = 'RQuantLib', evalDate)
}

discountCurveEngine <- function(rparams, tslist, times) {
    .Call('RQuantLib_discountCurveEngine', PACKAGE = 'RQuantLib', rparams, tslist, times)
}

calibrateHullWhiteUsingCapsEngine <- function(termStrcDateVec, termStrcZeroVec, capDF, iborDateVec, iborZeroVec, iborType, evalDate) {
    .Call('RQuantLib_calibrateHullWhiteUsingCapsEngine', PACKAGE = 'RQuantLib', termStrcDateVec, termStrcZeroVec, capDF, iborDateVec, iborZeroVec, iborType, evalDate)
}

calibrateHullWhiteUsingSwapsEngine <- function(termStrcDateVec, termStrcZeroVec, swapDF, iborDateVec, iborZeroVec, iborType, evalDate) {
    .Call('RQuantLib_calibrateHullWhiteUsingSwapsEngine', PACKAGE = 'RQuantLib', termStrcDateVec, termStrcZeroVec, swapDF, iborDateVec, iborZeroVec, iborType, evalDate)
}

europeanOptionImpliedVolatilityEngine <- function(type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility) {
    .Call('RQuantLib_europeanOptionImpliedVolatilityEngine', PACKAGE = 'RQuantLib', type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volatility)
}

americanOptionImpliedVolatilityEngine <- function(type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volguess, timesteps, gridpoints) {
    .Call('RQuantLib_americanOptionImpliedVolatilityEngine', PACKAGE = 'RQuantLib', type, value, underlying, strike, dividendYield, riskFreeRate, maturity, volguess, timesteps, gridpoints)
}

CreateSchedule <- function(params) {
    .Call('RQuantLib_CreateSchedule', PACKAGE = 'RQuantLib', 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{http://quantlib.org} for details on \code{QuantLib}.
#' @author Dirk Eddelbuettel
#' @examples
#'   getQuantLibVersion()
getQuantLibVersion <- function() {
    .Call('RQuantLib_getQuantLibVersion', PACKAGE = 'RQuantLib')
}

#' 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{http://quantlib.org} for details on \code{QuantLib}.
#' @author Dirk Eddelbuettel
#' @examples
#'   getQuantLibCapabilities()
getQuantLibCapabilities <- function() {
    .Call('RQuantLib_getQuantLibCapabilities', PACKAGE = 'RQuantLib')
}

europeanOptionEngine <- function(type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility) {
    .Call('RQuantLib_europeanOptionEngine', PACKAGE = 'RQuantLib', type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility)
}

americanOptionEngine <- function(type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, timeSteps, gridPoints, engine) {
    .Call('RQuantLib_americanOptionEngine', PACKAGE = 'RQuantLib', type, underlying, strike, dividendYield, riskFreeRate, maturity, volatility, timeSteps, gridPoints, engine)
}

europeanOptionArraysEngine <- function(type, par) {
    .Call('RQuantLib_europeanOptionArraysEngine', PACKAGE = 'RQuantLib', type, par)
}

zeroprice <- function(yield, maturity, settle, period, basis) {
    .Call('RQuantLib_zeroprice', PACKAGE = 'RQuantLib', yield, maturity, settle, period, basis)
}

zeroyield <- function(price, maturity, settle, period, basis) {
    .Call('RQuantLib_zeroyield', PACKAGE = 'RQuantLib', price, maturity, settle, period, basis)
}

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