QuantConnect / QuantConnect/Lean
Support parameters change in real-time for live algorithms
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
User is able to change parameters for an algorithm running on live mode and that may be handled by the algorithm to change it's state. For example, this can be EMA period: user changes it and the corresponding indicator is reset and warmed up from historical data, without the need to re-deploy algorithm.
Also, maybe automatically log parameter values on deployment and when they change, to keep track of their actual values used in the algorithm.
Actual Behavior
Currently user has to re-deploy algorithm in order to update parameters.
Potential Solution
Not sure about implementation details, but for the user side QCAlgorithm class should probably have some callback, like def on_parameter_change(self, new_value, old_value), where it can pick up new parameter value and update algorithm state accordingly.
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 with the QCAlgorithm parameter-handling entry point and trace how live deployments currently receive parameter values. Define the callback and state-update behavior for runtime changes, including the EMA example, and determine where deployment and change values should be logged. Done means supported parameters can change without redeployment while the algorithm updates its state and records the effective values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100