Series of call and put options with different strike sharing the same attributes of expiration, last trading day, spc, multiplies, etc.
More...
#include <OptionSeries.hpp>
|
| OptionSeries ()=default |
| Default constructor for the OptionSeries class.
|
|
std::int32_t | getExpiration () const |
| Returns day id of expiration.
|
|
std::int32_t | getLastTrade () const |
| Returns day id of last trading day.
|
|
double | getMultiplier () const |
| Returns market value multiplier.
|
|
double | getSPC () const |
| Returns shares per contract for options.
|
|
const std::string & | getAdditionalUnderlyings () const |
| Returns additional underlyings for options, including additional cash.
|
|
const std::string & | getMMY () const |
| Returns maturity month-year as provided for corresponding FIX tag (200).
|
|
const std::string & | getOptionType () const |
| Returns type of option.
|
|
const std::string & | getExpirationStyle () const |
| Returns expiration cycle style, such as "Weeklys", "Quarterlys".
|
|
const std::string & | getSettlementStyle () const |
| Returns settlement price determination style, such as "Open", "Close".
|
|
const std::string & | getCFI () const |
| Returns Classification of Financial Instruments code.
|
|
const std::map< double, std::shared_ptr< T > > & | getCalls () const |
| Returns a sorted map of all calls from strike to a corresponding option instrument.
|
|
const std::map< double, std::shared_ptr< T > > & | getPuts () const |
| Returns a sorted map of all puts from strike to a corresponding option instrument.
|
|
const std::vector< double > & | getStrikes () const |
| Returns a list of all strikes in ascending order.
|
|
std::vector< double > | getNStrikesAround (std::size_t n, double strike) const |
| Returns n strikes which are centered around a specified strike value.
|
|
std::string | toString () const |
| Returns a string representation of the current object.
|
|
|
class | OptionChainsBuilder< T > |
|
template<typename T>
class OptionSeries< T >
Series of call and put options with different strike sharing the same attributes of expiration, last trading day, spc, multiplies, etc.
Threads and locks
This class is NOT thread-safe and cannot be used from multiple threads without external synchronization.
- Template Parameters
-
T | The type of option instrument instances. |
◆ OptionSeries()
◆ getAdditionalUnderlyings()
template<typename T>
const std::string & OptionSeries< T >::getAdditionalUnderlyings |
( |
| ) |
const |
|
inline |
Returns additional underlyings for options, including additional cash.
It shall use following format:
<VALUE> ::= <empty> | <LIST>
<LIST> ::= <AU> | <AU> <semicolon> <space> <LIST>
<AU> ::= <UNDERLYING> <space> <SPC>
The list shall be sorted by <UNDERLYING>. Example: "SE 50", "FIS 53; US$ 45.46".
- Returns
- The additional underlyings for options, including additional cash.
◆ getCalls()
template<typename T>
const std::map< double, std::shared_ptr< T > > & OptionSeries< T >::getCalls |
( |
| ) |
const |
|
inline |
Returns a sorted map of all calls from strike to a corresponding option instrument.
- Returns
- A sorted map of all calls from strike to a corresponding option instrument.
◆ getCFI()
Returns Classification of Financial Instruments code.
It is a mandatory field for OPTION instruments as it is the only way to distinguish Call/Put type, American/European exercise, Cash/Physical delivery. It shall use six-letter CFI code from ISO 10962 standard. It is allowed to use 'X' extensively and to omit trailing letters (assumed to be 'X'). See ISO 10962 on Wikipedia. Example: "ESNTPB", "ESXXXX", "ES" , "OPASPS".
- Returns
- The CFI code.
◆ getExpiration()
Returns day id of expiration.
Example: day_util::#getDayIdByYearMonthDay() "dxfcpp::day_util::getDayIdByYearMonthDay"(20090117).
- Returns
- day id of expiration.
◆ getExpirationStyle()
template<typename T>
const std::string & OptionSeries< T >::getExpirationStyle |
( |
| ) |
const |
|
inline |
Returns expiration cycle style, such as "Weeklys", "Quarterlys".
- Returns
- The expiration cycle style.
◆ getLastTrade()
Returns day id of last trading day.
Example: day_util::#getDayIdByYearMonthDay() "dxfcpp::day_util::getDayIdByYearMonthDay"(20090116).
- Returns
- The day id of last trading day.
◆ getMMY()
Returns maturity month-year as provided for corresponding FIX tag (200).
It can use several different formats depending on data source:
-
YYYYMM – if only year and month are specified
-
YYYYMMDD – if full date is specified
-
YYYYMMwN – if week number (within a month) is specified
- Returns
- The maturity month-year as provided for corresponding FIX tag (200).
◆ getMultiplier()
Returns market value multiplier.
Example: 100, 33.2.
- Returns
- The market value multiplier.
◆ getNStrikesAround()
template<typename T>
std::vector< double > OptionSeries< T >::getNStrikesAround |
( |
std::size_t | n, |
|
|
double | strike ) const |
|
inline |
Returns n strikes which are centered around a specified strike value.
- Parameters
-
n | The maximal number of strikes to return. |
strike | The center strike. |
- Returns
- n strikes which are centered around a specified strike value.
◆ getOptionType()
template<typename T>
const std::string & OptionSeries< T >::getOptionType |
( |
| ) |
const |
|
inline |
Returns type of option.
It shall use one of following values:
-
STAN = Standard Options
-
LEAP = Long-term Equity AnticiPation Securities
-
SDO = Special Dated Options
-
BINY = Binary Options
-
FLEX = FLexible EXchange Options
-
VSO = Variable Start Options
-
RNGE = Range
- Returns
- The type of option.
◆ getPuts()
template<typename T>
const std::map< double, std::shared_ptr< T > > & OptionSeries< T >::getPuts |
( |
| ) |
const |
|
inline |
Returns a sorted map of all puts from strike to a corresponding option instrument.
- Returns
- A sorted map of all puts from strike to a corresponding option instrument.
◆ getSettlementStyle()
template<typename T>
const std::string & OptionSeries< T >::getSettlementStyle |
( |
| ) |
const |
|
inline |
Returns settlement price determination style, such as "Open", "Close".
- Returns
- The settlement price determination style.
◆ getSPC()
Returns shares per contract for options.
Example: 1, 100.
- Returns
- The shares per contract for options.
◆ getStrikes()
template<typename T>
const std::vector< double > & OptionSeries< T >::getStrikes |
( |
| ) |
const |
|
inline |
Returns a list of all strikes in ascending order.
- Returns
- A list of all strikes in ascending order.
◆ toString()
Returns a string representation of the current object.
- Returns
- A string representation.