OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  16.1.0
API documentation
TotalReturnFuturesStatus.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 
28 
29 namespace OnixS
30 {
31  namespace Eurex
32  {
33  namespace MarketData
34  {
35  ///
36  struct ONIXS_EUREX_EMDI_API ConversionMode
37  {
38  enum Enum
39  {
40  /// Used to identify absence of value.
41  Undefined = -1,
42 
43  ///
44  Initial = 0,
45 
46  ///
48 
49  ///
50  Final
51  };
52  };
53 
54  ///
55  struct ONIXS_EUREX_EMDI_API ConversionModeQualifier
56  {
57  enum Enum
58  {
59  /// Used to identify absence of value.
60  Undefined = -1,
61 
62  ///
63  Early = 0,
64 
65  ///
66  Late
67  };
68  };
69 
70  /// Clearing price parameter for total return futures status message
71  class ONIXS_EUREX_EMDI_API TrfsClearingPriceParameter : GroupInstance
72  {
73  public:
74 
75  /// Business date type
77  {
78  return getIntEnumFieldValue<BusinessDayType> (*this, Tags::BusinessDayType);
79  }
80 
81  /// Annualisation Factor, a constant value that represents the number of calendar days during one year as applied in the calculations.
82  bool annualCalendarDays (UInt32& value) const
83  {
84  return get (Tags::AnnualCalendarDays).toNumber (value);
85  }
86 
87  /// Days to maturity, number of calendar days between the current day settlement date and the
88  /// instrument expiration settlement date. Used for the trade price conversion from trading to clearing notation.
89  bool remainingCalendarDays (Int32& value) const
90  {
91  return get (Tags::RemainingCalendarDays).toNumber (value);
92  }
93 
94  /// Funding rate, used for the funding calculation of the current day. Represents the overnight
95  /// or the periodic interest rate established on the previous day. Becomes available in the morning before trading starts.
96  bool overnightInterestRate (Decimal& value) const
97  {
98  return get (Tags::OvernightInterestRate).toNumber (value);
99  }
100 
101  /// Daily funding, calculated from the funding rate applied to the previous day underlying index.
102  bool currentPaymentParameter (Decimal& value) const
103  {
104  return get (Tags::CurrentPaymentParameter).toNumber (value);
105  }
106 
107  /// Accrued funding, accumulated from the daily fundings since
108  /// the product launch. Used for the trade price conversion from
109  /// trading to clearing notation.
110  bool accruedPaymentParameter (Decimal& value) const
111  {
112  return get (Tags::AccruedPaymentParameter).toNumber (value);
113  }
114 
115  /// Distribution index, defined for the current day. Becomes available in the morning before trading starts.
116  bool relatedIndexValue (Decimal& value) const
117  {
118  return get (Tags::RelatedIndexValue).toNumber (value);
119  }
120 
121  /// Daily distribution, calculated from the difference between the current and the previous day distribution index.
123  {
124  return get (Tags::CurrentCollectionParameter).toNumber (value);
125  }
126 
127  /// Accrued distribution, accumulated from the daily distributions since the product launch. Used for the trade price conversion
128  /// from trading to clearing notation.
130  {
131  return get (Tags::AccruedCollectionParameter).toNumber (value);
132  }
133 
134  /// Coupon payment, for which the coupon period is ongoing, multiplied by the ratio of the already passed time of the coupon periodand the entire coupon period.
136  {
137  return get(Tags::CurrentAccruedInterestAmt).toNumber(value);
138  }
139 
140  /// The previous day�s underlying index close value.
141  bool relatedClosePrice (Decimal& value) const
142  {
143  return get (Tags::RelatedClosePrice).toNumber (value);
144  }
145 
146 
147  private:
149 
150  TrfsClearingPriceParameter (const GroupInstance& groupInstance)
151  : GroupInstance (groupInstance)
152  {
153  }
154  };
155 
156  class TrfsClearingPriceParameters : public TypedGroup<TrfsClearingPriceParameter>
157  {
158  private:
159  explicit
160  TrfsClearingPriceParameters (const Group& group)
162  {
163  }
164 
166  };
167 
168  /// Total return futures status message
169  class ONIXS_EUREX_EMDI_API TotalReturnFuturesStatus : public Message
170  {
171  public:
172 
173  /// Product identifier.
175  {
176  return getUInt32 (Tags::MarketSegmentID);
177  }
178 
179  /// Instrument identifier.
181  {
182  return getInt64 (Tags::SecurityID);
183  }
184 
185  /// Type of security.
187  {
188  return getIntEnumFieldValue<SecurityType> (*this, Tags::SecurityType);
189  }
190 
191  /// Daily settlement price of the previous day in trading notation (TRF spread).
193  {
194  return getDecimal(Tags::PriorSettlPrice);
195  }
196 
197  /// Daily settlement price of the current day in trading notation (TRF spread).
198  bool settlPrice (Decimal& price) const
199  {
200  return get (Tags::SettlPrice).toNumber (price);
201  }
202 
203 
204  /// Clearing price parameters
206  {
208  }
209 
210  ///
212  {
213  return getIntEnumFieldValue<ConversionMode> (*this, Tags::ConversionMode);
214  }
215 
216  ///
218  {
219  return getIntEnumFieldValue<ConversionModeQualifier> (*this, Tags::ConversionModeQualifier);
220  }
221 
222  private:
223  friend class TotalReturnFuturesStatusWrapper;
224 
225  TotalReturnFuturesStatus (const void* impl)
226  : Message (impl)
227  {
228  }
229  };
230  }
231  }
232 }
BusinessDayType::Enum businessDayType() const
Business date type.
Clearing price parameter for total return futures status message.
bool settlPrice(Decimal &price) const
Daily settlement price of the current day in trading notation (TRF spread).
MarketSegmentId marketSegmentId() const
Product identifier.
const Tag RemainingCalendarDays
Definition: Tags.h:225
const Tag AccruedPaymentParameter
Definition: Tags.h:227
bool relatedIndexValue(Decimal &value) const
Distribution index, defined for the current day. Becomes available in the morning before trading star...
bool annualCalendarDays(UInt32 &value) const
Annualisation Factor, a constant value that represents the number of calendar days during one year as...
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
const Tag CurrentPaymentParameter
Definition: Tags.h:226
const Tag CurrentAccruedInterestAmt
Definition: Tags.h:340
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
const Tag ConversionModeQualifier
Definition: Tags.h:357
bool currentPaymentParameter(Decimal &value) const
Daily funding, calculated from the funding rate applied to the previous day underlying index...
bool relatedClosePrice(Decimal &value) const
The previous day�s underlying index close value.
SecurityId securityId() const
Instrument identifier.
ConversionModeQualifier::Enum conversionModeQualifier() const
TrfsClearingPriceParameters clearingPriceParameters() const
Clearing price parameters.
bool currentAccruedInterestAmt(Decimal &value) const
Coupon payment, for which the coupon period is ongoing, multiplied by the ratio of the already passed...
const Tag OvernightInterestRate
Definition: Tags.h:171
const Tag AccruedCollectionParameter
Definition: Tags.h:230
SecurityType::Enum securityType() const
Type of security.
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
const Tag CurrentCollectionParameter
Definition: Tags.h:229
const Tag AnnualCalendarDays
Definition: Tags.h:224
bool currentCollectionParameter(Decimal &value) const
Daily distribution, calculated from the difference between the current and the previous day distribut...
Decimal priorSettlPrice() const
Daily settlement price of the previous day in trading notation (TRF spread).