Bar Calculation (CTS guidance) and Alpaca Article Discrepancy

I was reading up on how to accurately filter trades. I may have found a discrepancy for condition 9. This article lists condition 9 as being excluded from a close price. However, the CTS document says it should be included if we look at Consolidated UpdateLast column. There are others the article lists as exclusions but they are not necessarily excluded in the CTS document, particularly: 4; P; and Z. Rather, these have notes #2. I raise this issue in case I am looking at this wrong and hope you can clarify it for me. Thank you!

@a.z.ali Great observation and kudos for paying attention to the details. The issue is that the CTS and UTP guidelines really only apply to daily bars. The article you referenced is about how Alpaca calculates minute bars and even then it is a bit out of date. There have been some tweaks to which trades should be excluded from minute bars since that was published. The most up-to-date list can be found in the documentation here.

CTS and UTP don’t provide guidance for which trades to exclude when calculating minute bars. Why would minute bars exclude different trade conditions? Take the example of condition 9. That is a “Corrected Consolidated Close”. It is an informational message to correct a previous “Market Center Closing Trade” (condition 6). This trade may show up minutes or hours after the initial condition 6 trade. It doesn’t reflect the current market conditions. It makes sense to include that if you’re updating a daily bar (to reflect the updated close price) but it doesn’t make sense to include it if you’re updating a minute bar. There are several other “informational” trade conditions which follow the same logic.

If you are wanting to create your own bars from trades then use the conditions table in the documentation.

1 Like

This makes sense now. Thank you for clarifying!