OnixS BME SENAF Handler C++ library  2.2.1
API documentation
Reference.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
5  * copyright law and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable
8  * ONIXS Software Services Agreement (the Agreement) and Customer end user
9  * license agreements granting a non-assignable, non-transferable and
10  * non-exclusive license to use the software for it's own data processing
11  * purposes under the terms defined in the Agreement.
12  *
13  * Except as otherwise granted within the terms of the Agreement, copying or
14  * reproduction of any part of this source code or associated reference material
15  * to any other location for further reproduction or redistribution, and any
16  * amendments to this copyright notice, are expressly prohibited.
17  *
18  * Any reproduction or redistribution for sale or hiring of the Software not in
19  * accordance with the terms of the Agreement is a violation of copyright law.
20  */
21 
22 #pragma once
23 
25 #include <OnixS/Senaf/MarketData/Export.h>
28 
29 #include <iosfwd>
30 #include <string>
31 #include <vector>
32 
33 namespace OnixS { namespace Senaf { namespace MarketData {
34 
35 /// Reference.
36 struct ONIXS_BME_SENAF_EXPORT Reference
37 {
38  /// Default constructor.
39  Reference();
40 
41  /// Market.
42  unsigned char market;
43 
44  /// Instrument Type.
46 
47  /// Reference.
48  unsigned short reference;
49 
50  /// High price /rate possible.
52 
53  /// Low price /rate possible.
55 
56  /// Trading Price Tick.
57  unsigned short tradingPriceTick;
58 
59  /// Trading Yield/Rate Tick.
60  unsigned short tradingYieldRateTick;
61 
62  /// Unitary Volume.
63  unsigned int unitaryVolume;
64 
65  /// Minimum Trading / Delivery Volume.
67 
68  /// Hit Volume.
69  unsigned int hitVolume;
70 
71  /// Compliance Spread.
72  unsigned int complianceSpread;
73 
74  /// Compliance Volume.
75  unsigned int complianceVolume;
76 
77  /// Reference Price / Rate in opening.
79 
80  /// Currency.
81  unsigned char currency;
82 
83  /// Market MIC.
84  std::string marketMIC;
85 
86  /// Traded in Price or Rate.
88 
89  /// Trading Status.
91 
92  /// Special / Normal.
94 
95  /// Standard windows.
97 
98  /// Liquid.
99  bool liquid;
100 
101  /// Trading Obligation.
103 
104  /// Original Request Number
105  unsigned int originalRequestNumber;
106 
107  /// \name Bonds, Strips, Bills, GGB, Corporate New Issues, Cedulas and FROB
108  /// Bonds (001, 002, 003, 009, 010, 011 and 012).
109  //@{
110 
111  /// Reference name.
113 
114  /// ISIN Code or Issuer Code.
116 
117  /// CFI Code.
119 
120  /// FISN.
122 
123  /// Issuer LEI.
125 
126  /// Product Type.
128 
129  /// Contract Value.
131 
132  /// Facial Value.
134 
135  /// Maturity Price.
137 
138  /// Value Date.
140 
141  /// Payment Start Date.
143 
144  /// Next Payment Date.
146 
147  /// Maturity Date.
149 
150  /// Settlement Price of previous session.
152 
153  /// Segment.
155 
156  /// Country.
158 
159  /// Issuer.
161 
162  /// Strippable (Yes/No).
164 
165  /// Benchmark (Yes/No).
167 
168  /// Coupon Periodicity (in months).
170 
171  //@}
172 
173  /// \name Treasury Repo MEFE (BME Clearing-Iberclear), Treasury Repo CNET
174  /// (Clearnet-Iberclear), Bilateral Treasury Repo (No CCP-IberClear) and any
175  /// other Repo instrument (Instrument Types 016 until 031 are reserved for
176  /// other possible Repo instruments).
177  //@{
178 
179  /// Term.
181 
182  /// Purchase leg Value Date.
184 
185  /// Repurchase leg Value Date.
187 
188  /// Reference identifier of the underlying deliverable.
190 
191  /// Delivery restrictions.
193 
194  //@}
195 
196  /// \name Repo deliverable (006)
197  //@{
198 
199  /// Underlying instrument type.
201 
202  /// Starting Price.
204 
205  //@}
206 
207  /// \name Switches (007)
208  //@{
209 
211 
212  /// Leg definition for a Switch.
213  struct SwitchLeg
214  {
215  /// Default constructor.
216  SwitchLeg();
217 
218  /// Instrument type of Underlying / Delivery.
220 
221  /// Reference name.
222  std::string referenceName;
223 
224  /// ISIN Code or Issuer Code.
225  std::string isinCode;
226 
227  /// CFI Code.
228  std::string cfiCode;
229 
230  /// FISN.
231  std::string fisn;
232 
233  /// Issuer LEI.
234  std::string issuerLEI;
235 
236  /// Facial Value.
237  unsigned int facialValue;
238 
239  /// Maturity Price.
240  unsigned int maturityPrice;
241 
242  /// Value Date.
244 
245  /// Payment Start Date.
247 
248  /// Next Payment Date.
250 
251  /// Maturity Date.
253 
254  /// Round Price Tick.
255  unsigned short roundPriceTick;
256 
257  /// Round Yield / Rate Tick.
258  unsigned short roundYield;
259 
260  /// Country.
261  unsigned char country;
262 
263  /// Issuer.
264  std::string issuer;
265 
266  /// Strippable.
268 
269  /// Benchmark.
270  bool benchmark;
271 
272  /// Coupon Periodicity (in months).
274 
275  /// Returns string representation.
276  std::string toString() const;
277  };
278 
279  /// Alias for array of legs of a Switch.
280  typedef std::vector<SwitchLeg> SwitchLegs;
281 
282  /// Legs of a Switch.
284 
285  //@}
286 
287  /// Returns string representation.
288  std::string toString() const;
289 };
290 
291 ONIXS_BME_SENAF_EXPORT std::ostream& operator<<(std::ostream&, const Reference&);
292 
293 }}} // namespace OnixS::Senaf::MarketData
unsigned char couponPeriodicityInMonths
Coupon Periodicity (in months).
Definition: Reference.h:273
Optional< unsigned int > maturityPrice
Maturity Price.
Definition: Reference.h:136
Represents date without time component.
Definition: Time.h:313
int highPriceRatePossible
High price /rate possible.
Definition: Reference.h:51
Optional< unsigned char > segment
Segment.
Definition: Reference.h:154
bool standardWindows
Standard windows.
Definition: Reference.h:96
Optional< unsigned char > country
Country.
Definition: Reference.h:157
Optional< int > startingPrice
Starting Price.
Definition: Reference.h:203
Optional< SwitchLegs > switchLegs
Legs of a Switch.
Definition: Reference.h:283
unsigned short tradingYieldRateTick
Trading Yield/Rate Tick.
Definition: Reference.h:60
int referencePriceRateInOpening
Reference Price / Rate in opening.
Definition: Reference.h:78
Optional< std::string > switchLongName
Definition: Reference.h:210
Optional< std::string > issuer
Issuer.
Definition: Reference.h:160
unsigned int minimumTradingDeliveryVolume
Minimum Trading / Delivery Volume.
Definition: Reference.h:66
Optional< std::string > cfiCode
CFI Code.
Definition: Reference.h:118
std::string referenceName
Reference name.
Definition: Reference.h:222
Optional< std::string > referenceName
Reference name.
Definition: Reference.h:112
std::string marketMIC
Market MIC.
Definition: Reference.h:84
Optional< InstrumentType::Enum > underlyingInstrumentType
Underlying instrument type.
Definition: Reference.h:200
Date paymentStartDate
Payment Start Date.
Definition: Reference.h:246
Optional< std::string > isinCode
ISIN Code or Issuer Code.
Definition: Reference.h:115
InstrumentType::Enum instrumentType
Instrument Type.
Definition: Reference.h:45
unsigned int unitaryVolume
Unitary Volume.
Definition: Reference.h:63
std::string isinCode
ISIN Code or Issuer Code.
Definition: Reference.h:225
unsigned char currency
Currency.
Definition: Reference.h:81
Optional< Date > purchaseLegValueDate
Purchase leg Value Date.
Definition: Reference.h:183
Optional< Date > repurchaseLegValueDate
Repurchase leg Value Date.
Definition: Reference.h:186
Optional< std::string > fisn
FISN.
Definition: Reference.h:121
Optional< std::string > term
Term.
Definition: Reference.h:180
Optional< unsigned char > couponPeriodicityInMonths
Coupon Periodicity (in months).
Definition: Reference.h:169
unsigned int complianceSpread
Compliance Spread.
Definition: Reference.h:72
Optional< bool > strippable
Strippable (Yes/No).
Definition: Reference.h:163
Leg definition for a Switch.
Definition: Reference.h:213
Optional< DeliveryRestrictions::Enum > deliveryRestrictions
Delivery restrictions.
Definition: Reference.h:192
Optional< Date > nextPaymentDate
Next Payment Date.
Definition: Reference.h:145
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
unsigned short roundYield
Round Yield / Rate Tick.
Definition: Reference.h:258
unsigned short tradingPriceTick
Trading Price Tick.
Definition: Reference.h:57
Optional< unsigned int > contractValue
Contract Value.
Definition: Reference.h:130
Optional< Date > paymentStartDate
Payment Start Date.
Definition: Reference.h:142
bool tradingStatus
Trading Status.
Definition: Reference.h:90
InstrumentType::Enum instrumentTypeOfUnderlyingOrDelivery
Instrument type of Underlying / Delivery.
Definition: Reference.h:219
Optional< unsigned char > productType
Product Type.
Definition: Reference.h:127
Optional< unsigned int > facialValue
Facial Value.
Definition: Reference.h:133
Optional< Date > maturityDate
Maturity Date.
Definition: Reference.h:148
Optional< unsigned short > referenceIdentifierOfTheUnderlyingDeliverable
Reference identifier of the underlying deliverable.
Definition: Reference.h:189
unsigned int facialValue
Facial Value.
Definition: Reference.h:237
unsigned short roundPriceTick
Round Price Tick.
Definition: Reference.h:255
Optional< bool > benchmark
Benchmark (Yes/No).
Definition: Reference.h:166
unsigned int complianceVolume
Compliance Volume.
Definition: Reference.h:75
bool tradedInPriceOrRate
Traded in Price or Rate.
Definition: Reference.h:87
unsigned short reference
Reference.
Definition: Reference.h:48
std::vector< SwitchLeg > SwitchLegs
Alias for array of legs of a Switch.
Definition: Reference.h:280
unsigned int maturityPrice
Maturity Price.
Definition: Reference.h:240
unsigned int hitVolume
Hit Volume.
Definition: Reference.h:69
bool tradingObligation
Trading Obligation.
Definition: Reference.h:102
Optional< std::string > issuerLEI
Issuer LEI.
Definition: Reference.h:124
int lowPriceRatePossible
Low price /rate possible.
Definition: Reference.h:54
Optional< int > settlementPriceOfPreviousSession
Settlement Price of previous session.
Definition: Reference.h:151
unsigned int originalRequestNumber
Original Request Number.
Definition: Reference.h:105
bool specialNormal
Special / Normal.
Definition: Reference.h:93
unsigned char market
Market.
Definition: Reference.h:42
Optional< Date > valueDate
Value Date.
Definition: Reference.h:139