Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
localvolmodelbuilder.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/model/localvolmodelbuilder.hpp
20 \brief builder for an array of local vol processes
21 \ingroup utilities
22*/
23
24#pragma once
25
27
28namespace ore {
29namespace data {
30
31using namespace QuantLib;
32
34public:
36 LocalVolModelBuilder(const std::vector<Handle<YieldTermStructure>>& curves,
37 const std::vector<ext::shared_ptr<GeneralizedBlackScholesProcess>>& processes,
38 const std::set<Date>& simulationDates = {},
39 const std::set<Date>& addDates = {},
40 const Size timeStepsPerYear = 1,
41 const Type lvType = Type::Dupire,
42 const std::vector<Real>& calibrationMoneyness = { -2.0, -1.0, 0.0, 1.0, 2.0 },
43 const bool dontCalibrate = false);
44 LocalVolModelBuilder(const Handle<YieldTermStructure>& curve,
45 const ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
46 const std::set<Date>& simulationDates = {},
47 const std::set<Date>& addDates = {},
48 const Size timeStepsPerYear = 1,
49 const Type lvType = Type::Dupire,
50 const std::vector<Real>& calibrationMoneyness = { -2.0, -1.0, 0.0, 1.0, 2.0 },
51 const bool dontCalibrate = false)
52 : LocalVolModelBuilder(std::vector<Handle<YieldTermStructure>>{curve},
53 std::vector<ext::shared_ptr<GeneralizedBlackScholesProcess>>{process}, simulationDates,
54 addDates, timeStepsPerYear, lvType, calibrationMoneyness, dontCalibrate) {}
55
56 std::vector<ext::shared_ptr<GeneralizedBlackScholesProcess>> getCalibratedProcesses() const override;
57
58protected:
59 std::vector<std::vector<Real>> getCurveTimes() const override;
60 std::vector<std::vector<std::pair<Real, Real>>> getVolTimesStrikes() const override;
61
62private:
64 const std::vector<Real> calibrationMoneyness_;
65 const bool dontCalibrate_;
66};
67
68} // namespace data
69} // namespace ore
builder for an array of black scholes processes
std::vector< ext::shared_ptr< GeneralizedBlackScholesProcess > > getCalibratedProcesses() const override
std::vector< std::vector< std::pair< Real, Real > > > getVolTimesStrikes() const override
std::vector< std::vector< Real > > getCurveTimes() const override
const std::vector< Real > calibrationMoneyness_
LocalVolModelBuilder(const Handle< YieldTermStructure > &curve, const ext::shared_ptr< GeneralizedBlackScholesProcess > &process, const std::set< Date > &simulationDates={}, const std::set< Date > &addDates={}, const Size timeStepsPerYear=1, const Type lvType=Type::Dupire, const std::vector< Real > &calibrationMoneyness={ -2.0, -1.0, 0.0, 1.0, 2.0 }, const bool dontCalibrate=false)
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23