QuantConnect / QuantConnect/Lean

Support Live Algorithm Redeployent Holding Custom Data

Open
#7,518 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

Be able to restart a live algorithm holding custom data. In principle, it should be supported since Lean supports trading custom data.

Actual Behavior

Not supported.

Potential Solution

N/A

Reproducing the Problem

Deploy the CustomDataBitcoinAlgorithm. On the "Algorithm Holdings State", add "BTC.Bitcoin 2S", "BTC", 1, 100.
The algorithm will exit with the following message:

2023-10-16T22:04:53.2525319Z ERROR:: Engine.Run(): During the algorithm initialization, the following exception has occurred: Found unsupported security type in existing brokerage holdings: Base. QuantConnect currently supports the following security types: Equity,Forex,Cfd,Option,Future,FutureOption,IndexOption,Crypto,CryptoFuture

System Information

QuantConnect Cloud and local.

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
  • I have provided detailed steps to reproduce the issue

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 reproducing the failure with CustomDataBitcoinAlgorithm and trace the holdings-restoration path from the Engine.Run() error for the unsupported Base security type. Done means a live algorithm with the specified custom Bitcoin holding can be redeployed without the unsupported-security exception, in both Cloud and local environments.

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.