QuantConnect / QuantConnect/Lean
QC optimizer doesn't support a custom parameter matrix
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
The QC optimizer should be able to receive a custom 2D matrix of parameters and values such as:
{param_1: [1, 2, 5],
param_2: [10, 15, 35]}
Actual Behavior
The QC optimizer only supports a range of values for each parameter with a static step value, which means that consecutive values in each parameter vector must be equally distant one from another. This poses a problem since a lot of times the sensitive parameter values are found at irregular intervals, and trying every intermediate value in their range increases the optimization cost by a large margin. For example:
# 9 combinations
{param_1: [1, 2, 5],
param_2: [10, 15, 35]}
# vs 30 combinations
{param_1: [1, 2, 3, 4, 5], # step =1
param_2: [10, 15, 20, 25, 30, 35]} # step = 5
Potential Solution
Implementing logic for handling a 2D parameter-value matrix.
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 the QC optimizer entry point and the existing range-based parameter handling. Trace how parameter values and combinations are generated, then identify the tests covering optimizer inputs. Done means accepting the shown irregular value lists and evaluating only their combinations without requiring static steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100