Stale Fills page: market orders now wait for fresh data instead of always filling on stale prices (Lean #9535, #9563)

オープン 初心者向け
#2,844 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@quantconnect-kronos がすでに取り組んでいます。

2026年11月5日 から。

  • #2846 @quantconnect-kronos による — オープン

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
html
領域
documentation

調査の方向性

Resources/order-types/stale-fills.htmlと、fill-with-stale-data.phpを含む参照先のEquityページから始め、現在の文言をengineの動作およびissueで提案されている変更と比較してください。データ解像度に応じて古い市場注文がいつ待機するのか、stale_price_time_spanがどのように経過時間のしきい値を設定するのか、古い価格の警告がいつ表示されるのかを説明してください。ページがこれらのケースを正確に説明できていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Page

Resources/order-types/stale-fills.html, rendered at https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/trade-fills/key-concepts#06-Stale-Fills (and included by the Equity model's limit / stop / trailing-stop pages via fill-with-stale-data.php).

What it says

The pre-built fill models can only fill market orders with stale data.

What the engine does since Lean PR #9535 (2026-06-18) and #9563 (2026-07-01)

A market order whose best available price is older than StalePriceTimeSpan (default one hour) no longer fills on that stale price in every case. FillModel.InternalMarketFill calls ShouldWaitForFreshDataOnStale, which keeps the order pending (status Submitted) and waits for fresher data when:

  • the asset is subscribed only at hour or daily resolution (always waits), or
  • at minute / second resolution, the latest data end time is more than one resolution bar behind the order submission time.

Only tick subscriptions still fill on the stale price with the Warning: fill at stale price message. When a waiting market order fills, it fills at the open of the bar trading resumed on when the order was resting before that bar (GetMarketFillPrice, hour/daily only).

Verified on a backtest on LEAN 18226: a market order on a minute-resolution Binance crypto future whose last cached bar ended two hours before submission stayed Submitted until newer data arrived, then filled.

Suggested change

Describe the wait: a market order on data older than StalePriceTimeSpan fills immediately only on tick data; on minute/second data it waits when the data is more than one bar behind the order time, and on hour/daily data it waits for the next bar; stale_price_time_span sets the age threshold. The same page could mention that the warning message is attached only when the order does fill on stale data.

主要言語
HTML
スター
267
フォーク
190
平均マージ
8時間 38分
マージ済み PR(30日)
69

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/Documentation のほかの issue

QuantConnect/Documentation の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。