Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Docs: Python custom slippage model — implement get_slippage_approximation, don't subclass ISlippageModel

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

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

まだ誰も着手していません。

評価

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

調査の方向性

skill-templates/orders/SKILL.md と、03 Writing Algorithms/24 Reality Modeling/03 Slippage/01 Key Concepts 配下の Slippage Model Structure ページから始めます。両方のセクションを更新し、指定された組み込みモデルを推奨するとともに、ISlippageModelを継承せず、正確に get_slippage_approximation を使用する単純な Python クラスをドキュメント化します。両方のページにこの修正、価格単位に関するガイダンス、および例が含まれ、矛盾するメソッド名がないことを完了条件とします。

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

説明

missing content writing algorithms

Gap. A Python custom slippage model is a plain class with one method, get_slippage_approximation(self, asset, order) -> float. Generated code guesses the method name (get_slippage, get_slippage_approx, get_price_adjustment, GetPriceChange) or subclasses the interface (class M(ISlippageModel)). Both fail at set_slippage_model: "ISlippageModel must be fully implemented. Please implement these missing methods …: GetSlippageApproximation" or "interface takes exactly one argument". The Model Structure page shows the correct class, but nothing warns about these forms or points to the built-in models that cover most needs.

Evidence (Sep 24–29). ISlippageModel must be fully implemented / object does not implement ISlippageModel: 34 errors from 34 users, plus interface takes exactly one argument: 7 errors from 7 users. In 8 sampled cases, every one used a wrong method name or inherited from ISlippageModel. Fee, fill and buying-power models show no equivalent errors.

Proposed change. In skill-templates/orders/SKILL.md (the "Fee / slippage / fill / buying-power models" section) and 03 Writing Algorithms/24 Reality Modeling/03 Slippage/01 Key Concepts/05 Model Structure:

Prefer a built-in model: ConstantSlippageModel(0.0005) (a percent of price), VolumeShareSlippageModel(), or NullSlippageModel.instance (zero slippage).
For a custom model, write a plain class. Don't inherit from ISlippageModel. Implement exactly get_slippage_approximation, which returns the slippage in price units:

class HalfSpreadSlippageModel:
    def get_slippage_approximation(self, asset: Security, order: Order) -> float:
        return (asset.ask_price - asset.bid_price) / 2

self.securities[symbol].set_slippage_model(HalfSpreadSlippageModel())
主要言語
HTML
スター
261
フォーク
191
平均マージ
4時間 42分
マージ済み PR(30日)
65

環境構築

はじめの一歩

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

QuantConnect/Documentation のほかの issue

QuantConnect/Documentation の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

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

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