2323#include < qle/cashflows/overnightindexedcoupon.hpp>
2424#include < qle/cashflows/subperiodscoupon.hpp>
2525#include < qle/instruments/rebatedexercise.hpp>
26+ #include < qle/models/lgmconvolutionsolver2.hpp>
27+ #include < qle/models/lgmfdsolver.hpp>
28+ #include < qle/models/lgmvectorised.hpp>
2629
2730#include < ql/cashflows/averagebmacoupon.hpp>
2831#include < ql/cashflows/capflooredcoupon.hpp>
@@ -371,6 +374,17 @@ NumericLgmMultiLegOptionEngine::NumericLgmMultiLegOptionEngine(const boost::shar
371374 registerWith (discountCurve_);
372375}
373376
377+ NumericLgmMultiLegOptionEngine::NumericLgmMultiLegOptionEngine (const boost::shared_ptr<LinearGaussMarkovModel>& model,
378+ const Real maxTime, const Size stateGridPoints,
379+ const Size timeStepsPerYear, const Real mesherEpsilon,
380+ const Handle<YieldTermStructure>& discountCurve)
381+ : NumericLgmMultiLegOptionEngineBase(
382+ boost::make_shared<LgmFdSolver>(model, maxTime, stateGridPoints, timeStepsPerYear, mesherEpsilon),
383+ discountCurve) {
384+ registerWith (solver_->model ());
385+ registerWith (discountCurve_);
386+ }
387+
374388void NumericLgmMultiLegOptionEngine::calculate () const {
375389 legs_ = arguments_.legs ;
376390 payer_ = arguments_.payer ;
@@ -396,6 +410,17 @@ NumericLgmSwaptionEngine::NumericLgmSwaptionEngine(const boost::shared_ptr<Linea
396410 registerWith (discountCurve_);
397411}
398412
413+ NumericLgmSwaptionEngine::NumericLgmSwaptionEngine (const boost::shared_ptr<LinearGaussMarkovModel>& model,
414+ const Real maxTime, const Size stateGridPoints,
415+ const Size timeStepsPerYear, const Real mesherEpsilon,
416+ const Handle<YieldTermStructure>& discountCurve)
417+ : NumericLgmMultiLegOptionEngineBase(
418+ boost::make_shared<LgmFdSolver>(model, maxTime, stateGridPoints, timeStepsPerYear, mesherEpsilon),
419+ discountCurve) {
420+ registerWith (solver_->model ());
421+ registerWith (discountCurve_);
422+ }
423+
399424void NumericLgmSwaptionEngine::calculate () const {
400425 legs_ = arguments_.legs ;
401426 payer_ = arguments_.payer ;
@@ -420,6 +445,16 @@ NumericLgmNonstandardSwaptionEngine::NumericLgmNonstandardSwaptionEngine(
420445 registerWith (discountCurve_);
421446}
422447
448+ NumericLgmNonstandardSwaptionEngine::NumericLgmNonstandardSwaptionEngine (
449+ const boost::shared_ptr<LinearGaussMarkovModel>& model, const Real maxTime, const Size stateGridPoints,
450+ const Size timeStepsPerYear, const Real mesherEpsilon, const Handle<YieldTermStructure>& discountCurve)
451+ : NumericLgmMultiLegOptionEngineBase(
452+ boost::make_shared<LgmFdSolver>(model, maxTime, stateGridPoints, timeStepsPerYear, mesherEpsilon),
453+ discountCurve) {
454+ registerWith (solver_->model ());
455+ registerWith (discountCurve_);
456+ }
457+
423458void NumericLgmNonstandardSwaptionEngine::calculate () const {
424459 legs_ = arguments_.legs ;
425460 payer_ = arguments_.payer ;
0 commit comments