Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
ascot.cpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2020 Quaternion Risk Management Ltd
3
4 This file is part of ORE, a free-software/open-source library
5 for transparent pricing and risk analysis - http://opensourcerisk.org
6
7 ORE is free software: you can redistribute it and/or modify it
8 under the terms of the Modified BSD License. You should have received a
9 copy of the license along with this program.
10 The license is also available online at <http://opensourcerisk.org>
11
12 This program is distributed on the basis that it will form a useful
13 contribution to risk analytics and model standardisation, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
16*/
17
20
22
23#include <ql/quotes/compositequote.hpp>
24
25namespace ore {
26namespace data {
27
28using namespace QuantLib;
29using namespace QuantExt;
30
31std::string AscotEngineBuilder::keyImpl(const std::string& id, const std::string& ccy) {
32 return id;
33}
34
35QuantLib::ext::shared_ptr<QuantExt::PricingEngine> AscotIntrinsicEngineBuilder::engineImpl(
36 const std::string& id, const std::string& ccy) {
37
38 std::string config = this->configuration(ore::data::MarketContext::pricing);
39
40 auto discountCurve = market_->discountCurve(ccy, config);
41
42 return QuantLib::ext::make_shared<QuantExt::IntrinsicAscotEngine>(discountCurve);
43}
44
45} // namespace data
46} // namespace ore
std::string keyImpl(const std::string &id, const std::string &ccy) override
Definition: ascot.cpp:31
QuantLib::ext::shared_ptr< QuantExt::PricingEngine > engineImpl(const std::string &id, const std::string &ccy) override
Definition: ascot.cpp:35
QuantLib::ext::shared_ptr< Market > market_
const string & configuration(const MarketContext &key)
Return a configuration (or the default one if key not found)
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23