QuantConnect / Lean

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
https://lean.io
Apache License 2.0
9.87k stars 3.27k forks source link

Support Live Algorithm Redeployent Holding Custom Data #7518

Open AlexCatarino opened 1 year ago

AlexCatarino commented 1 year ago

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

AmazingAbhi commented 1 year ago

In addition to above, neither of following work with custom data: 1) Using 'Last Portfolio Holdings' when redeploying live algo. Loads none of the previous holdings currently. 2) lean 'submit-order' also doesn't work as it causes the same error