112
112
VanillaOptionPtr(
113
const boost::shared_ptr<StochasticProcess>& process,
114
113
const boost::shared_ptr<Payoff>& payoff,
115
const boost::shared_ptr<Exercise>& exercise,
116
const boost::shared_ptr<PricingEngine>& engine
117
= boost::shared_ptr<PricingEngine>()) {
114
const boost::shared_ptr<Exercise>& exercise) {
118
115
boost::shared_ptr<StrikedTypePayoff> stPayoff =
119
116
boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
120
117
QL_REQUIRE(stPayoff, "wrong payoff given");
121
return new VanillaOptionPtr(
122
new VanillaOption(process,stPayoff,exercise,engine));
118
return new VanillaOptionPtr(new VanillaOption(stPayoff,exercise));
125
121
return boost::dynamic_pointer_cast<VanillaOption>(*self)->delta();
152
148
return boost::dynamic_pointer_cast<VanillaOption>(*self)
153
149
->result<SampledCurve>("priceCurve");
155
Volatility impliedVolatility(Real targetValue,
156
Real accuracy = 1.0e-4,
157
Size maxEvaluations = 100,
158
Volatility minVol = 1.0e-4,
159
Volatility maxVol = 4.0) {
151
Volatility impliedVolatility(
153
const GeneralizedBlackScholesProcessPtr& process,
154
Real accuracy = 1.0e-4,
155
Size maxEvaluations = 100,
156
Volatility minVol = 1.0e-4,
157
Volatility maxVol = 4.0) {
158
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
159
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
161
QL_REQUIRE(bsProcess, "Black-Scholes process required");
160
162
return boost::dynamic_pointer_cast<VanillaOption>(*self)
161
->impliedVolatility(targetValue,accuracy,maxEvaluations,
163
->impliedVolatility(targetValue, bsProcess, accuracy,
164
maxEvaluations, minVol, maxVol);
178
180
EuropeanOptionPtr(
179
const boost::shared_ptr<StochasticProcess>& process,
180
181
const boost::shared_ptr<Payoff>& payoff,
181
const boost::shared_ptr<Exercise>& exercise,
182
const boost::shared_ptr<PricingEngine>& engine
183
= boost::shared_ptr<PricingEngine>()) {
182
const boost::shared_ptr<Exercise>& exercise) {
184
183
boost::shared_ptr<StrikedTypePayoff> stPayoff =
185
184
boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
186
185
QL_REQUIRE(stPayoff, "wrong payoff given");
187
return new EuropeanOptionPtr(
188
new EuropeanOption(process,stPayoff,exercise,engine));
186
return new EuropeanOptionPtr(new EuropeanOption(stPayoff,exercise));
204
202
ForwardVanillaOptionPtr(
207
const boost::shared_ptr<StochasticProcess>& process,
208
205
const boost::shared_ptr<Payoff>& payoff,
209
const boost::shared_ptr<Exercise>& exercise,
210
const boost::shared_ptr<PricingEngine>& engine
211
= boost::shared_ptr<PricingEngine>()) {
206
const boost::shared_ptr<Exercise>& exercise) {
212
207
boost::shared_ptr<StrikedTypePayoff> stPayoff =
213
208
boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
214
209
QL_REQUIRE(stPayoff, "wrong payoff given");
215
210
return new ForwardVanillaOptionPtr(
216
new ForwardVanillaOption(moneyness, resetDate, process,
217
stPayoff, exercise, engine));
211
new ForwardVanillaOption(moneyness, resetDate,
212
stPayoff, exercise));
233
228
QuantoVanillaOptionPtr(
234
const Handle<YieldTermStructure>& foreignRiskFreeTS,
235
const Handle<BlackVolTermStructure>& exchRateVolTS,
236
const Handle<Quote>& correlation,
237
const boost::shared_ptr<StochasticProcess>& process,
238
229
const boost::shared_ptr<Payoff>& payoff,
239
const boost::shared_ptr<Exercise>& exercise,
240
const boost::shared_ptr<PricingEngine>& engine
241
= boost::shared_ptr<PricingEngine>()) {
230
const boost::shared_ptr<Exercise>& exercise) {
242
231
boost::shared_ptr<StrikedTypePayoff> stPayoff =
243
232
boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
244
233
QL_REQUIRE(stPayoff, "wrong payoff given");
245
234
return new QuantoVanillaOptionPtr(
246
new QuantoVanillaOption(foreignRiskFreeTS,
235
new QuantoVanillaOption(stPayoff, exercise));
255
238
return boost::dynamic_pointer_cast<QuantoVanillaOption>(*self)
278
261
QuantoForwardVanillaOptionPtr(
279
const Handle<YieldTermStructure>& foreignRiskFreeTS,
280
const Handle<BlackVolTermStructure>& exchRateVolTS,
281
const Handle<Quote>& correlation,
284
const boost::shared_ptr<StochasticProcess>& process,
285
264
const boost::shared_ptr<Payoff>& payoff,
286
const boost::shared_ptr<Exercise>& exercise,
287
const boost::shared_ptr<PricingEngine>& engine
288
= boost::shared_ptr<PricingEngine>()) {
265
const boost::shared_ptr<Exercise>& exercise) {
289
266
boost::shared_ptr<StrikedTypePayoff> stPayoff =
290
267
boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
291
268
QL_REQUIRE(stPayoff, "wrong payoff given");
292
269
return new QuantoForwardVanillaOptionPtr(
293
new QuantoForwardVanillaOption(foreignRiskFreeTS,
270
new QuantoForwardVanillaOption(moneyness, resetDate,
271
stPayoff, exercise));
362
338
class IntegralEnginePtr : public boost::shared_ptr<PricingEngine> {
365
IntegralEnginePtr() {
366
return new IntegralEnginePtr(new IntegralEngine);
341
IntegralEnginePtr(const GeneralizedBlackScholesProcessPtr& process) {
342
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
343
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
345
QL_REQUIRE(bsProcess, "Black-Scholes process required");
346
return new IntegralEnginePtr(new IntegralEngine(bsProcess));
353
using QuantLib::FDBermudanEngine;
354
typedef boost::shared_ptr<PricingEngine> FDBermudanEnginePtr;
357
%rename(FDBermudanEngine) FDBermudanEnginePtr;
358
class FDBermudanEnginePtr : public boost::shared_ptr<PricingEngine> {
361
FDBermudanEnginePtr(const GeneralizedBlackScholesProcessPtr& process,
362
Size timeSteps = 100, Size gridPoints = 100,
363
bool timeDependent = false) {
364
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
365
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
367
QL_REQUIRE(bsProcess, "Black-Scholes process required");
368
return new FDBermudanEnginePtr(
369
new FDBermudanEngine(bsProcess,timeSteps,
370
gridPoints,timeDependent));
373
376
using QuantLib::FDEuropeanEngine;
378
381
class FDEuropeanEnginePtr : public boost::shared_ptr<PricingEngine> {
381
FDEuropeanEnginePtr(Size timeSteps = 100, Size gridPoints = 100,
384
FDEuropeanEnginePtr(const GeneralizedBlackScholesProcessPtr& process,
385
Size timeSteps = 100, Size gridPoints = 100,
382
386
bool timeDependent = false) {
387
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
388
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
390
QL_REQUIRE(bsProcess, "Black-Scholes process required");
383
391
return new FDEuropeanEnginePtr(
384
new FDEuropeanEngine(timeSteps,gridPoints,timeDependent));
392
new FDEuropeanEngine(bsProcess,timeSteps,
393
gridPoints,timeDependent));
401
411
class BinomialVanillaEnginePtr : public boost::shared_ptr<PricingEngine> {
404
BinomialVanillaEnginePtr(const std::string& type,
406
// std::string s = QuantLib::lowercase(type);
407
std::string s = type;
414
BinomialVanillaEnginePtr(
415
const GeneralizedBlackScholesProcessPtr& process,
416
const std::string& type,
418
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
419
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
421
QL_REQUIRE(bsProcess, "Black-Scholes process required");
422
std::string s = boost::algorithm::to_lower_copy(type);
408
423
if (s == "crr" || s == "coxrossrubinstein")
409
424
return new BinomialVanillaEnginePtr(
410
new BinomialVanillaEngine<CoxRossRubinstein>(steps));
425
new BinomialVanillaEngine<CoxRossRubinstein>(
411
427
else if (s == "jr" || s == "jarrowrudd")
412
428
return new BinomialVanillaEnginePtr(
413
new BinomialVanillaEngine<JarrowRudd>(steps));
429
new BinomialVanillaEngine<JarrowRudd>(bsProcess,steps));
430
else if (s == "eqp" || s == "additiveeqpbinomialtree")
415
431
return new BinomialVanillaEnginePtr(
416
new BinomialVanillaEngine<AdditiveEQPBinomialTree>(steps));
432
new BinomialVanillaEngine<AdditiveEQPBinomialTree>(
417
434
else if (s == "trigeorgis")
418
435
return new BinomialVanillaEnginePtr(
419
new BinomialVanillaEngine<Trigeorgis>(steps));
436
new BinomialVanillaEngine<Trigeorgis>(bsProcess,steps));
420
437
else if (s == "tian")
421
438
return new BinomialVanillaEnginePtr(
422
new BinomialVanillaEngine<Tian>(steps));
439
new BinomialVanillaEngine<Tian>(bsProcess,steps));
423
440
else if (s == "lr" || s == "leisenreimer")
424
441
return new BinomialVanillaEnginePtr(
425
new BinomialVanillaEngine<LeisenReimer>(steps));
442
new BinomialVanillaEngine<LeisenReimer>(bsProcess,steps));
443
else if (s == "j4" || s == "joshi4")
444
return new BinomialVanillaEnginePtr(
445
new BinomialVanillaEngine<Joshi4>(bsProcess,steps));
427
447
QL_FAIL("unknown binomial engine type: "+s);
452
473
doubleOrNull requiredTolerance = Null<Real>(),
453
474
intOrNull maxSamples = Null<Size>(),
454
475
BigInteger seed = 0) {
455
// std::string s = QuantLib::lowercase(traits);
456
std::string s = traits;
476
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
477
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
479
QL_REQUIRE(bsProcess, "Black-Scholes process required");
480
std::string s = boost::algorithm::to_lower_copy(traits);
457
481
QL_REQUIRE(Size(timeSteps) != Null<Size>() ||
458
482
Size(timeStepsPerYear) != Null<Size>(),
459
483
"number of steps not specified");
460
484
if (s == "pseudorandom" || s == "pr")
461
485
return new MCEuropeanEnginePtr(
462
new MCEuropeanEngine<PseudoRandom>(timeSteps,
486
new MCEuropeanEngine<PseudoRandom>(bsProcess,
463
488
timeStepsPerYear,
465
490
antitheticVariate,
499
525
class FDAmericanEnginePtr : public boost::shared_ptr<PricingEngine> {
502
FDAmericanEnginePtr(Size timeSteps = 100, Size gridPoints = 100,
528
FDAmericanEnginePtr(const GeneralizedBlackScholesProcessPtr& process,
529
Size timeSteps = 100, Size gridPoints = 100,
503
530
bool timeDependent = false) {
531
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
532
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
534
QL_REQUIRE(bsProcess, "Black-Scholes process required");
504
535
return new FDAmericanEnginePtr(
505
new FDAmericanEngine(timeSteps,gridPoints,timeDependent));
536
new FDAmericanEngine(bsProcess,timeSteps,
537
gridPoints,timeDependent));
511
543
class FDShoutEnginePtr : public boost::shared_ptr<PricingEngine> {
514
FDShoutEnginePtr(Size timeSteps = 100, Size gridPoints = 100,
546
FDShoutEnginePtr(const GeneralizedBlackScholesProcessPtr& process,
547
Size timeSteps = 100, Size gridPoints = 100,
515
548
bool timeDependent = false) {
549
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
550
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
552
QL_REQUIRE(bsProcess, "Black-Scholes process required");
516
553
return new FDShoutEnginePtr(
517
new FDShoutEngine(timeSteps,gridPoints,timeDependent));
554
new FDShoutEngine(bsProcess,timeSteps,
555
gridPoints,timeDependent));
594
647
DividendVanillaOptionPtr(
595
const boost::shared_ptr<StochasticProcess>& process,
596
648
const boost::shared_ptr<Payoff>& payoff,
597
649
const boost::shared_ptr<Exercise>& exercise,
598
650
const std::vector<Date>& dividendDates,
599
const std::vector<Real>& dividends,
600
const boost::shared_ptr<PricingEngine>& engine
601
= boost::shared_ptr<PricingEngine>()) {
651
const std::vector<Real>& dividends) {
602
652
boost::shared_ptr<StrikedTypePayoff> stPayoff =
603
653
boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
604
654
QL_REQUIRE(stPayoff, "wrong payoff given");
605
655
return new DividendVanillaOptionPtr(
606
new DividendVanillaOption(process,stPayoff,exercise,
607
dividendDates,dividends,engine));
656
new DividendVanillaOption(stPayoff,exercise,
657
dividendDates,dividends));
610
660
return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)
638
688
return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)
639
689
->result<SampledCurve>("priceCurve");
641
Volatility impliedVolatility(Real targetValue,
642
Real accuracy = 1.0e-4,
643
Size maxEvaluations = 100,
644
Volatility minVol = 1.0e-4,
645
Volatility maxVol = 4.0) {
691
Volatility impliedVolatility(
693
const GeneralizedBlackScholesProcessPtr& process,
694
Real accuracy = 1.0e-4,
695
Size maxEvaluations = 100,
696
Volatility minVol = 1.0e-4,
697
Volatility maxVol = 4.0) {
698
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
699
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
701
QL_REQUIRE(bsProcess, "Black-Scholes process required");
646
702
return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)
647
->impliedVolatility(targetValue,accuracy,maxEvaluations,
703
->impliedVolatility(targetValue, bsProcess, accuracy,
704
maxEvaluations, minVol, maxVol);
679
740
: public boost::shared_ptr<PricingEngine> {
682
FDDividendEuropeanEnginePtr(Size timeSteps = 100,
683
Size gridPoints = 100,
684
bool timeDependent = false) {
743
FDDividendEuropeanEnginePtr(
744
const GeneralizedBlackScholesProcessPtr& process,
745
Size timeSteps = 100,
746
Size gridPoints = 100,
747
bool timeDependent = false) {
748
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
749
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
751
QL_REQUIRE(bsProcess, "Black-Scholes process required");
685
752
return new FDDividendEuropeanEnginePtr(
686
new FDDividendEuropeanEngine(timeSteps,gridPoints,
753
new FDDividendEuropeanEngine(bsProcess,timeSteps,
754
gridPoints, timeDependent));
694
761
: public boost::shared_ptr<PricingEngine> {
697
FDDividendAmericanEnginePtr(Size timeSteps = 100,
698
Size gridPoints = 100,
699
bool timeDependent = false) {
764
FDDividendAmericanEnginePtr(
765
const GeneralizedBlackScholesProcessPtr& process,
766
Size timeSteps = 100,
767
Size gridPoints = 100,
768
bool timeDependent = false) {
769
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
770
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
772
QL_REQUIRE(bsProcess, "Black-Scholes process required");
700
773
return new FDDividendAmericanEnginePtr(
701
new FDDividendAmericanEngine(timeSteps,gridPoints,
774
new FDDividendAmericanEngine(bsProcess,timeSteps,
775
gridPoints, timeDependent));
724
797
Barrier::Type barrierType,
727
const boost::shared_ptr<StochasticProcess>& process,
728
800
const boost::shared_ptr<Payoff>& payoff,
729
const boost::shared_ptr<Exercise>& exercise,
730
const boost::shared_ptr<PricingEngine>& engine
731
= boost::shared_ptr<PricingEngine>()) {
801
const boost::shared_ptr<Exercise>& exercise) {
732
802
boost::shared_ptr<StrikedTypePayoff> stPayoff =
733
803
boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
734
804
QL_REQUIRE(stPayoff, "wrong payoff given");
735
805
return new BarrierOptionPtr(
736
new BarrierOption(barrierType, barrier, rebate,
737
process,stPayoff,exercise,engine));
806
new BarrierOption(barrierType, barrier, rebate,
740
810
return boost::dynamic_pointer_cast<BarrierOption>(*self)->delta();
763
833
return boost::dynamic_pointer_cast<BarrierOption>(*self)
764
834
->result<SampledCurve>("priceCurve");
766
Volatility impliedVolatility(Real targetValue,
767
Real accuracy = 1.0e-4,
768
Size maxEvaluations = 100,
769
Volatility minVol = 1.0e-4,
770
Volatility maxVol = 4.0) {
836
Volatility impliedVolatility(
838
const GeneralizedBlackScholesProcessPtr& process,
839
Real accuracy = 1.0e-4,
840
Size maxEvaluations = 100,
841
Volatility minVol = 1.0e-4,
842
Volatility maxVol = 4.0) {
843
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
844
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
846
QL_REQUIRE(bsProcess, "Black-Scholes process required");
771
847
return boost::dynamic_pointer_cast<BarrierOption>(*self)
772
->impliedVolatility(targetValue,accuracy,maxEvaluations,
848
->impliedVolatility(targetValue, bsProcess, accuracy,
849
maxEvaluations, minVol, maxVol);
813
896
intOrNull maxSamples = Null<Size>(),
814
897
bool isBiased = false,
815
898
BigInteger seed = 0) {
816
// std::string s = QuantLib::lowercase(traits);
817
std::string s = traits;
899
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
900
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
902
QL_REQUIRE(bsProcess, "Black-Scholes process required");
903
std::string s = boost::algorithm::to_lower_copy(traits);
818
904
if (s == "pseudorandom" || s == "pr")
819
905
return new MCBarrierEnginePtr(
820
new MCBarrierEngine<PseudoRandom>(timeStepsPerYear,
906
new MCBarrierEngine<PseudoRandom>(bsProcess,
822
909
antitheticVariate,
847
935
using QuantLib::QuantoEngine;
848
using QuantLib::ForwardEngine;
849
typedef boost::shared_ptr<PricingEngine> ForwardVanillaEnginePtr;
850
typedef boost::shared_ptr<PricingEngine> QuantoVanillaEnginePtr;
851
typedef boost::shared_ptr<PricingEngine> QuantoForwardVanillaEnginePtr;
936
using QuantLib::ForwardVanillaEngine;
937
typedef boost::shared_ptr<PricingEngine> ForwardEuropeanEnginePtr;
938
typedef boost::shared_ptr<PricingEngine> QuantoEuropeanEnginePtr;
939
typedef boost::shared_ptr<PricingEngine> QuantoForwardEuropeanEnginePtr;
855
%rename(ForwardVanillaEngine) ForwardVanillaEnginePtr;
856
class ForwardVanillaEnginePtr: public boost::shared_ptr<PricingEngine> {
859
ForwardVanillaEnginePtr(boost::shared_ptr<PricingEngine> engine) {
860
boost::shared_ptr<VanillaOption::engine> uengine =
861
boost::dynamic_pointer_cast<VanillaOption::engine>(engine);
862
return new ForwardVanillaEnginePtr(
863
new ForwardVanillaOption::engine(uengine));
869
%rename(QuantoVanillaEngine) QuantoVanillaEnginePtr;
870
class QuantoVanillaEnginePtr: public boost::shared_ptr<PricingEngine> {
873
QuantoVanillaEnginePtr(boost::shared_ptr<PricingEngine> engine) {
874
boost::shared_ptr<VanillaOption::engine> uengine =
875
boost::dynamic_pointer_cast<VanillaOption::engine>(engine);
876
return new QuantoVanillaEnginePtr(
877
new QuantoVanillaOption::engine(uengine));
882
%rename(QuantoForwardVanillaEngine) QuantoForwardVanillaEnginePtr;
883
class QuantoForwardVanillaEnginePtr: public boost::shared_ptr<PricingEngine> {
943
%rename(ForwardEuropeanEngine) ForwardEuropeanEnginePtr;
944
class ForwardEuropeanEnginePtr: public boost::shared_ptr<PricingEngine> {
947
ForwardEuropeanEnginePtr(
948
const GeneralizedBlackScholesProcessPtr& process) {
949
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
950
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
952
QL_REQUIRE(bsProcess, "Black-Scholes process required");
953
return new ForwardEuropeanEnginePtr(
954
new ForwardVanillaEngine<AnalyticEuropeanEngine>(bsProcess));
960
%rename(QuantoEuropeanEngine) QuantoEuropeanEnginePtr;
961
class QuantoEuropeanEnginePtr: public boost::shared_ptr<PricingEngine> {
964
QuantoEuropeanEnginePtr(
965
const GeneralizedBlackScholesProcessPtr& process,
966
const Handle<YieldTermStructure>& foreignRiskFreeRate,
967
const Handle<BlackVolTermStructure>& exchangeRateVolatility,
968
const Handle<Quote>& correlation) {
969
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
970
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
972
QL_REQUIRE(bsProcess, "Black-Scholes process required");
973
return new QuantoEuropeanEnginePtr(
974
new QuantoEngine<VanillaOption,AnalyticEuropeanEngine>(
977
exchangeRateVolatility,
983
%rename(QuantoForwardEuropeanEngine) QuantoForwardEuropeanEnginePtr;
984
class QuantoForwardEuropeanEnginePtr: public boost::shared_ptr<PricingEngine> {
886
QuantoForwardVanillaEnginePtr(boost::shared_ptr<PricingEngine> engine) {
887
boost::shared_ptr<VanillaOption::engine> vengine =
888
boost::dynamic_pointer_cast<VanillaOption::engine>(vengine);
889
boost::shared_ptr<ForwardVanillaOption::engine>
890
fengine(new ForwardVanillaOption::engine(vengine));
891
return new QuantoForwardVanillaEnginePtr(
892
new QuantoForwardVanillaOption::engine(fengine));
987
QuantoForwardEuropeanEnginePtr(
988
const GeneralizedBlackScholesProcessPtr& process,
989
const Handle<YieldTermStructure>& foreignRiskFreeRate,
990
const Handle<BlackVolTermStructure>& exchangeRateVolatility,
991
const Handle<Quote>& correlation) {
992
boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
993
boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
995
QL_REQUIRE(bsProcess, "Black-Scholes process required");
996
return new QuantoForwardEuropeanEnginePtr(
997
new QuantoEngine<ForwardVanillaOption,AnalyticEuropeanEngine>(
1000
exchangeRateVolatility,