Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
marketdatacsvloader.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2022 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/marketdatacsvloader.hpp
20 \brief Market Data Loader
21*/
22
23#pragma once
24
27
28namespace ore {
29namespace analytics {
30
32public:
34
35 MarketDataCsvLoaderImpl(const QuantLib::ext::shared_ptr<InputParameters>& inputs,
36 const QuantLib::ext::shared_ptr<ore::data::CSVLoader>& csvLoader)
37 : inputs_(inputs), csvLoader_(csvLoader) {}
38
39 void loadCorporateActionData(QuantLib::ext::shared_ptr<ore::data::InMemoryLoader>& loader,
40 const std::map<std::string, std::string>& equities) override;
41
42 void retrieveMarketData(const QuantLib::ext::shared_ptr<ore::data::InMemoryLoader>& loader,
43 const ore::analytics::QuoteMap& quotes,
44 const QuantLib::Date& requestDate = QuantLib::Date()) override;
45
46 void retrieveFixings(const QuantLib::ext::shared_ptr<ore::data::InMemoryLoader>& loader,
47 ore::analytics::FixingMap fixings = {},
48 std::map<std::pair<std::string, QuantLib::Date>, std::set<QuantLib::Date>> lastAvailableFixingLookupMap = {}) override;
49
50private:
51 QuantLib::ext::shared_ptr<InputParameters> inputs_;
52 QuantLib::ext::shared_ptr<ore::data::CSVLoader> csvLoader_;
53};
54
56public:
57 MarketDataCsvLoader(const QuantLib::ext::shared_ptr<InputParameters>& inputs,
58 const QuantLib::ext::shared_ptr<ore::data::CSVLoader>& csvLoader)
59 : MarketDataLoader(inputs, QuantLib::ext::make_shared<MarketDataCsvLoaderImpl>(inputs, csvLoader)) {}
60};
61
62} // namespace analytics
63} // namespace ore
MarketDataCsvLoader(const QuantLib::ext::shared_ptr< InputParameters > &inputs, const QuantLib::ext::shared_ptr< ore::data::CSVLoader > &csvLoader)
void retrieveMarketData(const QuantLib::ext::shared_ptr< ore::data::InMemoryLoader > &loader, const ore::analytics::QuoteMap &quotes, const QuantLib::Date &requestDate=QuantLib::Date()) override
retrieve market data
void retrieveFixings(const QuantLib::ext::shared_ptr< ore::data::InMemoryLoader > &loader, ore::analytics::FixingMap fixings={}, std::map< std::pair< std::string, QuantLib::Date >, std::set< QuantLib::Date > > lastAvailableFixingLookupMap={}) override
retrieve fixings
void loadCorporateActionData(QuantLib::ext::shared_ptr< ore::data::InMemoryLoader > &loader, const std::map< std::string, std::string > &equities) override
load corporate action data
MarketDataCsvLoaderImpl(const QuantLib::ext::shared_ptr< InputParameters > &inputs, const QuantLib::ext::shared_ptr< ore::data::CSVLoader > &csvLoader)
QuantLib::ext::shared_ptr< ore::data::CSVLoader > csvLoader_
QuantLib::ext::shared_ptr< InputParameters > inputs_
Market Data Loader.
std::map< std::string, RequiredFixings::FixingDates > FixingMap
std::map< QuantLib::Date, std::set< std::string > > QuoteMap