Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
midpointcdoengine.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#ifndef quantext_midpoint_cdo_engine_hpp
20#define quantext_midpoint_cdo_engine_hpp
21
22#include <ql/qldefines.hpp>
23
24#ifndef QL_PATCH_SOLARIS
25
26//#include <ql/experimental/credit/syntheticcdo.hpp>
27#include <ql/termstructures/yieldtermstructure.hpp>
29
30namespace QuantExt {
31using namespace QuantLib;
32
33//! CDO base engine taking schedule steps
34
35/* The engine obtains the cdo reference basket from its arguments and it
36is expecting it to have a default model assigned.
37*/
38/* FIX ME: ASSUMES basket->expectedTrancheLoss(endDate) includes past
39realized losses (between cdo inception and calculation time) .... what if
40basket inception is not the same as CDO's ?????
41
42\todo non tested under realized defaults. JTD metrics might be invalid
43*/
45public:
46 MidPointCDOEngine(const Handle<YieldTermStructure>& discountCurve,
47 boost::optional<bool> includeSettlementDateFlows = boost::none)
48 : discountCurve_(discountCurve), includeSettlementDateFlows_(includeSettlementDateFlows) {
49 registerWith(discountCurve);
50 }
51 void calculate() const override;
52
53protected:
54 Handle<YieldTermStructure> discountCurve_;
55 boost::optional<bool> includeSettlementDateFlows_;
56};
57
58} // namespace QuantExt
59
60#endif
61
62#endif
CDO base engine taking schedule steps.
Handle< YieldTermStructure > discountCurve_
MidPointCDOEngine(const Handle< YieldTermStructure > &discountCurve, boost::optional< bool > includeSettlementDateFlows=boost::none)
boost::optional< bool > includeSettlementDateFlows_
void calculate() const override
Synthetic Collateralized Debt Obligation and pricing engines.