21#include <ql/exercise.hpp>
22#include <ql/pricingengines/lookback/analyticcontinuousfixedlookback.hpp>
28 ext::shared_ptr<GeneralizedBlackScholesProcess> process)
29 : process_(
std::move(process)) {
35 ext::shared_ptr<PlainVanillaPayoff> payoff =
36 ext::dynamic_pointer_cast<PlainVanillaPayoff>(
arguments_.payoff);
37 QL_REQUIRE(payoff,
"Non-plain payoff given");
39 QL_REQUIRE(
process_->x0() > 0.0,
"negative or null underlying");
43 switch (payoff->optionType()) {
45 QL_REQUIRE(payoff->strike()>=0.0,
46 "Strike must be positive or null");
53 QL_REQUIRE(payoff->strike()>0.0,
54 "Strike must be positive");
61 QL_FAIL(
"Unknown type");
71 ext::shared_ptr<PlainVanillaPayoff> payoff =
72 ext::dynamic_pointer_cast<PlainVanillaPayoff>(
arguments_.payoff);
73 QL_REQUIRE(payoff,
"Non-plain payoff given");
74 return payoff->strike();
123 Real powss = std::pow(ss, -lambda);
141 Real powss = std::pow(ss, -lambda);
CumulativeNormalDistribution f_
Time residualTime() const
Volatility volatility() const
DiscountFactor dividendDiscount() const
void calculate() const override
AnalyticContinuousFixedLookbackEngine(ext::shared_ptr< GeneralizedBlackScholesProcess > process)
Real stdDeviation() const
Rate riskFreeRate() const
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Rate dividendYield() const
DiscountFactor riskFreeDiscount() const
ContinuousFixedLookbackOption::results results_
ContinuousFixedLookbackOption::arguments arguments_
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Real DiscountFactor
discount factor between dates
Real Volatility
volatility