24#ifndef quantlib_vanilla_swing_option_hpp
25#define quantlib_vanilla_swing_option_hpp
40 const std::vector<Size>&
seconds = std::vector<Size>());
43 const std::vector<Size>&
seconds()
const;
46 const Date& refDate)
const;
57 std::string
name()
const override {
return "ForwardTypePayoff"; }
67 const ext::shared_ptr<SwingExercise>& ex,
68 Size minExerciseRights,
Size maxExerciseRights)
87 ext::shared_ptr<StrikedTypePayoff>
payoff;
degenerate base class for the Acyclic Visitor pattern
const std::vector< Date > & dates() const
Returns all exercise dates.
Base class for options on a single asset.
ext::shared_ptr< Payoff > payoff() const
Intermediate class for payoffs based on a fixed strike.
const std::vector< Size > seconds_
const std::vector< Size > & seconds() const
std::vector< Time > exerciseTimes(const DayCounter &dc, const Date &refDate) const
Real operator()(Real price) const override
void accept(AcyclicVisitor &) override
VanillaForwardPayoff(Option::Type type, Real strike)
std::string name() const override
ext::shared_ptr< SwingExercise > exercise
ext::shared_ptr< StrikedTypePayoff > payoff
void validate() const override
const Size minExerciseRights_
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
const Size maxExerciseRights_
VanillaSwingOption(const ext::shared_ptr< Payoff > &payoff, const ext::shared_ptr< SwingExercise > &ex, Size minExerciseRights, Size maxExerciseRights)
Option exercise classes and payoff function.
std::size_t Size
size of a container
Option on a single asset.
Payoffs for various options.