OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  16.1.0
API documentation
VarianceFuturesStatus.h
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable OnixS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
20 #pragma once
21 
27 
28 namespace OnixS
29 {
30  namespace Eurex
31  {
32  namespace MarketData
33  {
34  /// Exposes list of available feed types.
35  struct ONIXS_EUREX_EMDI_API BusinessDayType
36  {
37  enum Enum
38  {
39  /// Used to identify absence of value.
40  Undefined = -1,
41 
42  /// Preceding Day
43  PrecedingDay = 0,
44 
45  /// Current Day
46  CurrentDay = 1,
47  };
48  };
49 
50  /// Exposes list of available calculation method types.
51  struct ONIXS_EUREX_EMDI_API CalculationMethodType
52  {
53  enum Enum
54  {
55  /// Used to identify absence of value.
56  Undefined = -1,
57 
58  /// Automatic
59  Automatic = 0,
60 
61  /// Manual
62  Manual = 1,
63  };
64  };
65 
66  /// Clearing price parameter
67  class ONIXS_EUREX_EMDI_API ClearingPriceParameter : GroupInstance
68  {
69  public:
70 
71  /// Business date type
73  {
74  return getIntEnumFieldValue<BusinessDayType> (*this, Tags::BusinessDayType);
75  }
76 
77  /// Price constant defined on the instrument level and used for the clearing price conversion.
78  bool clearingPriceOffset (Decimal& value) const
79  {
80  return get (Tags::ClearingPriceOffset).toNumber (value);
81  }
82 
83  /// Constant multiplier of the Notional Vega defined on the product level and used for the clearing quantity conversion.
84  bool vegaMultiplier (UInt64& value) const
85  {
86  return get (Tags::VegaMultiplier).toNumber (value);
87  }
88 
89  /// Approximate number of trading days during one year defined as a constant on the product level and used for the calculation of RealisedVariance (28853).
90  bool annualTradingBusinessDays (UInt32& value) const
91  {
92  return get (Tags::AnnualTradingBusinessDays).toNumber (value);
93  }
94 
95  /// Total number of trading days of the instrument, including the first and the last trading day, which is one day before the expiration.
96  bool totalTradingBusinessDays (UInt32& value) const
97  {
98  return get (Tags::TotalTradingBusinessDays).toNumber (value);
99  }
100 
101  /// Total number of trading days already passed since the introduction of the instrument.
102  bool tradingBusinessDays (UInt32& value) const
103  {
104  return get (Tags::TradingBusinessDays).toNumber (value);
105  }
106 
107  /// Used as a variance reference for the trading price conversion and the settlement price calculation.
108  bool standardVariance (Decimal& value) const
109  {
110  return get (Tags::StandardVariance).toNumber (value);
111  }
112 
113  /// Closing price of the underlying on the product level and used to calculate the realised variance. Also provided for previous day.
114  bool relatedClosePrice (Decimal& value) const
115  {
116  return get (Tags::RelatedClosePrice).toNumber (value);
117  }
118 
119  /// Calculated from all underlying closing prices since the introduction of the instrument adjusted by AnnualTradingBusinessDays. Also provided for previous day.
120  bool realisedVariance (Decimal& value) const
121  {
122  return get (Tags::RealisedVariance).toNumber (value);
123  }
124 
125  /// Accumulated return on modified variation margin represents the economic cost of the variation margin from one trading day to the next. Also provided for previous day.
126  bool volatility (Decimal& value) const
127  {
128  return get (Tags::Volatility).toNumber (value);
129  }
130 
131  /// Settlement price in clearing notation. Only provided for previous day.
132  bool settlPrice (Decimal& value) const
133  {
134  return get (Tags::ClearingSettlPrice).toNumber (value);
135  }
136 
137  /// Indicates whether the automatic calculation of the parameters has been disabled and parameters have been manually defined. Intraday update is possible at any time.
139  {
140  return getIntEnumFieldValue<CalculationMethodType> (*this, Tags::CalculationMethod);
141  }
142 
143  private:
145 
146  ClearingPriceParameter (const GroupInstance& groupInstance)
147  : GroupInstance (groupInstance)
148  {
149  }
150  };
151 
152  class ClearingPriceParameters : public TypedGroup<ClearingPriceParameter>
153  {
154  private:
155  explicit
156  ClearingPriceParameters (const Group& group)
158  {
159  }
160 
161  friend class VarianceFuturesStatus;
162  };
163 
164  /// Variance futures status message
165  class ONIXS_EUREX_EMDI_API VarianceFuturesStatus : public Message
166  {
167  public:
168 
169  /// Product identifier.
171  {
172  return getUInt32 (Tags::MarketSegmentID);
173  }
174 
175  /// Instrument identifier.
177  {
178  return getInt64 (Tags::SecurityID);
179  }
180 
181  /// Clearing price parameters
183  {
185  }
186 
187  private:
188  friend class VarianceFuturesStatusWrapper;
189 
190  VarianceFuturesStatus (const void* impl)
191  : Message (impl)
192  {
193  }
194  };
195  }
196  }
197 }
bool standardVariance(Decimal &value) const
Used as a variance reference for the trading price conversion and the settlement price calculation...
bool relatedClosePrice(Decimal &value) const
Closing price of the underlying on the product level and used to calculate the realised variance...
bool annualTradingBusinessDays(UInt32 &value) const
Approximate number of trading days during one year defined as a constant on the product level and use...
bool totalTradingBusinessDays(UInt32 &value) const
Total number of trading days of the instrument, including the first and the last trading day...
bool volatility(Decimal &value) const
Accumulated return on modified variation margin represents the economic cost of the variation margin ...
MarketSegmentId marketSegmentId() const
Product identifier.
SecurityId securityId() const
Instrument identifier.
const Tag ClearingPriceOffset
Definition: Tags.h:161
Exposes list of available calculation method types.
bool settlPrice(Decimal &value) const
Settlement price in clearing notation. Only provided for previous day.
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
const Tag NoClearingPriceParameters
Definition: Tags.h:159
BusinessDayType::Enum businessDayType() const
Business date type.
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
ClearingPriceParameters clearingPriceParameters() const
Clearing price parameters.
const Tag TradingBusinessDays
Definition: Tags.h:165
bool vegaMultiplier(UInt64 &value) const
Constant multiplier of the Notional Vega defined on the product level and used for the clearing quant...
CalculationMethodType::Enum calculationMethod() const
Indicates whether the automatic calculation of the parameters has been disabled and parameters have b...
const Tag AnnualTradingBusinessDays
Definition: Tags.h:163
const Tag ClearingSettlPrice
Definition: Tags.h:80
Exposes list of available feed types.
bool clearingPriceOffset(Decimal &value) const
Price constant defined on the instrument level and used for the clearing price conversion.
const Tag TotalTradingBusinessDays
Definition: Tags.h:164
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
bool tradingBusinessDays(UInt32 &value) const
Total number of trading days already passed since the introduction of the instrument.
bool realisedVariance(Decimal &value) const
Calculated from all underlying closing prices since the introduction of the instrument adjusted by An...