QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
experimental
credit
midpointcdoengine.hpp
Go to the documentation of this file.
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
Copyright (C) 2008 Roland Lichters
5
Copyright (C) 2009, 2014 Jose Aparicio
6
7
This file is part of QuantLib, a free-software/open-source library
8
for financial quantitative analysts and developers - http://quantlib.org/
9
10
QuantLib is free software: you can redistribute it and/or modify it
11
under the terms of the QuantLib license. You should have received a
12
copy of the license along with this program; if not, please email
13
<quantlib-dev@lists.sf.net>. The license is also available online at
14
<http://quantlib.org/license.shtml>.
15
16
This program is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
FOR A PARTICULAR PURPOSE. See the license for more details.
19
*/
20
21
#ifndef quantlib_midpoint_cdo_engine_hpp
22
#define quantlib_midpoint_cdo_engine_hpp
23
24
#include <
ql/qldefines.hpp
>
25
26
#ifndef QL_PATCH_SOLARIS
27
28
#include <
ql/experimental/credit/syntheticcdo.hpp
>
29
# include <utility>
30
31
namespace
QuantLib
{
32
33
class
YieldTermStructure;
34
35
//! CDO base engine taking schedule steps
36
37
/* The engine obtains the cdo reference basket from its arguments and it
38
is expecting it to have a default model assigned.
39
*/
40
/* FIX ME: ASSUMES basket->expectedTrancheLoss(endDate) includes past
41
realized losses (between cdo inception and calculation time) .... what if
42
basket inception is not the same as CDO's ?????
43
44
\todo non tested under realized defaults. JTD metrics might be invalid
45
*/
46
class
MidPointCDOEngine
:
public
SyntheticCDO::engine
{
47
public
:
48
explicit
MidPointCDOEngine
(
Handle<YieldTermStructure>
discountCurve)
49
:
discountCurve_
(
std
::move(discountCurve)) {}
50
void
calculate
()
const override
;
51
52
protected
:
53
Handle<YieldTermStructure>
discountCurve_
;
54
};
55
56
}
57
58
#endif
59
60
#endif
QuantLib::Handle
Shared handle to an observable.
Definition:
handle.hpp:41
QuantLib::MidPointCDOEngine
CDO base engine taking schedule steps.
Definition:
midpointcdoengine.hpp:46
QuantLib::MidPointCDOEngine::discountCurve_
Handle< YieldTermStructure > discountCurve_
Definition:
midpointcdoengine.hpp:53
QuantLib::MidPointCDOEngine::calculate
void calculate() const override
Definition:
midpointcdoengine.cpp:30
QuantLib::MidPointCDOEngine::MidPointCDOEngine
MidPointCDOEngine(Handle< YieldTermStructure > discountCurve)
Definition:
midpointcdoengine.hpp:48
QuantLib::SyntheticCDO::engine
CDO base engine.
Definition:
syntheticcdo.hpp:227
QuantLib
Definition:
any.hpp:35
std
STL namespace.
qldefines.hpp
Global definitions and compiler switches.
syntheticcdo.hpp
Synthetic Collateralized Debt Obligation and pricing engines.
Generated by
Doxygen
1.9.5