25#ifndef quantlib_forward_performance_engine_hpp
26#define quantlib_forward_performance_engine_hpp
28#include <ql/pricingengines/forward/forwardengine.hpp>
41 template <
class Engine>
46 const ext::shared_ptr<GeneralizedBlackScholesProcess>&);
56 template <
class Engine>
58 const ext::shared_ptr<GeneralizedBlackScholesProcess>& process)
61 template <
class Engine>
64 this->originalEngine_->calculate();
68 template <
class Engine>
71 DayCounter rfdc = this->process_->riskFreeRate()->dayCounter();
73 this->process_->riskFreeRate()->referenceDate(),
74 this->arguments_.resetDate);
76 this->arguments_.resetDate);
78 discR /= this->process_->stateVariable()->value();
80 Real temp = this->originalResults_->value;
81 this->results_.
value = discR * temp;
82 this->results_.delta = 0.0;
83 this->results_.gamma = 0.0;
84 this->results_.theta = this->process_->riskFreeRate()->
86 * this->results_.
value;
87 this->results_.vega = discR * this->originalResults_->vega;
88 this->results_.rho = - resetTime * this->results_.
value +
89 discR * this->originalResults_->rho;
90 this->results_.dividendRho = discR * this->originalResults_->dividendRho;
Time yearFraction(const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
Forward engine for vanilla options
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates