Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
convertiblebond.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 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 ored/portfolio/builders/convertiblebond.hpp */
20
21#pragma once
22
26
27#include <ql/time/date.hpp>
28
29#include <boost/make_shared.hpp>
30
31namespace ore {
32namespace data {
34
37 std::string, const std::string&, const std::string&, const std::string&, const bool, const std::string&,
38 const std::string&, const bool, QuantLib::ext::shared_ptr<QuantExt::EquityIndex2>,
39 const QuantLib::ext::shared_ptr<QuantExt::FxIndex>&, const std::string&, const QuantLib::Date&,
40 const QuantLib::Date&> {
41protected:
42 ConvertibleBondEngineBuilder(const std::string& model, const std::string& engine)
43 : CachingEngineBuilder(model, engine, {"ConvertibleBond"}) {}
44
45 std::string keyImpl(const std::string& id, const std::string& ccy, const std::string& creditCurveId,
46 const bool hasCreditRisk, const std::string& securityId, const std::string& referenceCurveId,
47 const bool isExchangeable, QuantLib::ext::shared_ptr<QuantExt::EquityIndex2> equity,
48 const QuantLib::ext::shared_ptr<QuantExt::FxIndex>& fx, const std::string& equityCreditCurveId,
49 const QuantLib::Date& startDate, const QuantLib::Date& maturityDate) override;
50};
51
53public:
55 : ConvertibleBondEngineBuilder("DefaultableEquityJumpDiffusion", "FD") {}
56
57protected:
58 QuantLib::ext::shared_ptr<QuantExt::PricingEngine>
59 engineImpl(const std::string& id, const std::string& ccy, const std::string& creditCurveId,
60 const bool hasCreditRisk, const std::string& securityId, const std::string& referenceCurveId,
61 const bool isExchangeable, QuantLib::ext::shared_ptr<QuantExt::EquityIndex2> equity,
62 const QuantLib::ext::shared_ptr<QuantExt::FxIndex>& fx, const std::string& equityCreditCurveId,
63 const QuantLib::Date& startDate, const QuantLib::Date& maturityDate) override;
64};
65
66} // namespace data
67} // namespace ore
Abstract template engine builder class.
Abstract template EngineBuilder class that can cache engines and coupon pricers.
std::string keyImpl(const std::string &id, const std::string &ccy, const std::string &creditCurveId, const bool hasCreditRisk, const std::string &securityId, const std::string &referenceCurveId, const bool isExchangeable, QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > equity, const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fx, const std::string &equityCreditCurveId, const QuantLib::Date &startDate, const QuantLib::Date &maturityDate) override
ConvertibleBondEngineBuilder(const std::string &model, const std::string &engine)
QuantLib::ext::shared_ptr< QuantExt::PricingEngine > engineImpl(const std::string &id, const std::string &ccy, const std::string &creditCurveId, const bool hasCreditRisk, const std::string &securityId, const std::string &referenceCurveId, const bool isExchangeable, QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > equity, const QuantLib::ext::shared_ptr< QuantExt::FxIndex > &fx, const std::string &equityCreditCurveId, const QuantLib::Date &startDate, const QuantLib::Date &maturityDate) override
const string & engine() const
Return the engine name.
const string & model() const
Return the model name.
Pricing Engine Factory.
Classes and functions for log message handling.
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23