Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
lgmbackwardsolver.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2024 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 lgmbackwardsolver.hpp
20 \brief interface for LGM1F backward solver
21
22 \ingroup engines
23*/
24
25#pragma once
26
28#include <qle/models/lgm.hpp>
29
30namespace QuantExt {
31
32//! Interface for LGM1F backward solver
34public:
35 virtual ~LgmBackwardSolver() {}
36
37 /* get grid size */
38 virtual Size gridSize() const = 0;
39
40 /* get discretised states grid at time t */
41 virtual RandomVariable stateGrid(const Real t) const = 0;
42
43 /* roll back an deflated NPV array from t1 to t0 using the given number of steps or,
44 if the number of steps is not given, an appropriate number of steps which will
45 generally depend on the numerical method that is used. */
46 virtual RandomVariable rollback(const RandomVariable& v, const Real t1, const Real t0,
47 Size steps = Null<Size>()) const = 0;
48
49 /* the underlying model */
50 virtual const QuantLib::ext::shared_ptr<LinearGaussMarkovModel>& model() const = 0;
51};
52
53} // namespace QuantExt
Interface for LGM1F backward solver.
virtual Size gridSize() const =0
virtual RandomVariable stateGrid(const Real t) const =0
virtual const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > & model() const =0
virtual RandomVariable rollback(const RandomVariable &v, const Real t1, const Real t0, Size steps=Null< Size >()) const =0
lgm model class
std::vector< Size > steps