QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
cvaswapengine.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2015 Jose Aparicio
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20#ifndef quantlib_cva_swap_engine_hpp
21#define quantlib_cva_swap_engine_hpp
22
23#include <ql/handle.hpp>
24#include <ql/instruments/vanillaswap.hpp>
25#include <ql/termstructures/defaulttermstructure.hpp>
26
27namespace QuantLib {
28
29 class YieldTermStructure;
30 class Quote;
31
50 public:
52
53
66 const Handle<YieldTermStructure>& discountCurve,
67 const Handle<PricingEngine>& swaptionEngine,
69 Real ctptyRecoveryRate,
72 Real invstRecoveryRate = 0.999);
85 Volatility blackVol,
87 Real ctptyRecoveryRate,
90 Real invstRecoveryRate = 0.999);
103 const Handle<YieldTermStructure>& discountCurve,
104 const Handle<Quote>& blackVol,
106 Real ctptyRecoveryRate,
109 Real invstRecoveryRate = 0.999);
111 void calculate() const override;
112
113 private:
121 };
122
123}
124
125#endif
Handle< YieldTermStructure > discountCurve_
Handle< PricingEngine > swaptionletEngine_
Handle< DefaultProbabilityTermStructure > invstDTS_
Handle< PricingEngine > baseSwapEngine_
Handle< DefaultProbabilityTermStructure > defaultTS_
Shared handle to an observable.
Definition: handle.hpp:41
QL_REAL Real
real number
Definition: types.hpp:50
Real Volatility
volatility
Definition: types.hpp:78
Definition: any.hpp:35