22#include <ql/exercise.hpp>
23#include <ql/instruments/payoffs.hpp>
24#include <ql/math/distributions/normaldistribution.hpp>
25#include <ql/math/solvers1d/brent.hpp>
26#include <ql/quotes/simplequote.hpp>
27#include <ql/termstructures/volatility/equityfx/blackconstantvol.hpp>
28#include <ql/termstructures/yieldtermstructure.hpp>
30#include <boost/make_shared.hpp>
35 const Real strikeReturn,
const Real initialValue1,
const Real initialValue2,
const Real notional,
const Real knockInPrice,
const Real knockOutPrice, QuantLib::ext::shared_ptr<QuantExt::FxIndex> fxIndex1, QuantLib::ext::shared_ptr<QuantExt::FxIndex> fxIndex2 )
36 : exercise_(exercise), optionType_(optionType), strikeReturn_(strikeReturn), initialValue1_(initialValue1), initialValue2_(initialValue2), notional_(notional),
37 knockInPrice_(knockInPrice), knockOutPrice_(knockOutPrice), fxIndex1_(fxIndex1), fxIndex2_(fxIndex2) {}
40 return detail::simple_event(
exercise_->dates().back()).hasOccurred();
48 PricingEngine::arguments* args)
const {
53 QL_REQUIRE(
arguments != 0,
"wrong argument type");
70 QL_REQUIRE(
exercise,
"exercise not set");
74 Instrument::fetchResults(r);