24#ifndef quantext_cash_settled_european_option_hpp
25#define quantext_cash_settled_european_option_hpp
27#include <ql/index.hpp>
28#include <ql/instruments/vanillaoption.hpp>
44 const QuantLib::ext::shared_ptr<QuantLib::Index>&
underlying =
nullptr,
bool exercised =
false,
49 QuantLib::Natural paymentLag,
const QuantLib::Calendar& paymentCalendar,
51 const QuantLib::ext::shared_ptr<QuantLib::Index>&
underlying =
nullptr,
bool exercised =
false,
56 const QuantLib::Date& expiryDate,
const QuantLib::Date&
paymentDate,
63 const QuantLib::Date& expiryDate, QuantLib::Natural paymentLag,
64 const QuantLib::Calendar& paymentCalendar,
66 const QuantLib::ext::shared_ptr<QuantLib::Index>&
underlying =
nullptr,
bool exercised =
false,
85 const QuantLib::ext::shared_ptr<QuantLib::Index>&
underlying()
const;
115 :
public QuantLib::GenericEngine<CashSettledEuropeanOption::arguments, CashSettledEuropeanOption::results> {};
QuantLib::Real priceAtExercise
QuantLib::Date paymentDate
QuantLib::ext::shared_ptr< QuantLib::Index > underlying
void validate() const override
QuantLib::Real priceAtExercise() const
void setupArguments(QuantLib::PricingEngine::arguments *args) const override
Set up the extra arguments.
bool isExpired() const override
Account for cash settled European options not being expired until payment is made.
CashSettledEuropeanOption(QuantLib::Option::Type type, QuantLib::Real strike, const QuantLib::Date &expiryDate, QuantLib::Natural paymentLag, const QuantLib::Calendar &paymentCalendar, QuantLib::BusinessDayConvention paymentConvention, bool automaticExercise, const QuantLib::ext::shared_ptr< QuantLib::Index > &underlying=nullptr, bool exercised=false, QuantLib::Real priceAtExercise=QuantLib::Null< QuantLib::Real >())
Constructor for cash settled vanilla European option.
const QuantLib::ext::shared_ptr< QuantLib::Index > & underlying() const
const QuantLib::Date & paymentDate() const
CashSettledEuropeanOption(QuantLib::Option::Type type, QuantLib::Real strike, QuantLib::Real cashPayoff, const QuantLib::Date &expiryDate, const QuantLib::Date &paymentDate, bool automaticExercise, const QuantLib::ext::shared_ptr< QuantLib::Index > &underlying=nullptr, bool exercised=false, QuantLib::Real priceAtExercise=QuantLib::Null< QuantLib::Real >())
Constructor for cash settled vanilla European option with digital payoff.
CashSettledEuropeanOption(QuantLib::Option::Type type, QuantLib::Real strike, const QuantLib::Date &expiryDate, const QuantLib::Date &paymentDate, bool automaticExercise, const QuantLib::ext::shared_ptr< QuantLib::Index > &underlying=nullptr, bool exercised=false, QuantLib::Real priceAtExercise=QuantLib::Null< QuantLib::Real >())
Constructor for cash settled vanilla European option.
void init(bool exercised, QuantLib::Real priceAtExercise)
Shared initialisation.
QuantLib::Date paymentDate_
QuantLib::Real priceAtExercise_
CashSettledEuropeanOption(QuantLib::Option::Type type, QuantLib::Real strike, QuantLib::Real cashPayoff, const QuantLib::Date &expiryDate, QuantLib::Natural paymentLag, const QuantLib::Calendar &paymentCalendar, QuantLib::BusinessDayConvention paymentConvention, bool automaticExercise, const QuantLib::ext::shared_ptr< QuantLib::Index > &underlying=nullptr, bool exercised=false, QuantLib::Real priceAtExercise=QuantLib::Null< QuantLib::Real >())
Constructor for cash settled vanilla European option with digital payoff.
bool automaticExercise() const
QuantLib::ext::shared_ptr< QuantLib::Index > underlying_
void exercise(QuantLib::Real priceAtExercise)
Mark option as manually exercised at the given priceAtExercise.