Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
mclgmswapengine.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file mclgmswapengine.hpp
20 \brief MC LGM swap engines
21 \ingroup engines
22*/
23
24#pragma once
25
27
28#include <ql/instruments/swap.hpp>
29
30namespace QuantExt {
31
32class McLgmSwapEngine : public GenericEngine<QuantLib::Swap::arguments, QuantLib::Swap::results>,
34public:
35 McLgmSwapEngine(const QuantLib::ext::shared_ptr<LinearGaussMarkovModel>& model, const SequenceType calibrationPathGenerator,
36 const SequenceType pricingPathGenerator, const Size calibrationSamples, const Size pricingSamples,
37 const Size calibrationSeed, const Size pricingSeed, const Size polynomOrder,
38 const LsmBasisSystem::PolynomialType polynomType,
39 const SobolBrownianGenerator::Ordering ordering = SobolBrownianGenerator::Steps,
40 const SobolRsg::DirectionIntegers directionIntegers = SobolRsg::JoeKuoD7,
41 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
42 const std::vector<Date> simulationDates = std::vector<Date>(),
43 const std::vector<Size> externalModelIndices = std::vector<Size>(),
44 const bool minimalObsDate = true, const RegressorModel regressorModel = RegressorModel::Simple,
45 const Real regressionVarianceCutoff = Null<Real>())
46 : GenericEngine<QuantLib::Swap::arguments, QuantLib::Swap::results>(),
48 std::vector<QuantLib::ext::shared_ptr<IrModel>>(1, model),
49 std::vector<QuantLib::ext::shared_ptr<FxBsParametrization>>())),
50 calibrationPathGenerator, pricingPathGenerator, calibrationSamples, pricingSamples,
51 calibrationSeed, pricingSeed, polynomOrder, polynomType, ordering, directionIntegers,
52 {discountCurve}, simulationDates, externalModelIndices, minimalObsDate, regressorModel,
53 regressionVarianceCutoff) {
54 registerWith(model);
55 }
56
57 void calculate() const override;
58};
59
60} // namespace QuantExt
FX Black Scholes parametrizations.
McLgmSwapEngine(const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model, const SequenceType calibrationPathGenerator, const SequenceType pricingPathGenerator, const Size calibrationSamples, const Size pricingSamples, const Size calibrationSeed, const Size pricingSeed, const Size polynomOrder, const LsmBasisSystem::PolynomialType polynomType, const SobolBrownianGenerator::Ordering ordering=SobolBrownianGenerator::Steps, const SobolRsg::DirectionIntegers directionIntegers=SobolRsg::JoeKuoD7, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const std::vector< Date > simulationDates=std::vector< Date >(), const std::vector< Size > externalModelIndices=std::vector< Size >(), const bool minimalObsDate=true, const RegressorModel regressorModel=RegressorModel::Simple, const Real regressionVarianceCutoff=Null< Real >())
void calculate() const override
base MC engine for multileg (option) instruments