US Equity bar building: FINRA quotes excluded, one-sided periods carry the previous bar's other side, locked/crossed closing book squared onto one side (undocumented)
I maintainer di solito rispondono entro 1 giorno
Una pull request collegata è già stata integrata.
- #2837 di @quantconnect-kronos — integrata
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 28/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- html, php
- Ambito
- data, documentation
Direzione di ricerca
Start with the three statements in Resources/data-feeds/excluded-ticks.php, 03 Bar Building.php and 03 Quote Bar.html, and check linked PR #2837 first, since it already targets this work. Compare each statement with the replay description and the lines 97 to 103 of TickQuoteBarConsolidator.AggregateBar in Lean that the issue cites. Done means the three undocumented rules (FINRA quotes, one-sided periods, crossed closing books) are stated on the pages without contradicting the stored bars.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Three statements on the US Equity bar-building pages do not match what the stored US Equity second (and minute) quote bars contain. A user who rebuilt SPY second QuoteBars from the quote tick files following the documented rules found a small number of bars that match no quote tick; all of them come from the three undocumented points below. Each point was verified by replaying the SPY quote tick files into bars and comparing every bar's closing bid, closing ask, LastBidSize and LastAskSize with the stored second file on four full sessions (2007-05-02, 2007-07-03, 2008-01-09, 2019-06-03); with all three applied the replay reproduces 103,732 of 103,732 bars.
1. FINRA quotes are excluded too, not only FINRA trades
Resources/data-feeds/excluded-ticks.php (included by 03 Writing Algorithms/03 Securities/99 Asset Classes/01 US Equity/08 Data Preparation/03 Bar Building.php) lists the FINRA rule for trades only:
The trade is from the FINRA exchange and FINRA filtering is active for the security.
Once FINRA filtering is active for the day, a quote tick whose exchange is FINRA (D) does not set the bar's bid, ask or sizes either. Measured: SPY 2008-01-09 has 37,322 FINRA quote ticks that pass every other documented rule; keeping them changes 1,314 of the 31,182 stored second bars (SPY 2007-05-02: 91 of 22,910). Suggested wording: "The tick is from the FINRA exchange and FINRA filtering is active for the security" (so it covers quotes), with a sentence that a FINRA quote does not update the bid or ask of the bar after filtering is active.
2. A period with quotes on one side only still carries the other side
06 LEAN Engine/03 Data Format/02 Core Data Types/03 Quote Bar.html says:
If a period has no bid quotes, the four bid price columns are empty and the bid size is 0
That is the shape of the CME file the page illustrates, but not of the US Equity second and minute quote files. There a new period opens from the previous bar's closing bid, closing ask and both last sizes before its first quote is applied (TickQuoteBarConsolidator.AggregateBar in Lean, lines 97 to 103), so a period with quotes on one side only reports the other side's earlier close and size, and a bar can carry a bid or ask size with no quote on that side in the period. Suggested: state that the empty-column form applies to some asset classes (futures, options) and that US Equity second and minute bars open each period from the previous bar's close and last size on both sides.
3. A locked or crossed closing book is squared onto one side
Neither page mentions that when a period's closing bid is above its closing ask, the stored bar sets both sides to one closing price and one last size (one side's close and last size are copied onto the other), so the bar reads as a locked quote with equal sizes and matches no single quote tick. It affected 288 of 15,429 SPY second bars on 2007-07-03 and 13 of 34,211 on 2019-06-03. Suggested: one sentence under Bar Building saying the closing bid and ask of a bar are never left crossed, and that both sides then show the same price and size.
Intercom conversation 215476687728744.
- Lingua principale
- HTML
- Stelle
- 267
- Fork
- 190
- Merge medio
- 8h 38m
- PR unite (30g)
- 69
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QuantConnect/Documentation
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
QuantConnect/Documentation#2845 ·
I maintainer di solito rispondono entro 1 giorno
-
Stale Fills page: market orders now wait for fresh data instead of always filling on stale prices (Lean #9535, #9563)Forse già presa @quantconnect-kronos l’ha presa 1 giorno fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
QuantConnect/Documentation#2844 ·
I maintainer di solito rispondono entro 1 giorno
-
Research resampling example sums quote sizes instead of taking the last sizeForse già presa @jeevanabhi-r l’ha presa 2 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
QuantConnect/Documentation#2838 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
QuantConnect/Documentation#2670 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
QuantConnect/Documentation#2139 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QuantConnect/Documentation
Issue simili
-
author-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
acl-org/acl-anthology#10808 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TMHSDigital/Free-Game-Dev-Assets#246 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
endoflife-date/endoflife.date#11558 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Run request: CRCNS:ssc-11Apertaqueued run-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
catalystneuro/encore#571 ·
I maintainer di solito rispondono entro 1 giorno