Swaption class with QuantLib::Swap underlying
More...
#include <qle/instruments/genericswaption.hpp>
|
| GenericSwaption (const ext::shared_ptr< QuantLib::Swap > &swap, const ext::shared_ptr< Exercise > &exercise, QuantLib::Settlement::Type delivery=QuantLib::Settlement::Physical, QuantLib::Settlement::Method settlementMethod=QuantLib::Settlement::PhysicalOTC) |
|
|
bool | isExpired () const override |
|
void | setupArguments (PricingEngine::arguments *) const override |
|
Swaption class with QuantLib::Swap underlying
Definition at line 38 of file genericswaption.hpp.
◆ GenericSwaption()
GenericSwaption |
( |
const ext::shared_ptr< QuantLib::Swap > & |
swap, |
|
|
const ext::shared_ptr< Exercise > & |
exercise, |
|
|
QuantLib::Settlement::Type |
delivery = QuantLib::Settlement::Physical , |
|
|
QuantLib::Settlement::Method |
settlementMethod = QuantLib::Settlement::PhysicalOTC |
|
) |
| |
Definition at line 26 of file genericswaption.cpp.
31 swap_->alwaysForwardNotifications();
32}
ext::shared_ptr< QuantLib::Swap > swap_
QuantLib::Settlement::Type settlementType_
QuantLib::Settlement::Method settlementMethod_
Settlement::Method settlementMethod() const
◆ isExpired()
Definition at line 34 of file genericswaption.cpp.
34{ return detail::simple_event(exercise_->dates().back()).hasOccurred(); }
◆ setupArguments()
void setupArguments |
( |
PricingEngine::arguments * |
args | ) |
const |
|
override |
Definition at line 36 of file genericswaption.cpp.
36 {
37 swap_->setupArguments(args);
38 Option::setupArguments(args);
39
40 GenericSwaption::arguments* arguments = dynamic_cast<GenericSwaption::arguments*>(args);
41
42 QL_REQUIRE(arguments != 0, "wrong argument type");
43
44 arguments->swap =
swap_;
47 arguments->exercise = exercise_;
48}
◆ settlementType()
Settlement::Type settlementType |
( |
| ) |
const |
◆ settlementMethod()
Settlement::Method settlementMethod |
( |
| ) |
const |
◆ underlyingSwap()
const ext::shared_ptr< QuantLib::Swap > & underlyingSwap |
( |
| ) |
const |
◆ underlyingValue()
Real underlyingValue |
( |
| ) |
const |
◆ fetchResults()
void fetchResults |
( |
const PricingEngine::results * |
r | ) |
const |
|
overrideprivate |
Definition at line 50 of file genericswaption.cpp.
50 {
51 Option::fetchResults(r);
52 const GenericSwaption::results* results = dynamic_cast<const GenericSwaption::results*>(r);
53 QL_ENSURE(results != 0, "wrong results type");
55}
◆ swap_
ext::shared_ptr<QuantLib::Swap> swap_ |
|
private |
◆ settlementType_
QuantLib::Settlement::Type settlementType_ |
|
private |
◆ settlementMethod_
QuantLib::Settlement::Method settlementMethod_ |
|
private |
◆ underlyingValue_