QuantConnect / QuantConnect/Lean

Live Trading Restarts Fetch Open Insights

Open
#6,722 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
2d 22h
Merged PRs (30d)
34

Description

Expected Behavior

When an algorithm is restarted in live mode, it doesn't take into account open Insights.

Actual Behavior

When an algorithm is restarted in live mode, the open Insights from the previous deployment are loaded.

Potential Solution

Save the open Insights, and load them along the get open positions logic.
Insight's don't have a global manager like the SecurityTransactionManager for orders.

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 reading SecurityTransactionManager and the existing logic that loads open positions during a live restart, then inspect how open Insights are represented and persisted. Clarify the contradictory expected and actual behavior, and consider the issue done when a restarted live algorithm handles open Insights from the previous deployment consistently with the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
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.