24#ifndef quantlib_vanilla_storage_option_hpp
25#define quantlib_vanilla_storage_option_hpp
63 "positive capacity, load and change rate required");
65 "illegal values load of changeRate");
81 = ext::dynamic_pointer_cast<NullPayoff>(
payoff_);
83 = ext::dynamic_pointer_cast<BermudanExercise>(
exercise_);
virtual bool hasOccurred(const Date &refDate=Date(), ext::optional< bool > includeRefDate=ext::nullopt) const
returns true if an event has already occurred before a date
Base class for options on a single asset.
ext::shared_ptr< Payoff > payoff_
ext::shared_ptr< Exercise > exercise_
Abstract base class for option payoffs.
ext::shared_ptr< BermudanExercise > exercise
void validate() const override
ext::shared_ptr< NullPayoff > payoff
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
VanillaStorageOption(const ext::shared_ptr< BermudanExercise > &ex, Real capacity, Real load, Real changeRate)
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Base class for events associated with a given date.
Option exercise classes and payoff function.
Option on a single asset.
Payoffs for various options.