Home
Try QuantConnect Now
QuantConnect's LEAN engine manages your portfolio and data feeds letting you focus on your algorithm strategy and execution. Data is piped into your strategy for you to analyze and place trades. We provide portfolio management features and fill modelling underneath the hood automatically.
1
Research Your Strategy
2
Code in Multiple Languages
3
Backtest On Free Intraday Data
4
Deploy to Colocated Servers
public class BasicTemplateAlgorithm : QCAlgorithm { public override void Initialize() { // Setup algorithm requirements: cash, dates and securities. // Initialize is called once at the start of the algorithm. } public override void OnData(Slice data) { // Data requested is then piped into event handlers like this one. } }
class BasicTemplateAlgorithm(QCAlgorithm): def Initialize(self): '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.''' pass def OnData(self, data): '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here. data is a Slice object keyed by symbol containing the stock data''' pass