Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
bondrepo.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/bondrepo.hpp
20 \ingroup builders
21*/
22
23#pragma once
24
28
29namespace ore {
30namespace data {
31
33
34//! Bond Repo engine builder base class
35class BondRepoEngineBuilderBase : public CachingPricingEngineBuilder<std::string, const std::string&> {
36public:
37 BondRepoEngineBuilderBase(const std::string& model, const std::string& engine)
38 : CachingEngineBuilder(model, engine, {"BondRepo"}) {}
39
40protected:
41 std::string keyImpl(const std::string& repoCurveId) override { return repoCurveId; }
42};
43
44//! Discounting Bond Repo Engine Builder
46public:
47 DiscountingBondRepoEngineBuilder() : BondRepoEngineBuilderBase("DiscountedCashflows", "DiscountingRepoEngine") {}
48
49protected:
50 QuantLib::ext::shared_ptr<QuantLib::PricingEngine> engineImpl(const std::string& repoCurveId) override;
51};
52
53//! Accrual Bond Repo Engine Builder
55public:
56 AccrualBondRepoEngineBuilder() : BondRepoEngineBuilderBase("Accrual", "AccrualRepoEngine") {}
57
58protected:
59 QuantLib::ext::shared_ptr<QuantLib::PricingEngine> engineImpl(const std::string&) override;
60};
61
62} // namespace data
63} // namespace ore
Abstract template engine builder class.
Accrual Bond Repo Engine Builder.
Definition: bondrepo.hpp:54
QuantLib::ext::shared_ptr< QuantLib::PricingEngine > engineImpl(const std::string &) override
Definition: bondrepo.cpp:33
Bond Repo engine builder base class.
Definition: bondrepo.hpp:35
std::string keyImpl(const std::string &repoCurveId) override
Definition: bondrepo.hpp:41
BondRepoEngineBuilderBase(const std::string &model, const std::string &engine)
Definition: bondrepo.hpp:37
Abstract template EngineBuilder class that can cache engines and coupon pricers.
Discounting Bond Repo Engine Builder.
Definition: bondrepo.hpp:45
QuantLib::ext::shared_ptr< QuantLib::PricingEngine > engineImpl(const std::string &repoCurveId) override
Definition: bondrepo.cpp:27
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