Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
ored
portfolio
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
26
#include <
ored/utilities/xmlutils.hpp
>
27
#include <ql/time/date.hpp>
28
29
namespace
ore
{
30
namespace
data
{
31
32
/*! Serializable object holding option exercise data for options that have been exercised.
33
\ingroup tradedata
34
*/
35
class
OptionExerciseData
:
public
XMLSerializable
{
36
public
:
37
//! Default constructor
38
OptionExerciseData
();
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
55
private
:
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
ore::data::OptionExerciseData
Definition:
optionexercisedata.hpp:35
ore::data::OptionExerciseData::init
void init()
Initialisation.
Definition:
optionexercisedata.cpp:52
ore::data::OptionExerciseData::strPrice_
std::string strPrice_
Definition:
optionexercisedata.hpp:57
ore::data::OptionExerciseData::OptionExerciseData
OptionExerciseData()
Default constructor.
Definition:
optionexercisedata.cpp:31
ore::data::OptionExerciseData::date
const QuantLib::Date & date() const
Definition:
optionexercisedata.hpp:45
ore::data::OptionExerciseData::fromXML
virtual void fromXML(XMLNode *node) override
Definition:
optionexercisedata.cpp:37
ore::data::OptionExerciseData::toXML
virtual XMLNode * toXML(XMLDocument &doc) const override
Definition:
optionexercisedata.cpp:44
ore::data::OptionExerciseData::price_
QuantLib::Real price_
Definition:
optionexercisedata.hpp:60
ore::data::OptionExerciseData::price
QuantLib::Real price() const
Definition:
optionexercisedata.hpp:46
ore::data::OptionExerciseData::date_
QuantLib::Date date_
Definition:
optionexercisedata.hpp:59
ore::data::OptionExerciseData::strDate_
std::string strDate_
Definition:
optionexercisedata.hpp:56
ore::data::XMLDocument
Small XML Document wrapper class.
Definition:
xmlutils.hpp:65
ore::data::XMLSerializable
Base class for all serializable classes.
Definition:
xmlutils.hpp:101
rapidxml::xml_node
XML Node.
Definition:
xmlutils.hpp:43
data
@ data
Definition:
log.hpp:77
ore
Serializable Credit Default Swap.
Definition:
namespaces.docs:23
xmlutils.hpp
XML utility functions.
Generated by
Doxygen
1.9.5