Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
numericlgmbgsflexiswapengine.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 qle/pricingengines/numericlgmbgsflexiswapengine.hpp
20 \brief numeric engine for balance guaranteed swaps using a flexi swap proxy in the LGM model
21*/
22
23#pragma once
24
27
28namespace QuantExt {
29
30//! Numerical engine for balance guaranteed swaps using a flexi swap proxy in the LGM model
31/*! Two notional schedules are constructed using a simple prepayment model with rates minCpr and
32 maxCpr. These two schedules define a lower / upper notional bounds of a flexi swap. The NPV of this
33 flexi swap is by definition the NPV of the BGS itself.
34
35 The prepayment model assumes that prepayments amortise the tranches in the order of their seniority.
36
37 Notice that prepayments start in the first period of the tranche nominal schedule that has a start date
38 that lies in the future. Therefore the tranche notionals in the BGS should contain past (known) prepayments
39 already, only for future periods the notionals should be given under a zero CPR assumption.
40*/
41
43 : public GenericEngine<BalanceGuaranteedSwap::arguments, BalanceGuaranteedSwap::results>,
45public:
46 NumericLgmBgsFlexiSwapEngine(const QuantLib::ext::shared_ptr<LinearGaussMarkovModel>& model, const Real sy, const Size ny,
47 const Real sx, const Size nx, const Handle<Quote>& minCpr, const Handle<Quote>& maxCpr,
48 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
49 const Method method = Method::Automatic, const Real singleSwaptionThreshold = 20.0);
50
51private:
52 void calculate() const override;
53 const Handle<Quote> minCpr_, maxCpr_;
54
55}; // NumericLgmBgsFlexiSwapEngine
56
57} // namespace QuantExt
Balance Guaranteed Swap instrument.
const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > & model() const
Numerical engine for balance guaranteed swaps using a flexi swap proxy in the LGM model.
Numerical engine for flexi swaps in the LGM model.
numeric engine for flexi swaps in the LGM model
JY INF index sigma component.