QuantConnect / QuantConnect/Lean
Data types can define how they update security cache
Open
Nobody has claimed this yet.
depth
feature
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
- Data sources can define a way to update the security cache price properties
See related https://github.com/QuantConnect/Lean/pull/7808
Actual Behavior
Not possible. Security cache class knows how to handle trade/tick/quote bars, does not how to handle python data for example
Potential Solution
- We can create a base virtual function in BaseData class
- override in quotebar/tradebar and tick, this would just be moving the code from the security cache into each specific data type
- at this point custom data sources in python could define their own implementation. We could explore adding a helper method for o/h/l/c/v just to make users life easier
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
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.
Research direction
Start by locating BaseData and SecurityCache, then inspect how trade bars, quote bars, and ticks currently update security-cache price properties. The change is complete when custom data sources, including Python data, can define their own cache update behavior while existing data types retain their handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- backend, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100