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())
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 atset_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, plusinterface takes exactly one argument: 7 errors from 7 users. In 8 sampled cases, every one used a wrong method name or inherited fromISlippageModel. 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) and03 Writing Algorithms/24 Reality Modeling/03 Slippage/01 Key Concepts/05 Model Structure: