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 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659
|
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#ifndef RCPP_RQuantLib_RCPPEXPORTS_H_GEN_
#define RCPP_RQuantLib_RCPPEXPORTS_H_GEN_
#include <Rcpp.h>
namespace RQuantLib {
using namespace Rcpp;
namespace {
void validateSignature(const char* sig) {
Rcpp::Function require = Rcpp::Environment::base_env()["require"];
require("RQuantLib", Rcpp::Named("quietly") = true);
typedef int(*Ptr_validate)(const char*);
static Ptr_validate p_validate = (Ptr_validate)
R_GetCCallable("RQuantLib", "_RQuantLib_RcppExport_validate");
if (!p_validate(sig)) {
throw Rcpp::function_not_exported(
"C++ function with signature '" + std::string(sig) + "' not found in RQuantLib");
}
}
}
inline double zeroPriceByYieldEngine(double yield, double faceAmount, double dayCounter, double frequency, double businessDayConvention, double compound, QuantLib::Date maturityDate, QuantLib::Date issueDate) {
typedef SEXP(*Ptr_zeroPriceByYieldEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_zeroPriceByYieldEngine p_zeroPriceByYieldEngine = NULL;
if (p_zeroPriceByYieldEngine == NULL) {
validateSignature("double(*zeroPriceByYieldEngine)(double,double,double,double,double,double,QuantLib::Date,QuantLib::Date)");
p_zeroPriceByYieldEngine = (Ptr_zeroPriceByYieldEngine)R_GetCCallable("RQuantLib", "_RQuantLib_zeroPriceByYieldEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_zeroPriceByYieldEngine(Shield<SEXP>(Rcpp::wrap(yield)), Shield<SEXP>(Rcpp::wrap(faceAmount)), Shield<SEXP>(Rcpp::wrap(dayCounter)), Shield<SEXP>(Rcpp::wrap(frequency)), Shield<SEXP>(Rcpp::wrap(businessDayConvention)), Shield<SEXP>(Rcpp::wrap(compound)), Shield<SEXP>(Rcpp::wrap(maturityDate)), Shield<SEXP>(Rcpp::wrap(issueDate)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<double >(rcpp_result_gen);
}
inline double zeroYieldByPriceEngine(double price, double faceAmount, double dayCounter, double frequency, double businessDayConvention, double compound, QuantLib::Date maturityDate, QuantLib::Date issueDate) {
typedef SEXP(*Ptr_zeroYieldByPriceEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_zeroYieldByPriceEngine p_zeroYieldByPriceEngine = NULL;
if (p_zeroYieldByPriceEngine == NULL) {
validateSignature("double(*zeroYieldByPriceEngine)(double,double,double,double,double,double,QuantLib::Date,QuantLib::Date)");
p_zeroYieldByPriceEngine = (Ptr_zeroYieldByPriceEngine)R_GetCCallable("RQuantLib", "_RQuantLib_zeroYieldByPriceEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_zeroYieldByPriceEngine(Shield<SEXP>(Rcpp::wrap(price)), Shield<SEXP>(Rcpp::wrap(faceAmount)), Shield<SEXP>(Rcpp::wrap(dayCounter)), Shield<SEXP>(Rcpp::wrap(frequency)), Shield<SEXP>(Rcpp::wrap(businessDayConvention)), Shield<SEXP>(Rcpp::wrap(compound)), Shield<SEXP>(Rcpp::wrap(maturityDate)), Shield<SEXP>(Rcpp::wrap(issueDate)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<double >(rcpp_result_gen);
}
inline double fixedRateBondYieldByPriceEngine(double settlementDays, double price, std::string cal, double faceAmount, double businessDayConvention, double compound, double redemption, double dayCounter, double frequency, QuantLib::Date maturityDate, QuantLib::Date issueDate, QuantLib::Date effectiveDate, std::vector<double> rates) {
typedef SEXP(*Ptr_fixedRateBondYieldByPriceEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_fixedRateBondYieldByPriceEngine p_fixedRateBondYieldByPriceEngine = NULL;
if (p_fixedRateBondYieldByPriceEngine == NULL) {
validateSignature("double(*fixedRateBondYieldByPriceEngine)(double,double,std::string,double,double,double,double,double,double,QuantLib::Date,QuantLib::Date,QuantLib::Date,std::vector<double>)");
p_fixedRateBondYieldByPriceEngine = (Ptr_fixedRateBondYieldByPriceEngine)R_GetCCallable("RQuantLib", "_RQuantLib_fixedRateBondYieldByPriceEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_fixedRateBondYieldByPriceEngine(Shield<SEXP>(Rcpp::wrap(settlementDays)), Shield<SEXP>(Rcpp::wrap(price)), Shield<SEXP>(Rcpp::wrap(cal)), Shield<SEXP>(Rcpp::wrap(faceAmount)), Shield<SEXP>(Rcpp::wrap(businessDayConvention)), Shield<SEXP>(Rcpp::wrap(compound)), Shield<SEXP>(Rcpp::wrap(redemption)), Shield<SEXP>(Rcpp::wrap(dayCounter)), Shield<SEXP>(Rcpp::wrap(frequency)), Shield<SEXP>(Rcpp::wrap(maturityDate)), Shield<SEXP>(Rcpp::wrap(issueDate)), Shield<SEXP>(Rcpp::wrap(effectiveDate)), Shield<SEXP>(Rcpp::wrap(rates)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<double >(rcpp_result_gen);
}
inline double fixedRateBondPriceByYieldEngine(double settlementDays, double yield, std::string cal, double faceAmount, double businessDayConvention, double compound, double redemption, double dayCounter, double frequency, QuantLib::Date maturityDate, QuantLib::Date issueDate, QuantLib::Date effectiveDate, std::vector<double> rates) {
typedef SEXP(*Ptr_fixedRateBondPriceByYieldEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_fixedRateBondPriceByYieldEngine p_fixedRateBondPriceByYieldEngine = NULL;
if (p_fixedRateBondPriceByYieldEngine == NULL) {
validateSignature("double(*fixedRateBondPriceByYieldEngine)(double,double,std::string,double,double,double,double,double,double,QuantLib::Date,QuantLib::Date,QuantLib::Date,std::vector<double>)");
p_fixedRateBondPriceByYieldEngine = (Ptr_fixedRateBondPriceByYieldEngine)R_GetCCallable("RQuantLib", "_RQuantLib_fixedRateBondPriceByYieldEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_fixedRateBondPriceByYieldEngine(Shield<SEXP>(Rcpp::wrap(settlementDays)), Shield<SEXP>(Rcpp::wrap(yield)), Shield<SEXP>(Rcpp::wrap(cal)), Shield<SEXP>(Rcpp::wrap(faceAmount)), Shield<SEXP>(Rcpp::wrap(businessDayConvention)), Shield<SEXP>(Rcpp::wrap(compound)), Shield<SEXP>(Rcpp::wrap(redemption)), Shield<SEXP>(Rcpp::wrap(dayCounter)), Shield<SEXP>(Rcpp::wrap(frequency)), Shield<SEXP>(Rcpp::wrap(maturityDate)), Shield<SEXP>(Rcpp::wrap(issueDate)), Shield<SEXP>(Rcpp::wrap(effectiveDate)), Shield<SEXP>(Rcpp::wrap(rates)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<double >(rcpp_result_gen);
}
inline Rcpp::List FloatBond1(Rcpp::List bond, std::vector<double> gearings, std::vector<double> caps, std::vector<double> spreads, std::vector<double> floors, Rcpp::List indexparams, Rcpp::List index, Rcpp::List discountCurve, Rcpp::List dateparams) {
typedef SEXP(*Ptr_FloatBond1)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_FloatBond1 p_FloatBond1 = NULL;
if (p_FloatBond1 == NULL) {
validateSignature("Rcpp::List(*FloatBond1)(Rcpp::List,std::vector<double>,std::vector<double>,std::vector<double>,std::vector<double>,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List)");
p_FloatBond1 = (Ptr_FloatBond1)R_GetCCallable("RQuantLib", "_RQuantLib_FloatBond1");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_FloatBond1(Shield<SEXP>(Rcpp::wrap(bond)), Shield<SEXP>(Rcpp::wrap(gearings)), Shield<SEXP>(Rcpp::wrap(caps)), Shield<SEXP>(Rcpp::wrap(spreads)), Shield<SEXP>(Rcpp::wrap(floors)), Shield<SEXP>(Rcpp::wrap(indexparams)), Shield<SEXP>(Rcpp::wrap(index)), Shield<SEXP>(Rcpp::wrap(discountCurve)), Shield<SEXP>(Rcpp::wrap(dateparams)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List FloatBond2(Rcpp::List bond, std::vector<double> gearings, std::vector<double> caps, std::vector<double> spreads, std::vector<double> floors, Rcpp::List indexparams, Rcpp::List index_params, Rcpp::List index_tsQuotes, Rcpp::List index_times, Rcpp::List discountCurve, Rcpp::List dateparams) {
typedef SEXP(*Ptr_FloatBond2)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_FloatBond2 p_FloatBond2 = NULL;
if (p_FloatBond2 == NULL) {
validateSignature("Rcpp::List(*FloatBond2)(Rcpp::List,std::vector<double>,std::vector<double>,std::vector<double>,std::vector<double>,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List)");
p_FloatBond2 = (Ptr_FloatBond2)R_GetCCallable("RQuantLib", "_RQuantLib_FloatBond2");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_FloatBond2(Shield<SEXP>(Rcpp::wrap(bond)), Shield<SEXP>(Rcpp::wrap(gearings)), Shield<SEXP>(Rcpp::wrap(caps)), Shield<SEXP>(Rcpp::wrap(spreads)), Shield<SEXP>(Rcpp::wrap(floors)), Shield<SEXP>(Rcpp::wrap(indexparams)), Shield<SEXP>(Rcpp::wrap(index_params)), Shield<SEXP>(Rcpp::wrap(index_tsQuotes)), Shield<SEXP>(Rcpp::wrap(index_times)), Shield<SEXP>(Rcpp::wrap(discountCurve)), Shield<SEXP>(Rcpp::wrap(dateparams)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List FloatBond3(Rcpp::List bond, std::vector<double> gearings, std::vector<double> caps, std::vector<double> spreads, std::vector<double> floors, Rcpp::List indexparams, Rcpp::List index, Rcpp::List disc_params, Rcpp::List disc_tsQuotes, Rcpp::List disc_times, Rcpp::List dateparams) {
typedef SEXP(*Ptr_FloatBond3)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_FloatBond3 p_FloatBond3 = NULL;
if (p_FloatBond3 == NULL) {
validateSignature("Rcpp::List(*FloatBond3)(Rcpp::List,std::vector<double>,std::vector<double>,std::vector<double>,std::vector<double>,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List)");
p_FloatBond3 = (Ptr_FloatBond3)R_GetCCallable("RQuantLib", "_RQuantLib_FloatBond3");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_FloatBond3(Shield<SEXP>(Rcpp::wrap(bond)), Shield<SEXP>(Rcpp::wrap(gearings)), Shield<SEXP>(Rcpp::wrap(caps)), Shield<SEXP>(Rcpp::wrap(spreads)), Shield<SEXP>(Rcpp::wrap(floors)), Shield<SEXP>(Rcpp::wrap(indexparams)), Shield<SEXP>(Rcpp::wrap(index)), Shield<SEXP>(Rcpp::wrap(disc_params)), Shield<SEXP>(Rcpp::wrap(disc_tsQuotes)), Shield<SEXP>(Rcpp::wrap(disc_times)), Shield<SEXP>(Rcpp::wrap(dateparams)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List FloatBond4(Rcpp::List bond, std::vector<double> gearings, std::vector<double> caps, std::vector<double> spreads, std::vector<double> floors, Rcpp::List indexparams, Rcpp::List index_params, Rcpp::List index_tsQuotes, Rcpp::List index_times, Rcpp::List disc_params, Rcpp::List disc_tsQuotes, Rcpp::List disc_times, Rcpp::List dateparams) {
typedef SEXP(*Ptr_FloatBond4)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_FloatBond4 p_FloatBond4 = NULL;
if (p_FloatBond4 == NULL) {
validateSignature("Rcpp::List(*FloatBond4)(Rcpp::List,std::vector<double>,std::vector<double>,std::vector<double>,std::vector<double>,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List,Rcpp::List)");
p_FloatBond4 = (Ptr_FloatBond4)R_GetCCallable("RQuantLib", "_RQuantLib_FloatBond4");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_FloatBond4(Shield<SEXP>(Rcpp::wrap(bond)), Shield<SEXP>(Rcpp::wrap(gearings)), Shield<SEXP>(Rcpp::wrap(caps)), Shield<SEXP>(Rcpp::wrap(spreads)), Shield<SEXP>(Rcpp::wrap(floors)), Shield<SEXP>(Rcpp::wrap(indexparams)), Shield<SEXP>(Rcpp::wrap(index_params)), Shield<SEXP>(Rcpp::wrap(index_tsQuotes)), Shield<SEXP>(Rcpp::wrap(index_times)), Shield<SEXP>(Rcpp::wrap(disc_params)), Shield<SEXP>(Rcpp::wrap(disc_tsQuotes)), Shield<SEXP>(Rcpp::wrap(disc_times)), Shield<SEXP>(Rcpp::wrap(dateparams)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List floatingWithRebuiltCurveEngine(Rcpp::List bondparams, std::vector<double> gearings, std::vector<double> spreads, std::vector<double> caps, std::vector<double> floors, Rcpp::List indexparams, std::vector<QuantLib::Date> iborDateVec, std::vector<double> iborzeroVec, std::vector<QuantLib::Date> dateVec, std::vector<double> zeroVec, Rcpp::List dateparams) {
typedef SEXP(*Ptr_floatingWithRebuiltCurveEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_floatingWithRebuiltCurveEngine p_floatingWithRebuiltCurveEngine = NULL;
if (p_floatingWithRebuiltCurveEngine == NULL) {
validateSignature("Rcpp::List(*floatingWithRebuiltCurveEngine)(Rcpp::List,std::vector<double>,std::vector<double>,std::vector<double>,std::vector<double>,Rcpp::List,std::vector<QuantLib::Date>,std::vector<double>,std::vector<QuantLib::Date>,std::vector<double>,Rcpp::List)");
p_floatingWithRebuiltCurveEngine = (Ptr_floatingWithRebuiltCurveEngine)R_GetCCallable("RQuantLib", "_RQuantLib_floatingWithRebuiltCurveEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_floatingWithRebuiltCurveEngine(Shield<SEXP>(Rcpp::wrap(bondparams)), Shield<SEXP>(Rcpp::wrap(gearings)), Shield<SEXP>(Rcpp::wrap(spreads)), Shield<SEXP>(Rcpp::wrap(caps)), Shield<SEXP>(Rcpp::wrap(floors)), Shield<SEXP>(Rcpp::wrap(indexparams)), Shield<SEXP>(Rcpp::wrap(iborDateVec)), Shield<SEXP>(Rcpp::wrap(iborzeroVec)), Shield<SEXP>(Rcpp::wrap(dateVec)), Shield<SEXP>(Rcpp::wrap(zeroVec)), Shield<SEXP>(Rcpp::wrap(dateparams)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List FixedRateWithYield(Rcpp::List bondparam, std::vector<double> ratesVec, Rcpp::List scheduleparam, Rcpp::List calcparam, double yield) {
typedef SEXP(*Ptr_FixedRateWithYield)(SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_FixedRateWithYield p_FixedRateWithYield = NULL;
if (p_FixedRateWithYield == NULL) {
validateSignature("Rcpp::List(*FixedRateWithYield)(Rcpp::List,std::vector<double>,Rcpp::List,Rcpp::List,double)");
p_FixedRateWithYield = (Ptr_FixedRateWithYield)R_GetCCallable("RQuantLib", "_RQuantLib_FixedRateWithYield");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_FixedRateWithYield(Shield<SEXP>(Rcpp::wrap(bondparam)), Shield<SEXP>(Rcpp::wrap(ratesVec)), Shield<SEXP>(Rcpp::wrap(scheduleparam)), Shield<SEXP>(Rcpp::wrap(calcparam)), Shield<SEXP>(Rcpp::wrap(yield)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List FixedRateWithPrice(Rcpp::List bondparam, std::vector<double> ratesVec, Rcpp::List scheduleparam, Rcpp::List calcparam, double price) {
typedef SEXP(*Ptr_FixedRateWithPrice)(SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_FixedRateWithPrice p_FixedRateWithPrice = NULL;
if (p_FixedRateWithPrice == NULL) {
validateSignature("Rcpp::List(*FixedRateWithPrice)(Rcpp::List,std::vector<double>,Rcpp::List,Rcpp::List,double)");
p_FixedRateWithPrice = (Ptr_FixedRateWithPrice)R_GetCCallable("RQuantLib", "_RQuantLib_FixedRateWithPrice");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_FixedRateWithPrice(Shield<SEXP>(Rcpp::wrap(bondparam)), Shield<SEXP>(Rcpp::wrap(ratesVec)), Shield<SEXP>(Rcpp::wrap(scheduleparam)), Shield<SEXP>(Rcpp::wrap(calcparam)), Shield<SEXP>(Rcpp::wrap(price)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List FixedRateWithRebuiltCurve(Rcpp::List bondparam, std::vector<double> ratesVec, Rcpp::List scheduleparam, Rcpp::List calcparam, std::vector<QuantLib::Date> dateVec, std::vector<double> zeroVec) {
typedef SEXP(*Ptr_FixedRateWithRebuiltCurve)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_FixedRateWithRebuiltCurve p_FixedRateWithRebuiltCurve = NULL;
if (p_FixedRateWithRebuiltCurve == NULL) {
validateSignature("Rcpp::List(*FixedRateWithRebuiltCurve)(Rcpp::List,std::vector<double>,Rcpp::List,Rcpp::List,std::vector<QuantLib::Date>,std::vector<double>)");
p_FixedRateWithRebuiltCurve = (Ptr_FixedRateWithRebuiltCurve)R_GetCCallable("RQuantLib", "_RQuantLib_FixedRateWithRebuiltCurve");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_FixedRateWithRebuiltCurve(Shield<SEXP>(Rcpp::wrap(bondparam)), Shield<SEXP>(Rcpp::wrap(ratesVec)), Shield<SEXP>(Rcpp::wrap(scheduleparam)), Shield<SEXP>(Rcpp::wrap(calcparam)), Shield<SEXP>(Rcpp::wrap(dateVec)), Shield<SEXP>(Rcpp::wrap(zeroVec)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List ZeroBondWithRebuiltCurve(Rcpp::List bond, std::vector<QuantLib::Date> dateVec, std::vector<double> zeroVec, Rcpp::List dateparams) {
typedef SEXP(*Ptr_ZeroBondWithRebuiltCurve)(SEXP,SEXP,SEXP,SEXP);
static Ptr_ZeroBondWithRebuiltCurve p_ZeroBondWithRebuiltCurve = NULL;
if (p_ZeroBondWithRebuiltCurve == NULL) {
validateSignature("Rcpp::List(*ZeroBondWithRebuiltCurve)(Rcpp::List,std::vector<QuantLib::Date>,std::vector<double>,Rcpp::List)");
p_ZeroBondWithRebuiltCurve = (Ptr_ZeroBondWithRebuiltCurve)R_GetCCallable("RQuantLib", "_RQuantLib_ZeroBondWithRebuiltCurve");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_ZeroBondWithRebuiltCurve(Shield<SEXP>(Rcpp::wrap(bond)), Shield<SEXP>(Rcpp::wrap(dateVec)), Shield<SEXP>(Rcpp::wrap(zeroVec)), Shield<SEXP>(Rcpp::wrap(dateparams)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List convertibleZeroBondEngine(Rcpp::List rparam, Rcpp::List processParam, std::vector<QuantLib::Date> dividendYieldDateVec, std::vector<double> dividendYieldZeroVec, std::vector<QuantLib::Date> rffDateVec, std::vector<double> rffZeroVec, Rcpp::DataFrame dividendScheduleFrame, Rcpp::DataFrame callabilityScheduleFrame, Rcpp::List datemisc) {
typedef SEXP(*Ptr_convertibleZeroBondEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_convertibleZeroBondEngine p_convertibleZeroBondEngine = NULL;
if (p_convertibleZeroBondEngine == NULL) {
validateSignature("Rcpp::List(*convertibleZeroBondEngine)(Rcpp::List,Rcpp::List,std::vector<QuantLib::Date>,std::vector<double>,std::vector<QuantLib::Date>,std::vector<double>,Rcpp::DataFrame,Rcpp::DataFrame,Rcpp::List)");
p_convertibleZeroBondEngine = (Ptr_convertibleZeroBondEngine)R_GetCCallable("RQuantLib", "_RQuantLib_convertibleZeroBondEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_convertibleZeroBondEngine(Shield<SEXP>(Rcpp::wrap(rparam)), Shield<SEXP>(Rcpp::wrap(processParam)), Shield<SEXP>(Rcpp::wrap(dividendYieldDateVec)), Shield<SEXP>(Rcpp::wrap(dividendYieldZeroVec)), Shield<SEXP>(Rcpp::wrap(rffDateVec)), Shield<SEXP>(Rcpp::wrap(rffZeroVec)), Shield<SEXP>(Rcpp::wrap(dividendScheduleFrame)), Shield<SEXP>(Rcpp::wrap(callabilityScheduleFrame)), Shield<SEXP>(Rcpp::wrap(datemisc)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List convertibleFixedBondEngine(Rcpp::List rparam, Rcpp::NumericVector rates, Rcpp::List processParam, std::vector<QuantLib::Date> dividendYieldDateVec, std::vector<double> dividendYieldZeroVec, std::vector<QuantLib::Date> rffDateVec, std::vector<double> rffZeroVec, Rcpp::DataFrame dividendScheduleFrame, Rcpp::DataFrame callabilityScheduleFrame, Rcpp::List datemisc) {
typedef SEXP(*Ptr_convertibleFixedBondEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_convertibleFixedBondEngine p_convertibleFixedBondEngine = NULL;
if (p_convertibleFixedBondEngine == NULL) {
validateSignature("Rcpp::List(*convertibleFixedBondEngine)(Rcpp::List,Rcpp::NumericVector,Rcpp::List,std::vector<QuantLib::Date>,std::vector<double>,std::vector<QuantLib::Date>,std::vector<double>,Rcpp::DataFrame,Rcpp::DataFrame,Rcpp::List)");
p_convertibleFixedBondEngine = (Ptr_convertibleFixedBondEngine)R_GetCCallable("RQuantLib", "_RQuantLib_convertibleFixedBondEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_convertibleFixedBondEngine(Shield<SEXP>(Rcpp::wrap(rparam)), Shield<SEXP>(Rcpp::wrap(rates)), Shield<SEXP>(Rcpp::wrap(processParam)), Shield<SEXP>(Rcpp::wrap(dividendYieldDateVec)), Shield<SEXP>(Rcpp::wrap(dividendYieldZeroVec)), Shield<SEXP>(Rcpp::wrap(rffDateVec)), Shield<SEXP>(Rcpp::wrap(rffZeroVec)), Shield<SEXP>(Rcpp::wrap(dividendScheduleFrame)), Shield<SEXP>(Rcpp::wrap(callabilityScheduleFrame)), Shield<SEXP>(Rcpp::wrap(datemisc)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List convertibleFloatingBondEngine(Rcpp::List rparam, Rcpp::List processParam, std::vector<QuantLib::Date> dividendYieldDateVec, std::vector<double> dividendYieldZeroVec, std::vector<QuantLib::Date> rffDateVec, std::vector<double> rffZeroVec, std::vector<QuantLib::Date> iborIndexDateVec, std::vector<double> iborIndexZeroVec, Rcpp::List iborparams, std::vector<double> spreads, Rcpp::DataFrame dividendScheduleFrame, Rcpp::DataFrame callabilityScheduleFrame, Rcpp::List datemisc) {
typedef SEXP(*Ptr_convertibleFloatingBondEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_convertibleFloatingBondEngine p_convertibleFloatingBondEngine = NULL;
if (p_convertibleFloatingBondEngine == NULL) {
validateSignature("Rcpp::List(*convertibleFloatingBondEngine)(Rcpp::List,Rcpp::List,std::vector<QuantLib::Date>,std::vector<double>,std::vector<QuantLib::Date>,std::vector<double>,std::vector<QuantLib::Date>,std::vector<double>,Rcpp::List,std::vector<double>,Rcpp::DataFrame,Rcpp::DataFrame,Rcpp::List)");
p_convertibleFloatingBondEngine = (Ptr_convertibleFloatingBondEngine)R_GetCCallable("RQuantLib", "_RQuantLib_convertibleFloatingBondEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_convertibleFloatingBondEngine(Shield<SEXP>(Rcpp::wrap(rparam)), Shield<SEXP>(Rcpp::wrap(processParam)), Shield<SEXP>(Rcpp::wrap(dividendYieldDateVec)), Shield<SEXP>(Rcpp::wrap(dividendYieldZeroVec)), Shield<SEXP>(Rcpp::wrap(rffDateVec)), Shield<SEXP>(Rcpp::wrap(rffZeroVec)), Shield<SEXP>(Rcpp::wrap(iborIndexDateVec)), Shield<SEXP>(Rcpp::wrap(iborIndexZeroVec)), Shield<SEXP>(Rcpp::wrap(iborparams)), Shield<SEXP>(Rcpp::wrap(spreads)), Shield<SEXP>(Rcpp::wrap(dividendScheduleFrame)), Shield<SEXP>(Rcpp::wrap(callabilityScheduleFrame)), Shield<SEXP>(Rcpp::wrap(datemisc)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List callableBondEngine(Rcpp::List rparam, Rcpp::List hwparam, Rcpp::NumericVector coupon, Rcpp::DataFrame callabilityScheduleFrame, Rcpp::List datemisc) {
typedef SEXP(*Ptr_callableBondEngine)(SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_callableBondEngine p_callableBondEngine = NULL;
if (p_callableBondEngine == NULL) {
validateSignature("Rcpp::List(*callableBondEngine)(Rcpp::List,Rcpp::List,Rcpp::NumericVector,Rcpp::DataFrame,Rcpp::List)");
p_callableBondEngine = (Ptr_callableBondEngine)R_GetCCallable("RQuantLib", "_RQuantLib_callableBondEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_callableBondEngine(Shield<SEXP>(Rcpp::wrap(rparam)), Shield<SEXP>(Rcpp::wrap(hwparam)), Shield<SEXP>(Rcpp::wrap(coupon)), Shield<SEXP>(Rcpp::wrap(callabilityScheduleFrame)), Shield<SEXP>(Rcpp::wrap(datemisc)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List fittedBondCurveEngine(Rcpp::List curveparam, Rcpp::NumericVector length, Rcpp::NumericVector coupons, Rcpp::NumericVector marketQuotes, Rcpp::List datemisc) {
typedef SEXP(*Ptr_fittedBondCurveEngine)(SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_fittedBondCurveEngine p_fittedBondCurveEngine = NULL;
if (p_fittedBondCurveEngine == NULL) {
validateSignature("Rcpp::List(*fittedBondCurveEngine)(Rcpp::List,Rcpp::NumericVector,Rcpp::NumericVector,Rcpp::NumericVector,Rcpp::List)");
p_fittedBondCurveEngine = (Ptr_fittedBondCurveEngine)R_GetCCallable("RQuantLib", "_RQuantLib_fittedBondCurveEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_fittedBondCurveEngine(Shield<SEXP>(Rcpp::wrap(curveparam)), Shield<SEXP>(Rcpp::wrap(length)), Shield<SEXP>(Rcpp::wrap(coupons)), Shield<SEXP>(Rcpp::wrap(marketQuotes)), Shield<SEXP>(Rcpp::wrap(datemisc)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline QuantLib::Date advanceDate(QuantLib::Date issueDate, int days) {
typedef SEXP(*Ptr_advanceDate)(SEXP,SEXP);
static Ptr_advanceDate p_advanceDate = NULL;
if (p_advanceDate == NULL) {
validateSignature("QuantLib::Date(*advanceDate)(QuantLib::Date,int)");
p_advanceDate = (Ptr_advanceDate)R_GetCCallable("RQuantLib", "_RQuantLib_advanceDate");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_advanceDate(Shield<SEXP>(Rcpp::wrap(issueDate)), Shield<SEXP>(Rcpp::wrap(days)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<QuantLib::Date >(rcpp_result_gen);
}
inline std::vector<double> dayCount(std::vector<QuantLib::Date> startDates, std::vector<QuantLib::Date> endDates, std::vector<double> dayCounters) {
typedef SEXP(*Ptr_dayCount)(SEXP,SEXP,SEXP);
static Ptr_dayCount p_dayCount = NULL;
if (p_dayCount == NULL) {
validateSignature("std::vector<double>(*dayCount)(std::vector<QuantLib::Date>,std::vector<QuantLib::Date>,std::vector<double>)");
p_dayCount = (Ptr_dayCount)R_GetCCallable("RQuantLib", "_RQuantLib_dayCount");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_dayCount(Shield<SEXP>(Rcpp::wrap(startDates)), Shield<SEXP>(Rcpp::wrap(endDates)), Shield<SEXP>(Rcpp::wrap(dayCounters)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<std::vector<double> >(rcpp_result_gen);
}
inline std::vector<double> yearFraction(std::vector<QuantLib::Date> startDates, std::vector<QuantLib::Date> endDates, std::vector<double> dayCounters) {
typedef SEXP(*Ptr_yearFraction)(SEXP,SEXP,SEXP);
static Ptr_yearFraction p_yearFraction = NULL;
if (p_yearFraction == NULL) {
validateSignature("std::vector<double>(*yearFraction)(std::vector<QuantLib::Date>,std::vector<QuantLib::Date>,std::vector<double>)");
p_yearFraction = (Ptr_yearFraction)R_GetCCallable("RQuantLib", "_RQuantLib_yearFraction");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_yearFraction(Shield<SEXP>(Rcpp::wrap(startDates)), Shield<SEXP>(Rcpp::wrap(endDates)), Shield<SEXP>(Rcpp::wrap(dayCounters)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<std::vector<double> >(rcpp_result_gen);
}
inline bool setEvaluationDate(QuantLib::Date evalDate) {
typedef SEXP(*Ptr_setEvaluationDate)(SEXP);
static Ptr_setEvaluationDate p_setEvaluationDate = NULL;
if (p_setEvaluationDate == NULL) {
validateSignature("bool(*setEvaluationDate)(QuantLib::Date)");
p_setEvaluationDate = (Ptr_setEvaluationDate)R_GetCCallable("RQuantLib", "_RQuantLib_setEvaluationDate");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_setEvaluationDate(Shield<SEXP>(Rcpp::wrap(evalDate)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<bool >(rcpp_result_gen);
}
inline double europeanOptionImpliedVolatilityEngine(std::string type, double value, double underlying, double strike, double dividendYield, double riskFreeRate, double maturity, double volatility) {
typedef SEXP(*Ptr_europeanOptionImpliedVolatilityEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_europeanOptionImpliedVolatilityEngine p_europeanOptionImpliedVolatilityEngine = NULL;
if (p_europeanOptionImpliedVolatilityEngine == NULL) {
validateSignature("double(*europeanOptionImpliedVolatilityEngine)(std::string,double,double,double,double,double,double,double)");
p_europeanOptionImpliedVolatilityEngine = (Ptr_europeanOptionImpliedVolatilityEngine)R_GetCCallable("RQuantLib", "_RQuantLib_europeanOptionImpliedVolatilityEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_europeanOptionImpliedVolatilityEngine(Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(value)), Shield<SEXP>(Rcpp::wrap(underlying)), Shield<SEXP>(Rcpp::wrap(strike)), Shield<SEXP>(Rcpp::wrap(dividendYield)), Shield<SEXP>(Rcpp::wrap(riskFreeRate)), Shield<SEXP>(Rcpp::wrap(maturity)), Shield<SEXP>(Rcpp::wrap(volatility)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<double >(rcpp_result_gen);
}
inline double americanOptionImpliedVolatilityEngine(std::string type, double value, double underlying, double strike, double dividendYield, double riskFreeRate, double maturity, double volguess, int timesteps, int gridpoints) {
typedef SEXP(*Ptr_americanOptionImpliedVolatilityEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_americanOptionImpliedVolatilityEngine p_americanOptionImpliedVolatilityEngine = NULL;
if (p_americanOptionImpliedVolatilityEngine == NULL) {
validateSignature("double(*americanOptionImpliedVolatilityEngine)(std::string,double,double,double,double,double,double,double,int,int)");
p_americanOptionImpliedVolatilityEngine = (Ptr_americanOptionImpliedVolatilityEngine)R_GetCCallable("RQuantLib", "_RQuantLib_americanOptionImpliedVolatilityEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_americanOptionImpliedVolatilityEngine(Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(value)), Shield<SEXP>(Rcpp::wrap(underlying)), Shield<SEXP>(Rcpp::wrap(strike)), Shield<SEXP>(Rcpp::wrap(dividendYield)), Shield<SEXP>(Rcpp::wrap(riskFreeRate)), Shield<SEXP>(Rcpp::wrap(maturity)), Shield<SEXP>(Rcpp::wrap(volguess)), Shield<SEXP>(Rcpp::wrap(timesteps)), Shield<SEXP>(Rcpp::wrap(gridpoints)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<double >(rcpp_result_gen);
}
inline Rcpp::DateVector CreateSchedule(Rcpp::List params) {
typedef SEXP(*Ptr_CreateSchedule)(SEXP);
static Ptr_CreateSchedule p_CreateSchedule = NULL;
if (p_CreateSchedule == NULL) {
validateSignature("Rcpp::DateVector(*CreateSchedule)(Rcpp::List)");
p_CreateSchedule = (Ptr_CreateSchedule)R_GetCCallable("RQuantLib", "_RQuantLib_CreateSchedule");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_CreateSchedule(Shield<SEXP>(Rcpp::wrap(params)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::DateVector >(rcpp_result_gen);
}
inline std::string getQuantLibVersion() {
typedef SEXP(*Ptr_getQuantLibVersion)();
static Ptr_getQuantLibVersion p_getQuantLibVersion = NULL;
if (p_getQuantLibVersion == NULL) {
validateSignature("std::string(*getQuantLibVersion)()");
p_getQuantLibVersion = (Ptr_getQuantLibVersion)R_GetCCallable("RQuantLib", "_RQuantLib_getQuantLibVersion");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_getQuantLibVersion();
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<std::string >(rcpp_result_gen);
}
inline Rcpp::LogicalVector getQuantLibCapabilities() {
typedef SEXP(*Ptr_getQuantLibCapabilities)();
static Ptr_getQuantLibCapabilities p_getQuantLibCapabilities = NULL;
if (p_getQuantLibCapabilities == NULL) {
validateSignature("Rcpp::LogicalVector(*getQuantLibCapabilities)()");
p_getQuantLibCapabilities = (Ptr_getQuantLibCapabilities)R_GetCCallable("RQuantLib", "_RQuantLib_getQuantLibCapabilities");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_getQuantLibCapabilities();
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::LogicalVector >(rcpp_result_gen);
}
inline Rcpp::List europeanOptionEngine(std::string type, double underlying, double strike, double dividendYield, double riskFreeRate, double maturity, double volatility, Rcpp::Nullable<Rcpp::NumericVector> discreteDividends, Rcpp::Nullable<Rcpp::NumericVector> discreteDividendsTimeUntil) {
typedef SEXP(*Ptr_europeanOptionEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_europeanOptionEngine p_europeanOptionEngine = NULL;
if (p_europeanOptionEngine == NULL) {
validateSignature("Rcpp::List(*europeanOptionEngine)(std::string,double,double,double,double,double,double,Rcpp::Nullable<Rcpp::NumericVector>,Rcpp::Nullable<Rcpp::NumericVector>)");
p_europeanOptionEngine = (Ptr_europeanOptionEngine)R_GetCCallable("RQuantLib", "_RQuantLib_europeanOptionEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_europeanOptionEngine(Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(underlying)), Shield<SEXP>(Rcpp::wrap(strike)), Shield<SEXP>(Rcpp::wrap(dividendYield)), Shield<SEXP>(Rcpp::wrap(riskFreeRate)), Shield<SEXP>(Rcpp::wrap(maturity)), Shield<SEXP>(Rcpp::wrap(volatility)), Shield<SEXP>(Rcpp::wrap(discreteDividends)), Shield<SEXP>(Rcpp::wrap(discreteDividendsTimeUntil)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List americanOptionEngine(std::string type, double underlying, double strike, double dividendYield, double riskFreeRate, double maturity, double volatility, int timeSteps, int gridPoints, std::string engine, Rcpp::Nullable<Rcpp::NumericVector> discreteDividends, Rcpp::Nullable<Rcpp::NumericVector> discreteDividendsTimeUntil) {
typedef SEXP(*Ptr_americanOptionEngine)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_americanOptionEngine p_americanOptionEngine = NULL;
if (p_americanOptionEngine == NULL) {
validateSignature("Rcpp::List(*americanOptionEngine)(std::string,double,double,double,double,double,double,int,int,std::string,Rcpp::Nullable<Rcpp::NumericVector>,Rcpp::Nullable<Rcpp::NumericVector>)");
p_americanOptionEngine = (Ptr_americanOptionEngine)R_GetCCallable("RQuantLib", "_RQuantLib_americanOptionEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_americanOptionEngine(Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(underlying)), Shield<SEXP>(Rcpp::wrap(strike)), Shield<SEXP>(Rcpp::wrap(dividendYield)), Shield<SEXP>(Rcpp::wrap(riskFreeRate)), Shield<SEXP>(Rcpp::wrap(maturity)), Shield<SEXP>(Rcpp::wrap(volatility)), Shield<SEXP>(Rcpp::wrap(timeSteps)), Shield<SEXP>(Rcpp::wrap(gridPoints)), Shield<SEXP>(Rcpp::wrap(engine)), Shield<SEXP>(Rcpp::wrap(discreteDividends)), Shield<SEXP>(Rcpp::wrap(discreteDividendsTimeUntil)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
inline Rcpp::List europeanOptionArraysEngine(std::string type, Rcpp::NumericMatrix par) {
typedef SEXP(*Ptr_europeanOptionArraysEngine)(SEXP,SEXP);
static Ptr_europeanOptionArraysEngine p_europeanOptionArraysEngine = NULL;
if (p_europeanOptionArraysEngine == NULL) {
validateSignature("Rcpp::List(*europeanOptionArraysEngine)(std::string,Rcpp::NumericMatrix)");
p_europeanOptionArraysEngine = (Ptr_europeanOptionArraysEngine)R_GetCCallable("RQuantLib", "_RQuantLib_europeanOptionArraysEngine");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_europeanOptionArraysEngine(Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(par)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::List >(rcpp_result_gen);
}
}
#endif // RCPP_RQuantLib_RCPPEXPORTS_H_GEN_
|