Lean  $LEAN_TAG$
TradeConditionFlags.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14 */
15 
16 using System;
17 using System.ComponentModel;
18 
20 {
21  /// <summary>
22  /// Flag system for trade conditions
23  /// </summary>
24  [Flags]
25  public enum TradeConditionFlags: long
26  {
27  /// <summary>
28  /// No Condition
29  /// </summary>
30  None = 0,
31 
32  /// <summary>
33  /// A trade made without stated conditions is deemed regular way for settlement on the third business day following the transaction date.
34  /// </summary>
35  [Description("A trade made without stated conditions is deemed regular way for settlement on the third business day following the transaction date.")]
36  Regular = 1L << 0,
37 
38  /// <summary>
39  /// A transaction which requires delivery of securities and payment on the same day the trade takes place.
40  /// </summary>
41  [Description("A transaction which requires delivery of securities and payment on the same day the trade takes place.")]
42  Cash = 1L << 1,
43 
44  /// <summary>
45  /// A transaction that requires the delivery of securities on the first business day following the trade date.
46  /// </summary>
47  [Description("A transaction that requires the delivery of securities on the first business day following the trade date.")]
48  NextDay = 1L << 2,
49 
50  /// <summary>
51  /// A Seller’s Option transaction gives the seller the right to deliver the security at any time within a specific period,
52  /// ranging from not less than two calendar days, to not more than sixty calendar days.
53  /// </summary>
54  [Description("A Seller’s Option transaction gives the seller the right to deliver the security at any time within a specific period, " +
55  "ranging from not less than two calendar days, to not more than sixty calendar days.")]
56  Seller = 1L << 3,
57 
58  /// <summary>
59  /// Market Centers will have the ability to identify regular trades being reported during specific events as out of the ordinary
60  /// by appending a new sale condition code Yellow Flag (Y) on each transaction reported to the UTP SIP.
61  /// The new sale condition will be eligible to update all market center and consolidated statistics.
62  /// </summary>
63  [Description("Market Centers will have the ability to identify regular trades being reported during specific events as out of the ordinary " +
64  "by appending a new sale condition code Yellow Flag (Y) on each transaction reported to the UTP SIP." +
65  "The new sale condition will be eligible to update all market center and consolidated statistics.")]
66  YellowFlag = 1L << 4,
67 
68  /// <summary>
69  /// The transaction that constituted the trade-through was the execution of an order identified as an Intermarket Sweep Order.
70  /// </summary>
71  [Description("The transaction that constituted the trade-through was the execution of an order identified as an Intermarket Sweep Order.")]
72  IntermarketSweep = 1L << 5,
73 
74  /// <summary>
75  /// The trade that constituted the trade-through was a single priced opening transaction by the Market Center.
76  /// </summary>
77  [Description("The trade that constituted the trade-through was a single priced opening transaction by the Market Center.")]
78  OpeningPrints = 1L << 6,
79 
80  /// <summary>
81  /// The transaction that constituted the trade-through was a single priced closing transaction by the Market Center.
82  /// </summary>
83  [Description("The transaction that constituted the trade-through was a single priced closing transaction by the Market Center.")]
84  ClosingPrints = 1L << 7,
85 
86  /// <summary>
87  /// The trade that constituted the trade-through was a single priced reopening transaction by the Market Center.
88  /// </summary>
89  [Description("The trade that constituted the trade-through was a single priced reopening transaction by the Market Center.")]
90  ReOpeningPrints = 1L << 8,
91 
92  /// <summary>
93  /// The transaction that constituted the trade-through was the execution of an order at a price that was not based, directly or indirectly,
94  /// on the quoted price of the security at the time of execution and for which the material terms were not reasonably determinable
95  /// at the time the commitment to execute the order was made.
96  /// </summary>
97  [Description("The transaction that constituted the trade-through was the execution of an order at a price that was not based, directly or indirectly, " +
98  "on the quoted price of the security at the time of execution and for which the material terms were not reasonably determinable " +
99  "at the time the commitment to execute the order was made.")]
100  DerivativelyPriced = 1L << 9,
101 
102  /// <summary>
103  /// Trading in extended hours enables investors to react quickly to events that typically occur outside regular market hours, such as earnings reports.
104  /// However, liquidity may be constrained during such Form T trading, resulting in wide bid-ask spreads.
105  /// </summary>
106  [Description("Trading in extended hours enables investors to react quickly to events that typically occur outside regular market hours, such as earnings reports." +
107  "However, liquidity may be constrained during such Form T trading, resulting in wide bid-ask spreads.")]
108  FormT = 1L << 10,
109 
110  /// <summary>
111  /// Sold Last is used when a trade prints in sequence but is reported late or printed in conformance to the One or Two Point Rule.
112  /// </summary>
113  [Description("Sold Last is used when a trade prints in sequence but is reported late or printed in conformance to the One or Two Point Rule.")]
114  Sold = 1L << 11,
115 
116  /// <summary>
117  /// The transaction that constituted the trade-through was the execution by a trading center of an order for which, at the time
118  /// of receipt of the order, the execution at no worse than a specified price a 'stopped order'
119  /// </summary>
120  [Description("The transaction that constituted the trade-through was the execution by a trading center of an order for which, at the time" +
121  "of receipt of the order, the execution at no worse than a specified price a 'stopped order'")]
122  Stopped = 1L << 12,
123 
124  /// <summary>
125  /// Identifies a trade that was executed outside of regular primary market hours and is reported as an extended hours trade.
126  /// </summary>
127  [Description("Identifies a trade that was executed outside of regular primary market hours and is reported as an extended hours trade.")]
128  ExtendedHours = 1L << 13,
129 
130  /// <summary>
131  /// Identifies a trade that takes place outside of regular market hours.
132  /// </summary>
133  [Description("Identifies a trade that takes place outside of regular market hours.")]
134  OutOfSequence = 1L << 14,
135 
136  /// <summary>
137  /// An execution in two markets when the specialist or Market Maker in the market first receiving the order agrees to execute a portion of it
138  /// at whatever price is realized in another market to which the balance of the order is forwarded for execution.
139  /// </summary>
140  [Description("An execution in two markets when the specialist or Market Maker in the market first receiving the order agrees to execute a portion of it " +
141  "at whatever price is realized in another market to which the balance of the order is forwarded for execution.")]
142  Split = 1L << 15,
143 
144  /// <summary>
145  /// A transaction made on the Exchange as a result of an Exchange acquisition.
146  /// </summary>
147  [Description("A transaction made on the Exchange as a result of an Exchange acquisition.")]
148  Acquisition = 1L << 16,
149 
150  /// <summary>
151  /// A trade representing an aggregate of two or more regular trades in a security occurring at the same price either simultaneously
152  /// or within the same 60-second period, with no individual trade exceeding 10,000 shares.
153  /// </summary>
154  [Description("A trade representing an aggregate of two or more regular trades in a security occurring at the same price either simultaneously " +
155  "or within the same 60-second period, with no individual trade exceeding 10,000 shares.")]
156  Bunched = 1L << 17,
157 
158  /// <summary>
159  /// Stock-Option Trade is used to identify cash equity transactions which are related to options transactions and therefore
160  /// potentially subject to cancellation if market conditions of the options leg(s) prevent the execution of the stock-option
161  /// order at the price agreed upon.
162  /// </summary>
163  [Description("Stock-Option Trade is used to identify cash equity transactions which are related to options transactions and therefore" +
164  "potentially subject to cancellation if market conditions of the options leg(s) prevent the execution of the stock-option" +
165  "order at the price agreed upon.")]
166  StockOption = 1L << 18,
167 
168  /// <summary>
169  /// Sale of a large block of stock in such a manner that the price is not adversely affected.
170  /// </summary>
171  [Description("Sale of a large block of stock in such a manner that the price is not adversely affected.")]
172  Distribution = 1L << 19,
173 
174  /// <summary>
175  /// A trade where the price reported is based upon an average of the prices for transactions in a security during all or any portion of the trading day.
176  /// </summary>
177  [Description("A trade where the price reported is based upon an average of the prices for transactions in a security during all or any portion of the trading day.")]
178  AveragePrice = 1L << 20,
179 
180  /// <summary>
181  /// Indicates that the trade resulted from a Market Center’s crossing session.
182  /// </summary>
183  [Description("Indicates that the trade resulted from a Market Center’s crossing session.")]
184  Cross = 1L << 21,
185 
186  /// <summary>
187  /// Indicates a regular market session trade transaction that carries a price that is significantly away from the prevailing consolidated or primary market value at the time of the transaction.
188  /// </summary>
189  [Description("Indicates a regular market session trade transaction that carries a price that is significantly away from the prevailing consolidated or primary market value at the time of the transaction.")]
190  PriceVariation = 1L << 22,
191 
192  /// <summary>
193  /// To qualify as a NYSE AMEX Rule 155
194  /// </summary>
195  [Description("To qualify as a NYSE AMEX Rule 155")]
196  Rule155 = 1L << 23,
197 
198  /// <summary>
199  /// Indicates the ‘Official’ closing value as determined by a Market Center. This transaction report will contain the market center generated closing price.
200  /// </summary>
201  [Description("Indicates the ‘Official’ closing value as determined by a Market Center. This transaction report will contain the market center generated closing price.")]
202  OfficialClose = 1L << 24,
203 
204  /// <summary>
205  /// A sale condition that identifies a trade based on a price at a prior point in time i.e. more than 90 seconds prior to the time of the trade report.
206  /// The execution time of the trade will be the time of the prior reference price.
207  /// </summary>
208  [Description("A sale condition that identifies a trade based on a price at a prior point in time i.e. more than 90 seconds prior to the time of the trade report. " +
209  "The execution time of the trade will be the time of the prior reference price.")]
210  PriorReferencePrice = 1L << 25,
211 
212  /// <summary>
213  /// Indicates the ‘Official’ open value as determined by a Market Center. This transaction report will contain the market
214  /// </summary>
215  [Description("Indicates the ‘Official’ open value as determined by a Market Center. This transaction report will contain the market")]
216  OfficialOpen = 1L << 26,
217 
218  /// <summary>
219  /// The CAP Election Trade highlights sales as a result of a sweep execution on the NYSE, whereby CAP orders have been elected and executed
220  /// outside the best price bid or offer and the orders appear as repeat trades at subsequent execution prices.
221  /// This indicator provides additional information to market participants that an automatic sweep transaction has occurred with repeat
222  /// trades as one continuous electronic transaction.
223  /// </summary>
224  [Description("The CAP Election Trade highlights sales as a result of a sweep execution on the NYSE, whereby CAP orders have been elected and executed " +
225  "outside the best price bid or offer and the orders appear as repeat trades at subsequent execution prices. " +
226  "This indicator provides additional information to market participants that an automatic sweep transaction has occurred with repeat " +
227  "trades as one continuous electronic transaction.")]
228  CapElection = 1L << 27,
229 
230  /// <summary>
231  /// A sale condition code that identifies a NYSE trade that has been automatically executed without the potential benefit of price improvement.
232  /// </summary>
233  [Description("A sale condition code that identifies a NYSE trade that has been automatically executed without the potential benefit of price improvement.")]
234  AutoExecution = 1L << 28,
235 
236  /// <summary>
237  /// Denotes whether or not a trade is exempt (Rule 611) and when used jointly with certain Sale Conditions,
238  /// will more fully describe the characteristics of a particular trade.
239  /// </summary>
240  [Description("Denotes whether or not a trade is exempt (Rule 611) and when used jointly with certain Sale Conditions, " +
241  "will more fully describe the characteristics of a particular trade.")]
242  TradeThroughExempt = 1L << 29,
243 
244  /// <summary>
245  /// This flag is present in raw data, but AlgoSeek document does not describe it.
246  /// </summary>
247  [Description("This flag is present in raw data, but AlgoSeek document does not describe it.")]
248  UndocumentedFlag = 1L << 30,
249 
250  /// <summary>
251  /// Denotes the trade is an odd lot less than a 100 shares.
252  /// </summary>
253  [Description("Denotes the trade is an odd lot less than a 100 shares.")]
254  OddLot = 1L << 31,
255  }
256 }