QuantConnect / QuantConnect/Lean

QC optimizer doesn't support a custom parameter matrix

Open
#8,345 0 comments 1 reaction 0 assignees View on GitHub

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

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 master branch
  • I have confirmed that this is not a duplicate issue by searching issues

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.