Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
imscheduleanalytic.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2023 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 orea/app/analytics/imscheduleanalytic.hpp
20 \brief ORE IM Schedule Analytic
21*/
22#pragma once
23
24#include <orea/app/analytic.hpp>
26
27namespace ore {
28namespace analytics {
29
30
32public:
33 static constexpr const char* LABEL = "IM_SCHEDULE";
34
35 IMScheduleAnalyticImpl(const QuantLib::ext::shared_ptr<InputParameters>& inputs) : Analytic::Impl(inputs) {
37 }
38 void runAnalytic(const QuantLib::ext::shared_ptr<ore::data::InMemoryLoader>& loader,
39 const std::set<std::string>& runTypes = {}) override;
40 void setUpConfigurations() override {}
41};
42
44public:
45 IMScheduleAnalytic(const QuantLib::ext::shared_ptr<InputParameters>& inputs,
46 const Crif& crif = Crif(),
47 const bool hasNettingSetDetails = false)
48 : Analytic(std::make_unique<IMScheduleAnalyticImpl>(inputs), {"IM_SCHEDULE"}, inputs,
49 false, false, false, false),
51
52 const QuantLib::ext::shared_ptr<IMScheduleCalculator>& imSchedule() const { return imSchedule_; }
53 void setImSchedule(const QuantLib::ext::shared_ptr<IMScheduleCalculator>& imSchedule) { imSchedule_ = imSchedule; }
54
55 //! Load CRIF from external source, override to generate CRIF from the input portfolio
56 virtual void loadCrifRecords(const QuantLib::ext::shared_ptr<ore::data::InMemoryLoader>& loader);
57
58 const Crif& crif() const { return crif_; }
60 const std::map<SimmConfiguration::SimmSide, std::set<ore::data::NettingSetDetails>>& hasSEC() const {
61 return hasSEC_;
62 }
63 const std::map<SimmConfiguration::SimmSide, std::set<ore::data::NettingSetDetails>>& hasCFTC() const {
64 return hasCFTC_;
65 }
66 private:
69 std::map<SimmConfiguration::SimmSide, std::set<ore::data::NettingSetDetails>> hasSEC_;
70 std::map<SimmConfiguration::SimmSide, std::set<ore::data::NettingSetDetails>> hasCFTC_;
71 QuantLib::ext::shared_ptr<IMScheduleCalculator> imSchedule_;
72};
73
74} // namespace analytics
75} // namespace ore
ORE Analytics Manager.
void setLabel(const string &label)
Definition: analytic.hpp:189
const QuantLib::ext::shared_ptr< InputParameters > & inputs() const
Definition: analytic.hpp:116
const QuantLib::ext::shared_ptr< ore::data::Loader > & loader() const
Definition: analytic.hpp:127
QuantLib::ext::shared_ptr< IMScheduleCalculator > imSchedule_
const QuantLib::ext::shared_ptr< IMScheduleCalculator > & imSchedule() const
IMScheduleAnalytic(const QuantLib::ext::shared_ptr< InputParameters > &inputs, const Crif &crif=Crif(), const bool hasNettingSetDetails=false)
std::map< SimmConfiguration::SimmSide, std::set< ore::data::NettingSetDetails > > hasSEC_
virtual void loadCrifRecords(const QuantLib::ext::shared_ptr< ore::data::InMemoryLoader > &loader)
Load CRIF from external source, override to generate CRIF from the input portfolio.
void setImSchedule(const QuantLib::ext::shared_ptr< IMScheduleCalculator > &imSchedule)
const std::map< SimmConfiguration::SimmSide, std::set< ore::data::NettingSetDetails > > & hasCFTC() const
const std::map< SimmConfiguration::SimmSide, std::set< ore::data::NettingSetDetails > > & hasSEC() const
std::map< SimmConfiguration::SimmSide, std::set< ore::data::NettingSetDetails > > hasCFTC_
void runAnalytic(const QuantLib::ext::shared_ptr< ore::data::InMemoryLoader > &loader, const std::set< std::string > &runTypes={}) override
IMScheduleAnalyticImpl(const QuantLib::ext::shared_ptr< InputParameters > &inputs)
static constexpr const char * LABEL
Class for calculating SIMM.