Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
optionexercisedata.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/portfolio/optionexercisedata.hpp
20 \brief option exercise data model and serialization
21 \ingroup tradedata
22*/
23
24#pragma once
25
27#include <ql/time/date.hpp>
28
29namespace ore {
30namespace data {
31
32/*! Serializable object holding option exercise data for options that have been exercised.
33 \ingroup tradedata
34*/
36public:
37 //! Default constructor
39
40 //! Constructor taking an exercise date and exercise price.
41 OptionExerciseData(const std::string& date, const std::string& price);
42
43 //! \name Inspectors
44 //@{
45 const QuantLib::Date& date() const { return date_; }
46 QuantLib::Real price() const { return price_; }
47 //@}
48
49 //! \name Serialisation
50 //@{
51 virtual void fromXML(XMLNode* node) override;
52 virtual XMLNode* toXML(XMLDocument& doc) const override;
53 //@}
54
55private:
56 std::string strDate_;
57 std::string strPrice_;
58
59 QuantLib::Date date_;
60 QuantLib::Real price_;
61
62 //! Initialisation
63 void init();
64};
65
66} // namespace data
67} // namespace ore
OptionExerciseData()
Default constructor.
const QuantLib::Date & date() const
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
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.