Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
scenariogeneratorbuilder.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 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 scenario/scenariogeneratorbuilder.hpp
20 \brief Build a scenariogenerator
21 \ingroup scenario
22*/
23
24#pragma once
25
26#include <vector>
27
28#include <ql/types.hpp>
29
32
38
39namespace ore {
40namespace analytics {
41using namespace QuantLib;
42
43//! Build a ScenarioGenerator
44/*! ScenarioGeneratorBuilder builds a scenario generator
45 based on the settings provided via the ScenarioGeneratorData object
46 - state process
47 - simulation date grid
48 - multipath generator
49 - scenario factory
50 - fixing method
51
52 \ingroup scenario
53 */
55public:
56 //! Default constructor
58
59 //! Constructor
60 ScenarioGeneratorBuilder(QuantLib::ext::shared_ptr<ScenarioGeneratorData> data) : data_(data) {}
61
62 //! Build function
63 QuantLib::ext::shared_ptr<ScenarioGenerator>
64 build(QuantLib::ext::shared_ptr<QuantExt::CrossAssetModel> model, QuantLib::ext::shared_ptr<ScenarioFactory> sf,
65 QuantLib::ext::shared_ptr<ScenarioSimMarketParameters> marketConfig, Date asof,
66 QuantLib::ext::shared_ptr<ore::data::Market> initMarket,
67 const std::string& configuration = ore::data::Market::defaultConfiguration,
68 const QuantLib::ext::shared_ptr<PathGeneratorFactory>& pf = QuantLib::ext::make_shared<MultiPathGeneratorFactory>());
69
70private:
71 QuantLib::ext::shared_ptr<ScenarioGeneratorData> data_;
72 boost::optional<std::set<std::string>> currencies_;
73};
74} // namespace analytics
75} // namespace ore
boost::optional< std::set< std::string > > currencies_
QuantLib::ext::shared_ptr< ScenarioGeneratorData > data_
QuantLib::ext::shared_ptr< ScenarioGenerator > build(QuantLib::ext::shared_ptr< QuantExt::CrossAssetModel > model, QuantLib::ext::shared_ptr< ScenarioFactory > sf, QuantLib::ext::shared_ptr< ScenarioSimMarketParameters > marketConfig, Date asof, QuantLib::ext::shared_ptr< ore::data::Market > initMarket, const std::string &configuration=ore::data::Market::defaultConfiguration, const QuantLib::ext::shared_ptr< PathGeneratorFactory > &pf=QuantLib::ext::make_shared< MultiPathGeneratorFactory >())
Build function.
ScenarioGeneratorBuilder(QuantLib::ext::shared_ptr< ScenarioGeneratorData > data)
Constructor.
static const string defaultConfiguration
Scenario generation using cross asset model paths.
data
factory classes for scenarios
Scenario generator configuration.
A class to hold Scenario parameters for scenarioSimMarket.
Date asof(14, Jun, 2018)