Live Trading
Key Concepts
Algorithm Portfolio
The live trading algorithm portfolio is loaded from the brokerage holdings, including open orders. When there are unsupported asset types in the portfolio the live trading strategy is stopped as we cannot be sure how to model the asset.
In paper trading the algorithm starts from no portfolio, and attempts to remember the previous portfolio state from the last time the portfolio was deployed.
Your algorithm should not assume it starts from an empty portfolio as you may have holdings from previous deployments.
Stateful Strategies
There is no automatic state management of live strategies in QuantConnect. We recommend algorithms reconstruct state or indicator needs using the WarmUp and History methods.
Once the algorithm has warmed up some objects you can use the Object Store to save the data for the next algorithm restart.
In the event the algorithm is terminated unexpectedly, you should review the live algorithm portfolio at the brokerage to confirm it will behave as expected.
Latency
Live data takes time to travel from the source to your algorithm. The QuantConnect latencies vary depending on the data provider, but for US Equities, we have a latency of 5-40 milliseconds. A much more significant source of latency is the round trip order times from brokers, which can vary from 100ms to 5 seconds. QuantConnect is not intended for high-frequency trading, but we have integrations to high-speed brokers if you need.