32 class IdenticalPayoff :
public Payoff {
34 std::string name()
const override {
return "IdenticalPayoff"; }
35 std::string description()
const override {
return name(); }
36 Real operator()(
Real price)
const override {
return price; }
44 Real startUpFuel,
Real startUpFixCost,
45 const ext::shared_ptr<SwingExercise>& exercise,
49 pMin_(pMin), pMax_(pMax),
50 tMinUp_(tMinUp), tMinDown_(tMinDown),
51 startUpFuel_(startUpFuel),
52 startUpFixCost_(startUpFixCost),
54 nRunningHours_(nRunningHours) {
56 weigths[0] = 1.0; weigths[1] = -heatRate;
59 ext::shared_ptr<Payoff>(
new IdenticalPayoff()), weigths));
65 "either a start limit or fuel limit is supported");
Basket option on a number of assets.
1-D array used in linear algebra.
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 multiple assets.
void setupArguments(PricingEngine::arguments *) const override
template class providing a null value for a given type.
ext::shared_ptr< Exercise > exercise
ext::shared_ptr< Payoff > payoff_
ext::shared_ptr< Exercise > exercise_
Abstract base class for option payoffs.
void validate() const override
VanillaVPPOption(Real heatRate, Real pMin, Real pMax, Size tMinUp, Size tMinDown, Real startUpFuel, Real startUpFixCost, const ext::shared_ptr< SwingExercise > &exercise, Size nStarts=Null< Size >(), Size nRunningHours=Null< Size >())
void setupArguments(PricingEngine::arguments *) const override
bool isExpired() const override
returns whether the instrument might have value greater than zero.
const Size nRunningHours_
const Real startUpFixCost_
#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.
std::size_t Size
size of a container
vanilla swing option class
vanilla virtual power plant option