Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
CliquetOption Class Reference

#include <qle/instruments/cliquetoption.hpp>

+ Inheritance diagram for CliquetOption:
+ Collaboration diagram for CliquetOption:

Classes

class  arguments
 
class  engine
 Cliquet engine base class. More...
 

Public Member Functions

 CliquetOption (const QuantLib::ext::shared_ptr< PercentageStrikePayoff > &payoff, const QuantLib::ext::shared_ptr< EuropeanExercise > &maturity, const std::set< Date > &valuationDates, const Date &paymentDate, const Real notional, const Position::Type &longShort, const Real localCap=Null< Real >(), const Real localFloor=Null< Real >(), const Real globalCap=Null< Real >(), const Real globalFloor=Null< Real >(), const Real premium=Null< Real >(), const Date &premiumPayDate=Date(), const std::string &premiumCurrency="")
 
bool isExpired () const override
 
void setupArguments (PricingEngine::arguments *) const override
 
const std::set< Date > & valuationDates () const
 

Private Attributes

const std::set< Date > valuationDates_
 
const Date paymentDate_
 
const Real notional_
 
const Position::Type longShort_
 
const Real localCap_
 
const Real localFloor_
 
const Real globalCap_
 
const Real globalFloor_
 
const Real premium_
 
const Date premiumPayDate_
 
const std::string premiumCurrency_
 

Detailed Description

The payoff on the payment date is given by min( max( sum min( max( S(t) / S(t-1) - moneyness, localFloor ), localCap ), globalFloor), globalCap)

Definition at line 39 of file cliquetoption.hpp.

Constructor & Destructor Documentation

◆ CliquetOption()

CliquetOption ( const QuantLib::ext::shared_ptr< PercentageStrikePayoff > &  payoff,
const QuantLib::ext::shared_ptr< EuropeanExercise > &  maturity,
const std::set< Date > &  valuationDates,
const Date &  paymentDate,
const Real  notional,
const Position::Type &  longShort,
const Real  localCap = Null<Real>(),
const Real  localFloor = Null<Real>(),
const Real  globalCap = Null<Real>(),
const Real  globalFloor = Null<Real>(),
const Real  premium = Null<Real>(),
const Date &  premiumPayDate = Date(),
const std::string &  premiumCurrency = "" 
)

Definition at line 25 of file cliquetoption.cpp.

30 : OneAssetOption(payoff, maturity), valuationDates_(valuationDates), paymentDate_(paymentDate), notional_(notional),
31 longShort_(longShort), localCap_(localCap), localFloor_(localFloor), globalCap_(globalCap),
32 globalFloor_(globalFloor), premium_(premium), premiumPayDate_(premiumPayDate), premiumCurrency_(premiumCurrency) {
33
34 QL_REQUIRE(valuationDates.size() > 0, "cliquet option: at least one valuation date must be given");
35 QL_REQUIRE(paymentDate >= *valuationDates.rbegin(), "cliquet option: payment date ("
36 << paymentDate << ") must be after last valuation date ("
37 << *valuationDates.rbegin() << ")");
38}
const Position::Type longShort_
const std::set< Date > & valuationDates() const
const std::string premiumCurrency_
const std::set< Date > valuationDates_
+ Here is the call graph for this function:

Member Function Documentation

◆ isExpired()

bool isExpired ( ) const
override

Definition at line 40 of file cliquetoption.cpp.

40{ return Settings::instance().evaluationDate() >= paymentDate_; }

◆ setupArguments()

void setupArguments ( PricingEngine::arguments *  args) const
override

Definition at line 42 of file cliquetoption.cpp.

42 {
43 OneAssetOption::setupArguments(args);
44 CliquetOption::arguments* moreArgs = dynamic_cast<CliquetOption::arguments*>(args);
45 QL_REQUIRE(moreArgs != 0, "cliquet option: wrong engine type");
46
47 moreArgs->notional = notional_;
48 moreArgs->longShort = longShort_;
49 moreArgs->moneyness = QuantLib::ext::dynamic_pointer_cast<PercentageStrikePayoff>(payoff_)->strike();
50 moreArgs->type = QuantLib::ext::dynamic_pointer_cast<PercentageStrikePayoff>(payoff_)->optionType();
51 moreArgs->valuationDates = valuationDates_;
52 moreArgs->paymentDate = paymentDate_;
53 moreArgs->localCap = localCap_;
54 moreArgs->localFloor = localFloor_;
55 moreArgs->globalCap = globalCap_;
56 moreArgs->globalFloor = globalFloor_;
57 moreArgs->premium = premium_;
58 moreArgs->premiumPayDate = premiumPayDate_;
59 moreArgs->premiumCurrency = premiumCurrency_;
60}

◆ valuationDates()

const std::set< Date > & valuationDates ( ) const

Definition at line 53 of file cliquetoption.hpp.

53{ return valuationDates_; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ valuationDates_

const std::set<Date> valuationDates_
private

Definition at line 56 of file cliquetoption.hpp.

◆ paymentDate_

const Date paymentDate_
private

Definition at line 57 of file cliquetoption.hpp.

◆ notional_

const Real notional_
private

Definition at line 58 of file cliquetoption.hpp.

◆ longShort_

const Position::Type longShort_
private

Definition at line 59 of file cliquetoption.hpp.

◆ localCap_

const Real localCap_
private

Definition at line 60 of file cliquetoption.hpp.

◆ localFloor_

const Real localFloor_
private

Definition at line 60 of file cliquetoption.hpp.

◆ globalCap_

const Real globalCap_
private

Definition at line 60 of file cliquetoption.hpp.

◆ globalFloor_

const Real globalFloor_
private

Definition at line 60 of file cliquetoption.hpp.

◆ premium_

const Real premium_
private

Definition at line 60 of file cliquetoption.hpp.

◆ premiumPayDate_

const Date premiumPayDate_
private

Definition at line 61 of file cliquetoption.hpp.

◆ premiumCurrency_

const std::string premiumCurrency_
private

Definition at line 62 of file cliquetoption.hpp.