OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.3
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  /// Interest rate till the instrument expiration interpolated from an interest curve.
126  bool riskFreeRate (Decimal& value) const
127  {
128  return get (Tags::RiskFreeRate).toNumber (value);
129  }
130 
131  /// Calculated from the corresponding RiskFreeRate till expiration interpolated. Also provided for previous day.
132  bool discountFactor (Decimal& value) const
133  {
134  return get (Tags::DiscountFactor).toNumber (value);
135  }
136 
137  /// Short term interest rate used for the calculation of the next day AccumulatedReturnModifiedVariationMargin. Only provided for previous day.
138  bool overnightInterestRate (Decimal& value) const
139  {
140  return get (Tags::OvernightInterestRate).toNumber (value);
141  }
142 
143  /// 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.
145  {
146  return get (Tags::AccumulatedReturnModifiedVariationMargin).toNumber (value);
147  }
148 
149  /// 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.
150  bool volatility (Decimal& value) const
151  {
152  return get (Tags::Volatility).toNumber (value);
153  }
154 
155  /// Settlement price in clearing notation. Only provided for previous day.
156  bool settlPrice (Decimal& value) const
157  {
158  return get (Tags::ClearingSettlPrice).toNumber (value);
159  }
160 
161  /// Indicates whether the automatic calculation of the parameters has been disabled and parameters have been manually defined. Intraday update is possible at any time.
163  {
164  return getIntEnumFieldValue<CalculationMethodType> (*this, Tags::CalculationMethod);
165  }
166 
167  private:
169 
170  ClearingPriceParameter (const GroupInstance& groupInstance)
171  : GroupInstance (groupInstance)
172  {
173  }
174  };
175 
176  class ClearingPriceParameters : public TypedGroup<ClearingPriceParameter>
177  {
178  private:
179  explicit
180  ClearingPriceParameters (const Group& group)
182  {
183  }
184 
185  friend class VarianceFuturesStatus;
186  };
187 
188  /// Variance futures status message
189  class ONIXS_EUREX_EMDI_API VarianceFuturesStatus : public Message
190  {
191  public:
192 
193  /// Product identifier.
195  {
196  return getUInt32 (Tags::MarketSegmentID);
197  }
198 
199  /// Instrument identifier.
201  {
202  return getInt64 (Tags::SecurityID);
203  }
204 
205  /// Clearing price parameters
207  {
209  }
210 
211  private:
213 
214  VarianceFuturesStatus (const void* impl)
215  : Message (impl)
216  {
217  }
218  };
219  }
220  }
221 }
bool accumulatedReturnModifiedVariationMargin(Decimal &value) const
Accumulated return on modified variation margin represents the economic cost of the variation margin ...
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:178
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:176
BusinessDayType::Enum businessDayType() const
Business date type.
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
ClearingPriceParameters clearingPriceParameters() const
Clearing price parameters.
bool overnightInterestRate(Decimal &value) const
Short term interest rate used for the calculation of the next day AccumulatedReturnModifiedVariationM...
const Tag TradingBusinessDays
Definition: Tags.h:182
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:180
const Tag OvernightInterestRate
Definition: Tags.h:188
const Tag ClearingSettlPrice
Definition: Tags.h:83
Exposes list of available feed types.
bool discountFactor(Decimal &value) const
Calculated from the corresponding RiskFreeRate till expiration interpolated. Also provided for previo...
bool clearingPriceOffset(Decimal &value) const
Price constant defined on the instrument level and used for the clearing price conversion.
bool riskFreeRate(Decimal &value) const
Interest rate till the instrument expiration interpolated from an interest curve. ...
const Tag TotalTradingBusinessDays
Definition: Tags.h:181
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.
const Tag AccumulatedReturnModifiedVariationMargin
Definition: Tags.h:189
bool realisedVariance(Decimal &value) const
Calculated from all underlying closing prices since the introduction of the instrument adjusted by An...