Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
mcmultilegoptionengine.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 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 mcmultilegoptionengine.hpp
20 \brief MC engine for multi leg option instrument
21*/
22
23#pragma once
24
26
30
31#include <ql/methods/montecarlo/lsmbasissystem.hpp>
32
33namespace QuantExt {
34
36 : public McMultiLegBaseEngine,
37 public GenericEngine<QuantExt::MultiLegOption::arguments, QuantExt::MultiLegOption::results> {
38
39public:
41 const Handle<CrossAssetModel>& model, const SequenceType calibrationPathGenerator,
42 const SequenceType pricingPathGenerator, const Size calibrationSamples, const Size pricingSamples,
43 const Size calibrationSeed, const Size pricingSeed, const Size polynomOrder,
44 const LsmBasisSystem::PolynomialType polynomType,
45 const SobolBrownianGenerator::Ordering ordering = SobolBrownianGenerator::Steps,
46 const SobolRsg::DirectionIntegers directionIntegers = SobolRsg::JoeKuoD7,
47 const std::vector<Handle<YieldTermStructure>>& discountCurves = std::vector<Handle<YieldTermStructure>>(),
48 const std::vector<Date>& simulationDates = std::vector<Date>(),
49 const std::vector<Size>& externalModelIndices = std::vector<Size>(), const bool minimalObsDate = true,
50 const RegressorModel regressorModel = RegressorModel::Simple,
51 const Real regressionVarianceCutoff = Null<Real>());
52 McMultiLegOptionEngine(const QuantLib::ext::shared_ptr<LinearGaussMarkovModel>& model,
53 const SequenceType calibrationPathGenerator, const SequenceType pricingPathGenerator,
54 const Size calibrationSamples, const Size pricingSamples, const Size calibrationSeed,
55 const Size pricingSeed, const Size polynomOrder,
56 const LsmBasisSystem::PolynomialType polynomType,
57 const SobolBrownianGenerator::Ordering ordering = SobolBrownianGenerator::Steps,
58 const SobolRsg::DirectionIntegers directionIntegers = SobolRsg::JoeKuoD7,
59 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
60 const std::vector<Date>& simulationDates = std::vector<Date>(),
61 const std::vector<Size>& externalModelIndices = std::vector<Size>(),
62 const bool minimalObsDate = true,
63 const RegressorModel regressorModel = RegressorModel::Simple,
64 const Real regressionVarianceCutoff = Null<Real>());
65
66 void calculate() const override;
67 const Handle<CrossAssetModel>& model() const { return model_; }
68};
69
70} // namespace QuantExt
Handle< CrossAssetModel > model_
const Handle< CrossAssetModel > & model() const
cross asset model
base MC engine for multileg (option) instruments
multi leg option instrument
base class for multi path generators