OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.18.0
API documentation
NewOptionsStrategyDefinition.h
Go to the documentation of this file.
1 /**
2  * \file
3  * \brief Declare `OnixS::ICE::iMpact::MarketData::NewOptionsStrategyDefinition` message structure
4  */
5 /*
6  * Copyright (c) Onix Solutions Limited. All rights reserved.
7  *
8  * This software owned by Onix Solutions Limited and is protected by copyright law
9  * and international copyright treaties.
10  *
11  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
12  * Services Agreement (the Agreement) and Customer end user license agreements granting
13  * a non-assignable, non-transferable and non-exclusive license to use the software
14  * for it's own data processing purposes under the terms defined in the Agreement.
15  *
16  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
17  * of this source code or associated reference material to any other location for further reproduction
18  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
19  *
20  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
21  * the terms of the Agreement is a violation of copyright law.
22  */
23 
24 #pragma once
25 
26 #include "../Enumerations.h"
27 #include "../Export.h"
28 #include "../Optional.h"
29 #include "../Types.h"
30 
31 #include <iosfwd>
32 #include <string>
33 #include <vector>
34 
35 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
36 
37 /// This class represents the New Options Strategy Definition Message.
38 struct ONIXS_ICEMDH_EXPORT NewOptionsStrategyDefinition
39 {
40  /// Message type constant
41  enum
42  {
43  messageType = 'U'
44  };
45 
46  /// Unique identifier of the market.
48 
49  /// Unique identifier of the underlying market.
51 
52  /// See Naming Convention on Appendix D.
53  std::string contractSymbol;
54 
55  /// See Appendix A on trading status codes.
57 
58  /// Denominator for the order price fields in this market.
60 
61  /// Minimum increment premium price for this market.
63 
64  /// Minimum increment quantity for this market.
66 
67  /// Minimum quantity for this market.
68  int minQty;
69 
70  /// Contains the Strategy Code for defined market where applicable. See
71  /// Appendix E for list of codes.
73 
74  /// Indicates if Market is only tradable via ICE Block Trade. This also
75  /// means the screen trading is not allowed for the market.
77 
78  /// Strategy Symbol.
79  std::string strategySymbol;
80 
81  /// Indicates if GTC is allowed in the market.
82  bool gtAllowed;
83 
84  /// Indicates MIFID-II market.
86 
87  /// Denominator for the deal price fields in the market. For most markets,
88  /// this is the same as `OrderPriceDenominator`.
90 
91  /// Denominator for the settlement price fields in the market. For most
92  /// markets, this is the same as `DealPriceDenominator`.
94 
95  /// Denominator for `UnitQuantity`. This field will be `0` for most of the
96  /// markets.
98 
99  /// Indicates Test Market.
101 
102  /// Extra contract symbol. Some contract symbols might contain more than
103  /// 35 characters. Clients should append this field to ContractSymbol
104  /// (Offset 11) to get the complete contract symbol.
105  std::string contractSymbolExtra;
106 
107  /// Indicates whether leg deals are suppressed.
109 
110  /// Indicates if the contract is tradable.
112 
113  /// 4 digit year. Last date that the option market can be traded and
114  /// should be removed from the system.
116 
117  /// Month range 1-12. Last date that the option market can be traded and
118  /// should be removed from the system.
120 
121  /// Day of the month. Last date that the option market can be traded and
122  /// should be removed from the system.
124 
125  /// See Appendix C for the list of makret types and IDs.
127 
128  /// Indicates whether the Block Minimum can be overridden for the market.
130 
131  /// Number of cycle (days, hours, MWh, etc.) for a contract.
133 
134  /// Minimum price. `OrderPriceDenominator` should be applied to this
135  /// field.
137 
138  /// Maximum price. `OrderPriceDenominator` should be applied to this
139  /// field.
141 
142  /// This nested class represents leg definition.
143  struct ONIXS_ICEMDH_EXPORT Leg
144  {
145  /// Market Id of the option leg market.
147 
148  /// Futures market id of the underlying futures market.
150 
151  /// Number of option contracts per increment quantity.
152  short ratio;
153 
154  /// Leg side.
156 
157  /// The strategy code for the leg. If set, this field can be used to
158  /// obtain the next level of granularity of the strategy. If it is not
159  /// set, the /c LegMarketID is the most granular level for the market. See
160  /// Appendix E for list of codes.
162 
163  /// The quantity ratio represents the proportion of each of the leg of
164  /// interproduct spreads. Using Gas Oil crack as an example. This will be
165  /// set to 4 for the Gas oil leg and 3 for the Brent leg.
167 
168  /// The quantity ratio represents the proportion of each of the leg of
169  /// interproduct spreads. The Leg ratio denominator will be set to `1` for
170  /// most products not but will be used in future product launches.
172 
173  /// The price ratio is the fractional weighted price component per leg in
174  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
175  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 1 as the
176  /// `LegRatioPriceNumerator`.
178 
179  /// The price ratio is the fractional weighted price component per leg in
180  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
181  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 3 as the
182  /// `LegRatioPriceDenominator`.
184 
185  /// Default constructor.
186  Leg();
187 
188  /// Returns string representation.
189  std::string toString() const;
190  };
191 
192  /// Alias for collection of Legs.
193  typedef std::vector<Leg> Legs;
194 
195  /// Collection of Legs.
196  Legs legs;
197 
198  /// This nested class represents hedge definition.
199  struct ONIXS_ICEMDH_EXPORT Hedge
200  {
201  /// Future's market id of the hedge.
203 
204  /// Security type.
206 
207  /// Hedge side.
209 
210  /// Hedge price.
212 
213  /// Hedge price denominator.
215 
216  /// The strategy code for the leg. If set, this field can be used to
217  /// obtain the next level of granularity of the strategy. If it is not
218  /// set, the /c LegMarketID is the most granular level for the market. See
219  /// Appendix E for list of codes.
221 
222  /// Hedge delta.
223  int delta;
224 
225  /// Default constructor.
226  Hedge();
227 
228  /// Returns string representation.
229  std::string toString() const;
230  };
231 
232  /// Alias for collection of Hedges.
233  typedef std::vector<Hedge> Hedges;
234 
235  /// Collection of Hedges.
236  Hedges hedges;
237 
238  /// Default constructor.
240 
241  /// Initialize from raw message data.
242  NewOptionsStrategyDefinition(const char* data, std::size_t dataSize);
243 
244  /// Deserialize from raw data.
245  void deserialize(const char* data, std::size_t dataSize);
246 
247  /// Reset all fields to default values.
248  void reset();
249 
250  /// Returns string representation.
251  std::string toString() const;
252 };
253 
254 /// Make it printable using C++ I/O streams.
255 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const NewOptionsStrategyDefinition&);
256 
257 }}}} // namespace OnixS::ICE::iMpact::MarketData
bool legDealSuppressed
Indicates whether leg deals are suppressed.
char orderPriceDenominator
Denominator for the order price fields in this market.
std::string contractSymbol
See Naming Convention on Appendix D.
long long Price
Alias for order identifiers type.
Definition: Types.h:54
std::vector< Hedge > Hedges
Alias for collection of Hedges.
bool overrideBlockMin
Indicates whether the Block Minimum can be overridden for the market.
int MarketId
Alias for market identifiers type.
Definition: Types.h:39
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
TradingStatus::Enum tradingStatus
See Appendix A on trading status codes.
int numOfCycles
Number of cycle (days, hours, MWh, etc.) for a contract.
MarketId underlyingMarketId
Futures market id of the underlying futures market.
This class represents the New Options Strategy Definition Message.
MarketId underlyingMarketId
Unique identifier of the underlying market.
int incrementPrice
Minimum increment premium price for this market.
short ratio
Number of option contracts per increment quantity.
int incrementQty
Minimum increment quantity for this market.
short marketTypeId
See Appendix C for the list of makret types and IDs.
Enum
Trading side constants.
Definition: Enumerations.h:38