Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
bootstrapconfig.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 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/configuration/bootstrapconfig.hpp
20 \brief Class for holding bootstrap configurations
21 \ingroup configuration
22*/
23
24#pragma once
25
27#include <ql/utilities/null.hpp>
28
29namespace ore {
30namespace data {
31
32/*! Serializable Bootstrap configuration
33 \ingroup configuration
34*/
36public:
37 //! Constructor
38 BootstrapConfig(QuantLib::Real accuracy = 1.0e-12, QuantLib::Real globalAccuracy = QuantLib::Null<QuantLib::Real>(),
39 bool dontThrow = false, QuantLib::Size maxAttempts = 5, QuantLib::Real maxFactor = 2.0,
40 QuantLib::Real minFactor = 2.0, QuantLib::Size dontThrowSteps = 10);
41
42 //! \name XMLSerializable interface
43 //@{
44 void fromXML(ore::data::XMLNode* node) override;
46 //@}
47
48 //! \name Inspectors
49 //@{
50 QuantLib::Real accuracy() const { return accuracy_; }
51 QuantLib::Real globalAccuracy() const { return globalAccuracy_; }
52 bool dontThrow() const { return dontThrow_; }
53 QuantLib::Size maxAttempts() const { return maxAttempts_; }
54 QuantLib::Real maxFactor() const { return maxFactor_; }
55 QuantLib::Real minFactor() const { return minFactor_; }
56 QuantLib::Size dontThrowSteps() const { return dontThrowSteps_; }
57 //@}
58
59private:
60 QuantLib::Real accuracy_;
61 QuantLib::Real globalAccuracy_;
63 QuantLib::Size maxAttempts_;
64 QuantLib::Real maxFactor_;
65 QuantLib::Real minFactor_;
66 QuantLib::Size dontThrowSteps_;
67};
68
69} // namespace data
70} // namespace ore
QuantLib::Real maxFactor() const
QuantLib::Size dontThrowSteps() const
QuantLib::Real globalAccuracy() const
QuantLib::Real accuracy() const
void fromXML(ore::data::XMLNode *node) override
QuantLib::Real minFactor() const
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
QuantLib::Size maxAttempts() const
Small XML Document wrapper class.
Definition: xmlutils.hpp:65
Base class for all serializable classes.
Definition: xmlutils.hpp:101
@ data
Definition: log.hpp:77
Serializable Credit Default Swap.
Definition: namespaces.docs:23
XML utility functions.