OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.17.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 "../Export.h"
27 #include "../Types.h"
28 #include "../Enumerations.h"
29 #include "../Optional.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 { messageType = 'U' };
42 
43  /// Unique identifier of the market.
45 
46  /// Unique identifier of the underlying market.
48 
49  /// See Naming Convention on Appendix D.
50  std::string contractSymbol;
51 
52  /// See Appendix A on trading status codes.
54 
55  /// Denominator for the order price fields in this market.
57 
58  /// Minimum increment premium price for this market.
60 
61  /// Minimum increment quantity for this market.
63 
64  /// Minimum quantity for this market.
65  int minQty;
66 
67  /// Contains the Strategy Code for defined market where applicable. See
68  /// Appendix E for list of codes.
70 
71  /// Indicates if Market is only tradable via ICE Block Trade. This also
72  /// means the screen trading is not allowed for the market.
74 
75  /// Strategy Symbol.
76  std::string strategySymbol;
77 
78  /// Indicates if GTC is allowed in the market.
79  bool gtAllowed;
80 
81  /// Indicates MIFID-II market.
83 
84  /// Denominator for the deal price fields in the market. For most markets,
85  /// this is the same as `OrderPriceDenominator`.
87 
88  /// Denominator for the settlement price fields in the market. For most
89  /// markets, this is the same as `DealPriceDenominator`.
91 
92  /// Denominator for `UnitQuantity`. This field will be `0` for most of the
93  /// markets.
95 
96  /// Indicates Test Market.
98 
99  /// Extra contract symbol. Some contract symbols might contain more than
100  /// 35 characters. Clients should append this field to ContractSymbol
101  /// (Offset 11) to get the complete contract symbol.
102  std::string contractSymbolExtra;
103 
104  /// Indicates whether leg deals are suppressed.
106 
107  /// Indicates if the contract is tradable.
109 
110  /// 4 digit year. Last date that the option market can be traded and
111  /// should be removed from the system.
113 
114  /// Month range 1-12. Last date that the option market can be traded and
115  /// should be removed from the system.
117 
118  /// Day of the month. Last date that the option market can be traded and
119  /// should be removed from the system.
121 
122  /// See Appendix C for the list of makret types and IDs.
124 
125  /// Indicates whether the Block Minimum can be overridden for the market.
127 
128  /// Number of cycle (days, hours, MWh, etc.) for a contract.
130 
131  /// Minimum price. `OrderPriceDenominator` should be applied to this
132  /// field.
134 
135  /// Maximum price. `OrderPriceDenominator` should be applied to this
136  /// field.
138 
139  /// This nested class represents leg definition.
140  struct ONIXS_ICEMDH_EXPORT Leg
141  {
142  /// Market Id of the option leg market.
144 
145  /// Futures market id of the underlying futures market.
147 
148  /// Number of option contracts per increment quantity.
149  short ratio;
150 
151  /// Leg side.
153 
154  /// The strategy code for the leg. If set, this field can be used to
155  /// obtain the next level of granularity of the strategy. If it is not
156  /// set, the /c LegMarketID is the most granular level for the market. See
157  /// Appendix E for list of codes.
159 
160  /// The quantity ratio represents the proportion of each of the leg of
161  /// interproduct spreads. Using Gas Oil crack as an example. This will be
162  /// set to 4 for the Gas oil leg and 3 for the Brent leg.
164 
165  /// The quantity ratio represents the proportion of each of the leg of
166  /// interproduct spreads. The Leg ratio denominator will be set to `1` for
167  /// most products not but will be used in future product launches.
169 
170  /// The price ratio is the fractional weighted price component per leg in
171  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
172  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 1 as the
173  /// `LegRatioPriceNumerator`.
175 
176  /// The price ratio is the fractional weighted price component per leg in
177  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
178  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 3 as the
179  /// `LegRatioPriceDenominator`.
181 
182  /// Default constructor.
183  Leg();
184 
185  /// Returns string representation.
186  std::string toString() const;
187  };
188 
189  /// Alias for collection of Legs.
190  typedef std::vector<Leg> Legs;
191 
192  /// Collection of Legs.
193  Legs legs;
194 
195  /// This nested class represents hedge definition.
196  struct ONIXS_ICEMDH_EXPORT Hedge
197  {
198  /// Future's market id of the hedge.
200 
201  /// Security type.
203 
204  /// Hedge side.
206 
207  /// Hedge price.
209 
210  /// Hedge price denominator.
212 
213  /// The strategy code for the leg. If set, this field can be used to
214  /// obtain the next level of granularity of the strategy. If it is not
215  /// set, the /c LegMarketID is the most granular level for the market. See
216  /// Appendix E for list of codes.
218 
219  /// Hedge delta.
220  int delta;
221 
222  /// Default constructor.
223  Hedge();
224 
225  /// Returns string representation.
226  std::string toString() const;
227  };
228 
229  /// Alias for collection of Hedges.
230  typedef std::vector<Hedge> Hedges;
231 
232  /// Collection of Hedges.
233  Hedges hedges;
234 
235  /// Default constructor.
237 
238  /// Initialize from raw message data.
239  NewOptionsStrategyDefinition(const char* data, size_t dataSize);
240 
241  /// Deserialize from raw data.
242  void deserialize(const char* data, size_t dataSize);
243 
244  /// Reset all fields to default values.
245  void reset();
246 
247  /// Returns string representation.
248  std::string toString() const;
249 };
250 
251 /// Make it printable using C++ I/O streams.
252 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const NewOptionsStrategyDefinition&);
253 
254 }}}} // namespace MarketData, iMpact, ICE, OnixS
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