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)
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #2837 @quantconnect-kronos による — マージ済み
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 28/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- html, php
- 領域
- data, documentation
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- HTML
- スター
- 267
- フォーク
- 190
- 平均マージ
- 8時間 38分
- マージ済み PR(30日)
- 69
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QuantConnect/Documentation のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
QuantConnect/Documentation#2845 ·
メンテナーはふだん 1 日以内に返信
-
Stale Fills page: market orders now wait for fresh data instead of always filling on stale prices (Lean #9535, #9563)対応中かも @quantconnect-kronos が 3 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
QuantConnect/Documentation#2844 ·
メンテナーはふだん 1 日以内に返信
-
Research resampling example sums quote sizes instead of taking the last size対応中かも @jeevanabhi-r が 4 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
QuantConnect/Documentation#2838 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
QuantConnect/Documentation#2670 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
QuantConnect/Documentation#2139 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
QuantConnect/Documentation の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
BUG: Series.dt.total_seconds raises ArrowInvalid for duration[ns][pyarrow] longer than ~104 daysオープンBug Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pandas-dev/pandas#71953 ·
メンテナーはふだん 1 日以内に返信
-
check:passed logos:add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
handsontable/hyperformula#1884 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] NeuralChunker reuses IDs after expanding an earlier segment対応中かも @Elon-Jiang が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 8 日以内に返信