QuantConnect / QuantConnect/Lean
Review duplicated QuantBook system handler initialization
Open
@jhonabreul is already working on this.
Since Feb 21, 2025.
bug
depth
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
- ideally we don't recreate system handlers twice from the start
Actual Behavior
- start.py (for python) and QuantConnect.csx (for C#) start the system handlers, but later QuantBook constructor is clearing the composer and recreating them. This causes some pain points when using IB as a data provider for example, since it triggers twice it's initialization
Potential Solution
- Start scripts could set a static flag on the QB, which if set we avoid the reset of the composer and we reset this new flag for the next time
Reproducing the Problem
- Start jupyter notebook, create quantbook object
System Information
N/A
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.