Lean
Lean copied to clipboard
Review Security SetModel Python Wrapper Handling
Expected Behavior
- Python model wrapper is only used when required
Actual Behavior
- if the user provides a pure C# instance we don't need a wrapper and it is being used, see SetFeeModel
Potential Solution
- Review existing handling in QCAlgorithm, we already check in different location whether an instance is pure C# or not and handle it correctly
- ideally we should centralize this logic in a helper method
Reproducing the Problem
security.set_fee_model(ConstantFeeModel(0))
See related https://github.com/QuantConnect/Lean/issues/7925
System Information
N/A
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
- [x] I have provided detailed steps to reproduce the issue