Live Trading

Data Feeds

Introduction

Data feeds are a stream of asset prices and quotes delivered to your trading algorithm during live execution. You need live data feeds to inject data into your algorithm so that you can make real-time trading decisions and so that the values of the securities in your portfolio update in real-time. You can source data from QuantConnect or your brokerage. To view the available data feeds, see Data Feeds.

Bar Building

We aggregate ticks to build bars.

In live trading, bars are built using the exchange timestamps with microsecond accuracy. This microsecond-by-microsecond processing of the ticks can mean that the individual bars between live trading and backtesting can have slightly different ticks. As a result, it's possible for a tick to be counted in different bars between backtesting and live trading, which can lead to bars having slightly different open, high, low, close, and volume values.

Latency

Live data takes time to travel from the source to your algorithm. The data feed has a latency of 20-50 milliseconds. QuantConnect is not designed for high-frequency trading.

History Requests

In live trading, if you make a history request for minute data at noon and the history period covers the start of the previous day to the present moment, the data from the previous day will be backtest data. The data of the current day will be live data that we collected throughout the morning. If you make this history request in a backtest, you might get slightly different data for the current day because of post-processing from the data vendor.

Warm Up Periods

LEAN supports an automated fast-forward system called "Warm Up". It simulates winding back the clock from the time you deploy the algorithm. In a backest, this is the StartDate of your algorithm. In live trading, it's the current date. Warm Up is a great way to prepare your algorithm and its indicators for trading.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: