Quantconnect Cloud Platform Python
Quantconnect Cloud Platform Python
QuantConnect
and Explore
Features
CLOUD PLATFORM
Quant Research
in the Cloud
Quickly deploy quantitative
strategies on the QuantConnect
Cloud Platform.
Table of Content
1 Welcome
2 Getting Started
3 Security and IP
4 Organizations
4.3 Resources
4.4 Object Store
4.5 Support
4.6 Members
4.7 Administration
4.8 Billing
4.9 Credit
4.10 Training
5 Learning Center
5.1 Training
5.2 Educators
6.3 Files
6.4 IDE
6.5 Encryption
6.6 Debugging
6.7 Collaboration
7 Research
7.1 Getting Started
7.2 Deployment
8 Backtesting
9 Datasets
9.1 Navigating the Market
9.2 Categories
9.3 Data Issues
9.4 Misconceptions
9.5 Licensing
9.6 Vendors
9.7 QuantConnect
9.7.1 US Equities
9.7.2 Crypto
9.7.3 Crypto Futures
9.7.4 CFD
9.7.5 Forex
9.7.6 Futures
9.7.7 Future Options
9.7.8 Alternative Data
9.8 Alpaca
9.13 TradeStation
9.14 Tradier
9.15 Zerodha
10 Live Trading
10.1 Getting Started
10.2 Brokerages
10.2.1 QuantConnect Paper Trading
10.2.2 Alpaca
10.2.3 Binance
10.2.4 Bitfinex
10.2.5 ByBit
10.2.6 Coinbase
10.2.7 Interactive Brokers
10.2.8 Kraken
10.2.9 Oanda
10.2.10 Samco
10.2.11 TD Ameritrade
10.2.12 TradeStation
10.2.13 Tradier
10.8 Risks
11 Optimization
11.1 Getting Started
11.2 Parameters
11.3 Objectives
11.4 Strategies
11.5 Deployment
11.6 Results
12 Object Store
13 Community
13.1 Code of Conduct
13.2 Forum
13.3 Discord
13.4 Profile
13.5 Quant League
13.6 Academic Grants
14.2.6 Nodes
14.2.6.1 Read Project Nodes
14.2.6.2 Update Project Nodes
14.5.2.2 Charts
14.5.2.3 Orders
14.5.2.4 Insights
14.5.3 Update Backtest
14.6.2.5 Insights
14.6.2.6 Logs
14.6.3 Update Live Algorithm
14.6.3.1 Liquidate Live Portfolio
14.6.3.2 Stop Live Algorithm
14.6.4 List Live Algorithms
14.6.5 Live Commands
14.7 Optimization Management
Welcome
QuantConnect is an open-source, community-driven algorithmic trading platform. Our trading engine is powered by LEAN , a
cross-platform, multi-asset technology that brings cutting-edge finance to the open-source community. We support Python and
C# programming languages.
Our Mission
Quantitative trading infrastructure should be open-source. Millions of financial engineers rewrite the same infrastructure and
then keep their work closed to make it harder for competing trading firms. We take a radically open approach to quant finance
and let our users focus on alpha, not infrastructure.
The future of finance is automated and we are the open-source infrastructure to power this future. Firms choose our open-
source platform as it provides a 10-100x improvement in time to market and substantially reduces the risk of developing your
quantitative tools. As our brokerage and data integrations expand, this leverage will be more exceptional.
Everyone should have access to quantitative finance. Algorithmic trading is a powerful tool and we want to open it up to all
investors. We do this with transparent, scalable pricing that allows all investors to access quantitative finance. For more
information on our mission, check out our Manifesto .
Data Library
We provide an enormous library of data for your backtesting, research, and live trading. The library includes data for Equities,
Options, Futures, CFDs, Forex, Crypto, Indices, and alternative data. The library is roughly 400TB in size, contains trade data
that spans decades into the past, and comes in tick to daily resolutions. View the Dataset Market to see all of the datasets that
we have available, including their respective start dates, end dates, and resolutions. The following image shows the integrated
data providers:
Business Model
QuantConnect provides cloud infrastructure as a service, similar to many cloud compute vendors. We encourage quants and
start up firms to grow within our ecosystem to keep our pricing accessible to individuals and small firms.
For companies interested in running QuantConnect on-premise, we can install it within your corporate firewall and help you get
set up with financial data. We charge a set up and maintenance fee for these installations.
Getting Started
Getting Started
Guide through creating a project, running your first backtest, and live algo trading.
Follow these steps to create, backtest, and paper trade a new algorithm:
The backtest results page displays your algorithmʼs performance over the backtest period.
7. On the Deploy Live page, click the Brokerage field and then click Paper Trading from the drop-down menu.
8. Click Deploy .
The live results page displays your algorithmʼs live trading performance.
To deploy a live algorithm with a different brokerage, see the Deploy Live Algorithms section of the brokerage integration
documentation .
Security and IP
Security and IP
Introduction
You own all your intellectual property and your code. Your code is private by default unless you explicitly share it with the
community in the forums or with another team member via collaboration. You are creating valuable intellectual property, and we
respect this and wish to make it easier. We limit the QuantConnect staff members who have access to the database. If we ever
need access to your algorithm for debugging, then we will explicitly request permission first.
Intellectual Property
The following sections explain our commitment to protecting your intellectual property.
Ownership
You own all your intellectual property and your code. Your code is private by default unless you explicitly share it with the
community in the forums or with another team member via collaboration. You are creating valuable intellectual property; we
respect this and wish to make it easier. We document this publicly in our Terms of Service .
Alignment
Beyond words and our legal terms of service, we live this through the alignment of our business model with you, our clients. We
aim for you to become more successful, thereby growing within our ecosystem. We've served start-up quant funds as they've
grown from 0to1B+ AUM.
Established in 2012, we have a pristine reputation and a 10+ year record of protecting our community's intellectual property. We
have served more than 200,000 clients. If we were to violate the trust of even a single client, we'd lose the entire community's
faith - it is simply not worth it. We seek to change the future of finance and are driven by this mission.
Sharing
QuantConnect provides support with a specific support agent, not an anonymous team. When submitting a support ticket, you
explicitly grant that team member access to your project. You can remove the support agent from your project collaboration at
any time.
Security
We take a multi-level approach to security, from physical security to digital and information systems, internal processes, and
testing.
Physical access to our servers is limited to a few dedicated team members whom QuantConnect has vetted. Only those
credentialed team members can access the physical servers, and we schedule all work in advance. Work on the servers is
always done in pairs to prevent single rogue actors from accessing the servers. We host our servers in a world-class security
facility (Equinix) with security staff 24/7.
We use all good common sense information security processes: passwordless servers, encryption in the database and backups,
encrypted traffic, and network monitoring. We keep most of our servers off the internet and only available on private networks
for the smallest possible surface area. We have regular network and code penetration testing. All code is containerized and
isolated in services so that root network access would provide little-to-no benefit.
Beyond these basics, we've built active monitoring technology that proactively detects and blocks threats. We have human
detection services to reduce the chances of brute-force attacks. We have documented processes for client notifications in the
Processes
Deployment environments are automated and enforce code peer-review to be deployed, reducing the chances of a rogue
internal agent.
We limit staff access to the physical servers, restricting core database access to only a handful of senior staff. Database
credentials are carefully restricted in scope, access locations and frequently rotated.
Privacy
Protecting users' private and intellectual property is of utmost importantance to us. QuantConnect complies with GDPR and all
relevant privacy laws. We will never sell or publish your email address. We request knowledge of your real identity to ensure
compliance with our data licenses but accept using an alias on public profiles for privacy. For more information about what data
we collect, which tracking technologies we use, and how we use and share your data, see our Privacy Policy .
Code Encryption
When the above processes and track record are insufficient, we offer ways to encrypt your code while working on the
QuantConnect platform. Our encryption feature uses a locally hosted key to encrypt code at rest in our database with AES256
encryption. In case of a compromised database or rouge agent, your code would not be readable. For more information on this
feature, see Project Encryption .
On-Premise Installations
QuantConnect technology can be installed fully on-premise, fulfilling the requirements of even the strictest compliance
departments. This technology, called the Local Platform, provides the same user interface as our cloud environment with
support for fully offline "anonymous" project development. For more information on this feature, see the Local Platform .
Organizations
Organizations
An organization is a collection of members that share hardware resources, share access to datasets, and collaborate together to
develop projects. Hardware resources are used to run backtests, launch research notebooks, deploy live trading algorithms, and
store project data. You can create new organizations and join existing ones. You can be a member in any number of
organizations. We offer several organization tiers so you can tailor your team's subscriptions as you grow over time. For the
times when you need access to a QuantConnect engineer to help solve development issues, assign support seats among your
team. There are several tiers of support seats to match the level of support your team requires.
Getting Started
Tier Features
Resources
Object Store
File system that you can use in your algorithms to save, read, and delete data
Support
Members
Administration
Billing
Credit
Training
See Also
Collaboration
Learning Center
Organizations > Getting Started
Organizations
Getting Started
Introduction
An organization is a collection of members that share hardware resources, share access to datasets, and collaborate together to
develop projects. Hardware resources are used to run backtests, launch research notebooks, deploy live trading algorithms, and
store project data. You can create new organizations and join existing ones. You can be a member in any number of
organizations. We offer several organization tiers so you can tailor your team's subscriptions as you grow over time. For the
times when you need access to a QuantConnect engineer to help solve development issues, assign support seats among your
team. There are several tiers of support seats to match the level of support your team requires.
Add Organizations
Switch Organizations
Rename Organizations
3. Enter the new organization name and then click Save Changes .
Organizations
Tier Features
Introduction
An organization is a collection of members that share hardware resources, share access to datasets, and collaborate together to
develop projects. Hardware resources are used to run backtests, launch research notebooks, deploy live trading algorithms, and
store project data. You can create new organizations and join existing ones. You can be a member in any number of
organizations. We offer several organization tiers so you can tailor your team's subscriptions as you grow over time. For the
times when you need access to a QuantConnect engineer to help solve development issues, assign support seats among your
team. There are several tiers of support seats to match the level of support your team requires.
Organizations let you coordinate resources and teamwork on QuantConnect Cloud. There are 5 tiers of organizations and each
tier has its own set of features. Each account starts with a personal organization on the Free tier with access to one free
backtest node and one free research node. However, to accommodate the growth of your trading skills and business, you can
adjust the tier of your organization at any time. Higher tiers offer more live nodes to run more live algorithms, more backtesting
nodes for faster concurrent backtesting, and many other features.
Free Tier
The Free tier provides cloud access to datasets for all of the asset classes in our Datasets Market . The free data ranges from
minute to daily resolutions and can be used to either run backtests or perform analysis in the Research Environment . When
backtesting, Free organizations have access to our built-in auto-complete and debugging features in the web IDE. After a
successful backtest, Free organizations can use our report generator to create professional-grade reports that reflect their
backtest performance. Free organizations have access to our online documentation, community forum, YouTube channel, and
Learning Center.
The Quant Researcher tier is designed for self-directed investors, students, academics, and independent traders seeking to
manage their personal portfolio. We recommend the Quant Researcher Pack to make the most of QuantConnect.
The Quant Researcher tier builds on the features included in the Free tier. Organizations on the Quant Researcher tier have
access to the QuantConnect API and can use the CLI to run Lean locally. When members in these organizations need assistance
from a QuantConnect engineer, support seats are available to request private support . Members within Quant Researcher
organizations that have the required permissions can adjust the resources within the organization.
In Quant Researcher organizations, members can use second and tick resolution data from the Datasets Market. There is no
limit on the number of projects these organizations can hold. They can produce up to 100KB of logs/backtest, 3MB of logs/day.
10 million orders/backtest, and can have up to two backtesting nodes to run up to two concurrent backtests. Members in these
organizations can have up to two active coding sessions in the organization. After a successful backtest, members in these
organizations can use parameter optimization tools to improve the performance of their backtest. When the members are ready
to deploy strategies live, Quant Researcher organizations can subscribe to up to 2 live trading nodes to unlock live trading with
real or paper money. Each live algorithm in a Quant Research organization can send up to 20 Telegram, Email, or Webhook
notifications per hour for free. SMS notifications and additional Telegram, Email, or Webhook notifications require QuantConnect
Credit (QCC).
Team Tier
The Team tier is designed for sophisticated individuals and teams of quant collaborators such as Quant Start Ups, Fintech
Companies, and Emerging Managers. We recommend the Team Pack to make the most of QuantConnect.
The Team tier expands on the features included in the Quant Researcher tier. Organizations on the Team tier can have up to 10
members and the members can collaborate on projects together. These organizations can produce 1MB of logs/backtest, 10MB
of logs/day, and there is no limit on the number of orders that they can place in backtests. Organizations on the Team tier can
have up to 10 backtesting nodes, 10 research nodes, and 10 live trading nodes. Members in these organizations can have up to
To accommodate a large number of projects in Team organizations, these organizations can expand the capacity of their Object
Store up to 10GB. Annual contracts for onboarding services are available on request to get teams operational in the shortest
amount of time. When live trading, Team organizations have more options than the lower tiers because both the Trading
Technologies brokerage and our live Futures data provider are available. Each live algorithm in a Team organization can send up
The Trading Firm tier is designed for growing quantitative firms, prop desks, hedge funds, ETF companies, professional teams
of quants, and sophisticated independent investors. It has special features for collaborating with consultants to protect the
investor IP. If you are a company on QuantConnect, we recommend the Trading Firm Pack to make the most of QuantConnect.
The Trading Firm tier builds on the features included in the Team tier. Organizations on the Trading Firm tier can have an
unlimited number of members and an unlimited number of collaborators simultaneously working on individual projects. The IP
ownership of all the projects in these organizations remains within the organization. There is no limit on the number of
backtesting, research, and live trading nodes these organizations can rent. They can produce 5MB of logs/backtest and 50MB
of logs/day. Members in these organizations can have up to eight active coding sessions in the organization. Each live algorithm
in a Trading Firm organization can send up to 240 Telegram, Email, or Webhook notifications per hour for free.
The owner of a Trading Firm organization can grant various permissions to the organizationʼs members, including designating a
member to manage the organization's billing. These organizations have access to custom lean builds, so they can use feature
branches or historical master branches to run their strategies. An example of this could be granting only a few members of your
In addition to the brokerages and data providers available to Team organizations, Trading Firm organizations can use Interactive
Institution Tier
The Institution tier is designed for established larger funds, large prop desks, hedge funds, banks, ETF vehicles, and
professional teams of quants. It is "unlocked", so you can run it on premise to serve your internal teams. If this sounds
interesting, reach out and we'd be happy to arrange a demonstration for your department.
The Institution tier builds on the features included in the Trading Firm tier. Organizations on the institutional tier have no limit on
the number of backtest logs that they can produce, and each member of the organization can have up to 16 active coding
sessions. These organizations can use Terminal Link to live trade Equities, Futures, and Options via the Bloomberg EMSX. They
can also request custom libraries and frameworks to use in the QuantConnect web IDE and receive instant messaging support
from a QuantConnect engineer. Each live algorithm in an Institution organization can send up to 3,600 Telegram, Email, or
Institutional clients can run our proprietary build of LEAN, LEAN Enterprise, on-premise. LEAN Enterprise holds speed
improvements we haven't pushed to the open-source.
Organizations > Resources
Organizations
Resources
Introduction
Organizations can subscribe to hardware resources to run backtests, launch research notebooks, and deploy live trading
algorithms to co-located servers. Organizations also have access to storage resources via the Object Store to store data
between backtests or live trading deployments. To promote efficiency, all of these resources within your organization are
shared among all of the members within the organization. A team of several quants can all share one backtest, research, and
Backtesting Nodes
Backtesting nodes enable you to run backtests. The more backtesting nodes your organization has, the more concurrent
backtests that you can run. Several models of backtesting nodes are available. Backtesting nodes that are more powerful can
run faster backtests and backtest nodes with more RAM can handle more memory-intensive operations like training machine
learning models, processing Options data, and managing large universes. The following table shows the specifications of the
Processing Speed
Name Number of Cores RAM (GB) GPU
(GHz)
B-MICRO 2 3 8 0
B2-8 2 4.9 8 0
B4-12 4 4.9 12 0
B4-16-GPU 4 3 16 1/3
B8-16 8 4.9 16 0
Refer to the Pricing page to see the price of each backtesting node model. You get one free B-MICRO backtesting node in your
first organization. This node incurs a 20-second delay when you launch backtests, but the delay is removed and the node is
replaced when upgrade your organization to a paid tier and add a new backtesting node .
To view the status of all of your organization's nodes, see the Resources panel of the IDE. When you run a backtest, it uses the
best-performing resource by default, but you can select a specific resource to use .
The CPU nodes are available on a fair usage basis while the GPU nodes can be shared with a maximum of three members.
Depending on the server load, you may use all of the GPU's processing power. GPU nodes perform best on repetitive and
highly-parallel tasks like training machine learning models. It takes time to transfer the data to the GPU for computation, so if
your algorithm doesn't train machine learning models, the extra time it takes to transfer the data can make it appear that GPU
Research Nodes
Research nodes enable you to spin up an interactive, command-line, Jupyter Research Environment . Several models of
research nodes are available. More powerful research nodes allow you to handle more data and run faster computations in your
notebooks. The following table shows the specifications of the research node models:
Processing Speed
Name Number of Cores RAM (GB) GPU
(GHz)
R1-4 1 2.4 4 0
R2-8 2 2.4 8 0
R4-12 4 2.4 12 0
R4-16-GPU 4 3 16 1/3
R8-16 8 2.4 16 0
Refer to the Pricing page to see the price of each research node model. You get one free R1-4 research node in your first
organization, but the node is replaced when you subscribe to a paid research node in the organization.
To view the status of all of your organization's nodes, see the Resources panel of the IDE. When you launch the Research
Environment, it uses the best-performing resource by default, but you can select a specific resource to use .
The CPU nodes are available on a fair usage basis. The GPU nodes can be shared with a maximum of three members. Depending
on the server load, you may use all of the GPU's processing power.
Live trading nodes enable you to deploy live algorithms to our professionally-managed, co-located servers. You need a live
trading node for each algorithm that you deploy to our co-located servers. Several models of live trading nodes are available.
More powerful live trading nodes allow you to run algorithms with larger universes and give you more time for machine learning
training . Each security subscription requires about 5MB of RAM. The following table shows the specifications of the live trading
node models:
Processing Speed
Name Number of Cores RAM (GB) GPU
(GHz)
L1-1 1 2.6 1 0
L1-2 1 2.6 2 0
L2-4 2 2.6 4 0
Refer to the Pricing page to see the price of each live trading node model.
To view the status of all of your organization's nodes, see the Resources panel of the IDE. When you deploy an algorithm, it uses
the best-performing resource by default, but you can select a specific resource to use .
The CPU nodes are available on a fair usage basis while the GPU nodes can be shared with a maximum of two members.
Depending on the server load, you may use all of the GPU's processing power. GPU nodes perform best on repetitive and
highly-parallel tasks like training machine learning models. It takes time to transfer the data to the GPU for computation, so if
your algorithm doesn't train machine learning models, the extra time it takes to transfer the data can make it appear that GPU
nodes run slower than CPU nodes.
Sharing Resources
Your organization's nodes are shared among all of the organization's members to reduce the amount of time that nodes idle. In
the Algorithm Lab, you can see which nodes are available within your organization.
Node Quotas
The following table shows the number of nodes each organization tier can have:
Free 1 1 0
Quant Researcher 2 1 2
Team 10 10 10
Training Quotas
Algorithms normally must return from the on_data method within 10 minutes, but the train method lets you increase this
amount of time. Training resources are allocated with a leaky bucket algorithm where you can use a maximum of n-minutes in a
single training session and the number of minutes available refills over time. This gives you a reservoir of training time when you
need it and recharges the reservoir to prepare for the next training session. The reservoir only starts draining after you exceed
the standard 10 minutes of training time.
The following animation demonstrates the leaky bucket algorithm. The tap continuously adds water to the bucket. When the
bucket is full, water spills over the rim of the bucket. The water represents your training resources. When your algorithm
exceeds the 10 minutes of training time, holes open at the bottom of the bucket and water begins to drain out. When your
algorithm stops training, the holes close and the bucket fills up with water.
The following table shows the amount of extra time that each backtesting and live trading node can spend training machine
learning models:
Model Capacity (min) Refill Rate (min/day)
B-MICRO 20 1
B2-8 30 5
B4-12 60 10
B8-16 90 15
L-MICRO 30 5
L1-1 60 10
L1-2 90 15
L1-4 120 20
The refill rate in the table above is based on the real-world clock time, not the backtest clock time. In backtests, the train
method is synchronous, so it will block your algorithm from executing while the model is trained. In live trading, the method runs
asynchronously, so ensure your model is ready to use before you continue executing the algorithm. Training occurs on a
Log Quotas
Per our Terms and Conditions , you may not use the logs to export dataset information. The following table shows the amount of
To check the log storage space you have remaining, log in to the Algorithm Lab and then, in the left navigation bar, click
Organization > Resources .
If you delete a backtest or project that produced logs, your quotas aren't restored. Additionally, daily log quotas aren't fully
The log files of each live trading project can store up to 1,000,000 lines for up to two years. If you log more than 1,000,000 lines
or some lines become older than two years, we remove the oldest lines in the files so your project stays within the quota.
To avoid reaching the limits, we recommend logging sparsely, focusing on the change events instead of logging every time loop.
You can use the debugger to inspect objects during runtime. If you use the debugger, you should rarely reach the log limits.
If you have a project open, it uses a coding session. Paid organizations can have multiple active coding sessions, but free users
can only have one coding session open at a time. The following table shows how many active coding sessions you can have on
Quant Researcher 2
Team 4
Trading Firm 8
Institution 16
If the organization you're in has more live trading nodes than your initial coding session quota, then your coding session quota
increases to the number of live trading nodes you have in the organization so you can view all your live strategies.
The quota for free organizations is a global quota, so you can have one active coding session across all of your free
organizations. The quotas for paid organizations are at the organization level. Therefore, if you are in two Quant Researcher
organizations, you can have two active coding sessions in one of those organizations and another two active sessions in the
other organization. These paid tier quotas are for each account, not for the organization as a whole. For instance, a Trading Firm
organization can have more than eight members and all of the members can simultaneously work on projects within the
organization.
The maximum file size you can have in a project depends on your organization's tier. The following table shows the quota of
each tier:
Free 32
Quant Researcher 64
Team 128
Institution 256
The number of email, Telegram, or webhook notifications you can send in each live algorithm for free depends on the tier of
Free N/A
Quant Researcher 20
Team 60
Institution 3,600
If you exceed the hourly quota, each additional email, Telegram, or webhook notification costs 1 QuantConnect Credit (QCC).
Each SMS notification you send to a US or Canadian phone number costs 1 QCC. Each SMS notification you send to an
The Resources page displays your backtesting, research, and live trading node clusters. To view the page, log in to the
Algorithm Lab and then, in the left navigation bar, click Organization > Resources .
To toggle the format of the page, click the buttons in the top-right. If the page is in table view, each cluster section includes a
table with the following columns:
Column Description
Add Nodes
2. Click Add nodeType Node for the type of node you want to add.
3. Select the node specifications.
Remove Nodes
You need billing permissions in the organization to remove nodes. If you remove nodes during your billing period, your
organization will receive a pro-rated credit on your account, which is applied to future invoices.
4. Click the Customize Plan > Build Your Own Pack > Compute Nodes tab.
5. Click the minus sign next to the node model you want to remove.
Rename Nodes
We assign a default name to hardware nodes that includes the model name and an arbitrary string of characters, but you can
follow these steps to rename the nodes in your organization:
3. Enter the new node name and then click Save Changes .
Stop Nodes
You need stop node permissions in the organization to stop nodes other members are using. If you stop a node, it terminates
the running backtest, research, or live trading sessions. When you stop a live trading node, the portfolio holdings don't change
Follow these steps to stop nodes that are running in your organization:
2. Click the icon with the three horizontal lines icon in the top-right corner to format the page into table view.
3. Click Stop in the row with the node that you want to stop.
Organizations > Object Store
Organizations
Object Store
Introduction
The Object Store is an organization-specific key-value storage location to save and retrieve data in QuantConnect's cache.
Similar to a dictionary or hash table, a key-value store is a storage system that saves and retrieves objects by using keys. A key
is a unique string that is associated with a single record in the key-value store and a value is an object being stored. Some
common use cases of the Object Store include the following:
Transporting data between the backtesting environment and the research environment.
Training machine learning models in the research environment before deploying them to live trading.
The Object Store is shared across the entire organization. Using the same key, you can access data across all projects in an
organization.
View Storage
The Object Store page shows all the data your organization has in the Object Store. To view the page, log in to the Algorithm Lab
and then, in the left navigation bar, click Organization > Object Store .
To view the metadata of a file (including it's path, size, and a content preview), click one of the files in the table.
Upload Files
2. Navigate to the directory in the Object Store where you want to upload files.
3. Click Upload .
4. Drag and drop the files you want to upload.
Alternatively, you can add data to the Object Store in an algorithm or notebook .
Download Files
Permissioned Institutional clients can build derivative data such as machine learning models and download it from the Object
Follow these steps to download files and directories from the Object Store:
2. Navigate to the directory in the Object Store where you want to download files and directories.
Storage Sizes
All organizations get 50 MB of free storage in the Object Store. Paid organizations can subscribe to more storage space. The
0.05 0
2 10
5 20
10 50
50 100
Delete Storage
3. Click the check box next to the files you want to delete.
4. Click Actions and then click Delete from the drop-down menu.
5. Click OK .
You need storage billing permissions and a paid organization to edit the size of the organization's Object Store.
Follow these steps to edit the amount of storage available in your organization's Object Store:
3. On the Resources page, scroll down to the Storage Resources and then click Add Object Store Capacity .
When you deploy a live algorithm, you can access the data within minutes of modifying the Object Store. Ensure your algorithm
is able to handle a changing dataset.
The live environment's access to the Object Store is much slower than in research and backtesting. Limit the individual objects
Usage by Project
The Resources page shows the total storage used in your organization and the storage used by individual projects so that you
can easily manage your storage space. To view the page, log in to the Algorithm Lab and then, in the left navigation bar, click
Organization > Resources .
Organizations > Support
Organizations
Support
Introduction
The community is a great resource for support for developing algorithms. However, for more personalized assistance and
privacy, you can submit support tickets to request assistance from a QuantConnect engineer. Premium support allows you to
share your algorithms with IP protection and enables the Support Team to address issues with live algorithms. In order to submit
There are three tiers of support seats and each tier provides different services. You can file support tickets to get private
assistance with issues, but support tickets should not replace your efforts of performing your own research and reading through
the documentation. If you need further assistance than what our Support Team offers, consider hiring an Integration Partner .
Features
The services our Support Team provides depend on the tier of your support seat.
Bug Reports
The Lean trading engine is under constant development, so you may occasionally experience bugs when using it. If you think
you have found a bug, share a simple backtest with us that reproduces the issue. You can contact us either through email ,
Discord , or the forum . We will review your submission. If we confirm you've found a bug, we will create a GitHub Issue to have
it resolved. Subscribe to the GitHub Issue to track our progress in fixing the bug.
Bug Reports
AI Support
Mia is an AI assistant we trained on hundreds of algorithms and thousands of documentation pages to provide contextual
assistance for most issues you may encounter when developing a strategy.
AI Support
Email Support
Our support ticket system enables you to privately email with our Support Team. We address support tickets in a first-in, first-
out order, but we give priority to tickets opened by members with higher support seats. The following table shows our response
time for each of the support tiers:
Tier Response Time (hours)
Gold 24
Silver 48
Email Support -
IP Protection
If you attach a backtest or live trading deployment when you open a support ticket , the intellectual property of your project is
protected. We have a restricted subset of the Support Team who can access private support tickets. Using paid support plans
ensures only a limited subset of the QuantConnect team can access the algorithms you attach to support tickets. These team
members are carefully selected, have been at QuantConnect for at least 2 years, and have passed a background check. In
contrast, if you share a backtest or live trading deployment to the forum for assistance, your project becomes part of the public
domain.
IP Protection -
Paid support plans have access to our live deployment debugging service. If you experience an issue with a live trading
deployment, open a support ticket. We can assist with uncovering the issue, fixing the issue, and getting you ready to redeploy
the algorithm. We can't assist with live trading issues in the community forum or Discord.
If you have a silver or gold support seat, we can offer suggestions on the design of your algorithms. Our Support Team
members are experts on the inner workings of Lean, so we can guide you on improving the efficiency of your algorithms by
following our common design patterns. We can usually reduce the size of your project's code files and increase the speed of
Private Chatroom
When you require instant access to our Support team, we can open a private chatroom in Discord. In our private chatroom, you
can ask our Support Team questions at any time and we focus on responding as quickly as we can. Request a private chatroom
Private Chatroom - - -
We offer phone support to members with gold support seats. You can take advantage of our phone support for up to 1 hour per
month. During phone calls, feel free to ask about anything related to QuantConnect, Lean, or quant trading. We recommend
planning your questions before you call in order to best utilize the time available.
Local Development
If you have a gold support seat, you can access technical support for the Local Platform , LEAN CLI , and the QuantConnect
REST API , which includes installation and subjects that don't apply to the Cloud Platform.
Private Chatroom - - -
Summary
Bug Reports
AI Support
Email Support -
IP Protection -
Private Chatroom - - -
Local Development - - -
The Team Management page displays the support seat assignments within your organization. To view the page, log in to the
Algorithm lab, and then in the left navigation bar, click Organization > Members .
Add Seats
2. Scroll down to the Organization Support section and then click Add Seat .
3. On the Support page, click Select under the tier of seat you want to assign.
4. In the Assign seatTier Seat section, click the team member field and then select the team member you want to assign the
seat to from the drop-down menu.
The Support History page displays all of your organization's support tickets. To view the page, log in to the Algorithm Lab and
then, in the left navigation bar, click Support > Organization Tickets .
To see all closed tickets, click Closed . To view the conversation history with our Support Team regarding a ticket, click a ticket.
4. If you want to attach a live deployment or backtest to the support ticket, follow these steps:
2. (Optional) Click Add Live Deployment , select a live deployment, and then click OK .
3. (Optional) Click Add Backtest , select a backtest, and then click OK .
5. Click the By submitting this request, I give QuantConnect Support Staff permission to view my project check box.
6. Click Send .
Mia, our AI assistant, provides an initial response to support tickets. We trained it on hundreds of algorithms and thousands of
documentation pages to provide contextual assistance for most issues you may encounter when developing a strategy. To
escalate the ticket to a human on the Support Team, click No, I'd like a human response .
Comment on Tickets
Close Tickets
AI Support
Mia is an AI assistant we trained on hundreds of algorithms and thousands of documentation pages to provide contextual
assistance for most issues you may encounter when developing a strategy. Mia automatically provides an inital response to the
support tickets you open. You can also interact with Mia through the community forum , Discord , or the Algorithm Lab Console .
Ticket Quotas
The following table shows the number of tickets each seat tier can open during a 1-month rolling period:
Gold 16 250
Silver 8 125
Bronze 4 25
Community - 3
The quotas don't restore on the first day of the month or the billing date. They restore according to a 1-month rolling window.
Organizations > Members
Organizations
Members
Introduction
Organizations consist of members and members can be part of multiple organizations. The number of members your
organization can have depends on the tier of your organization. All members in your organization can access the resources
Members can collaborate with other team members by adding them to projects they create. Otherwise, members don't have
If you are the manager of a Trading Firm or Institution organization, you can grant additional permissions to your team members.
To see the number of team seats you have in your organization, open the Billing page and then scroll down to the Products
section.
Add Seats
The Team Management page displays all of the members in your organization. To view the page, log in to the Algorithm Lab and
Membership Quotas
The number of members your organization can have depends on the organization's tier . In general, higher organization tiers
can have more members within the organization to share resources. This design enables you to upgrade your organization as
your trading business grows over time. The following table shows the number of members each organization tier can have:
Free 1 1
Quant Researcher 1 1
Team 2 10
Institution 2 Unlimited
Add Members
You need vacant team seats and team add permissions within an organization to add team members.
3. Enter the email address of the new team member and then click Add Member .
The email you enter should be the email the new member uses to log in to their QuantConnect account.
4. If you have team edit permissions, select the permissions for the new member and then click Save Changes . Otherwise,
click Cancel .
The Team Management page displays and the new member is included.
The new member must switch organization to access its resources and collaborate.
Add Support
2. Scroll down to the Organization Support section and then click Add Seat .
3. On the Support page, click Select under the tier of seat you want to assign.
4. In the Assign seatTier Seat section, click the team member field and then select the team member you want to assign the
Remove Members
You need team removal permission to remove members from your organization. Before removing members, stop all nodes they
are using. Removing members is not reversible and the members will lose access to the organization's projects. On the Team
tier, projects that the members created in the organization will remain with the members. On the Trading Firm and Institution
tiers, projects that the members created in the organization will be transferred to the organization manager.
1. Click the three dots icon in the top-right corner of the member you want to remove and then click Remove .
2. Click Remove .
3. If the Team Management page is in table view, follow these steps:
1. Click Remove next to the member you want to remove from the organization.
2. Click Remove .
Permissions
Each member of your organization has access to the resources within the organization. If you are the manager of a Trading Firm
or Institution organization, you can grant additional permissions to your team members. There are several categories of
permissions.
Billing Permissions
Permission Description
Permission Description
Team Permissions
Storage Permissions
Permission Description
Edit Permissions
You need team edit permission to edit the permissions of team members.
1. On the Team Management page, click the three dots in the top-right corner of the member you want to edit and then
2. Select and deselect permissions as desired and then click Save Changes .
2. Select and deselect permissions as desired and then click Save Changes .
Organizations > Administration
Organizations
Administration
Introduction
You can view and manage your organizations from the Algorithm Lab. The algorithms you store in the Algorithm Lab are secure
Intellectual Property
All individuals on QuantConnect own their intellectual property (IP) on our platform. Your code is private and only accessible by
people you share the project with and with support-engineers when you submit a support ticket. At no point does QuantConnect
ever claim ownership of user IP. The only case where algorithm code becomes public domain is when they are shared to the
forum. In this case, algorithms need to be made public domain to allow the sharing of the algorithm code.
It is common when companies hire engineers to write software, they require their employees to sign an agreement that gives the
company IP ownership of any code written for work. They need this because they're paying you to write software, and the
company needs to sell that software to turn a profit. Similarly, the Organizations feature allows you to control who holds IP
ownership over a project. Each type of organization has its own mechanisms for handling project IP ownership.
Individual Organizations
The Free and the Quant Researcher tiers only allow single-member organizations. This means you can't collaborate with anyone
else inside the QuantConnect platform. Simply put, you own the IP for any projects you work on since you are the sole
collaborator.
Team Organizations
For organizations that allow multiple users to collaborate on projects, the user who created the project owns it; this can be you
or one of your teammates. If you add a teammate/collaborate, they can clone it, but the original project belongs to the person
For Trading Firm and Institution organizations, which are generally used by companies and funds, the firm owns all employee
projects. This is made to suit firms that wish to hire consultants and need to ensure the code remains with the company when
the consultant work is finished. You have to explicitly create a project in an organization for it to be created on the
organization's account.
Corporate Branding
You can customize your organizationʼs image, name, and description in the Algorithm Lab to match your branding. If you have a
Trading Firm or Institution organization, you can integrate the Algorithm Lab into your website so that your company logo is in
the navigation bar and the color matches your website's theme.
Migrating Projects
If you are the administrator of an organization, you can migrate a project out of the organization to another organization in which
youʼre a member. When your project is migrated, the project files are copied but the content stored in the Object Store is not
retained.
View the Organization Homepage
The organization homepage displays a summary of your organization. To view the page, log in to the Algorithm Lab and then, in
The organization homepage displays your organization's brand and statistics at the top of the page. The following table
Section Description
Image
Follow these steps to change your organization image:
3. Click Choose file , select a file from your device, and then click Open .
Your organization image must be in gif , jpg , or png format and less than 1MB in size.
4. Click Save .
Name
2. Hover over the organization name and then click the pencil icon that appears.
3. Enter the new organization name and then click Save Changes .
To view all of the organizations for which you're a member, log in to the Algorithm lab and then, in the top navigation bar, click
Add Organizations
Switch Organizations
3. In the Switch Organization panel, select the radio button under the Preferred column that corresponds to the organization
"Preferred organization selected" displays. Refresh the page to connect as your preferred organization.
Organizations > Billing
Organizations
Billing
Introduction
The owner of an organization is responsible for the billing, but the responsibility can be delegated in Trading Firm or Institution
organizations. Your organization's billing information is never saved by QuantConnect. Itʼs passed to the Stripe billing system. If
you cancel your subscription, your live trading nodes stop running. So, for user safety, your subscriptions automatically renew
each month.
The Billing page displays your organization's billing details. To view the page, log into the Algorithm Lab and then, in the left
The Billing page displays the billing cost, date, and frequency at the top of the page. The following table describes the
You can add, replace, and remove the organization's credit card.
Add
The Credit Card section displays the last 4 digits of your credit card.
Replace
3. Enter the new credit card details and then click Save .
The Credit Card section displays the last 4 digits of your new credit card.
Remove
2. Click Remove .
3. Click OK .
2. Scroll down to the Invoices section and then click Download as PDF next to the invoice or receipt that you want to
download.
You can change your organization to any of the paid tiers or the Free tier.
Paid Tiers
9. If your organization doesn't have a credit card added, click Proceed to Checkout and then enter your credit card details.
Free Tier
5. Click the I understand that my subscription will be terminated immediately check box and then click Cancel My
Subscription .
If you're not going to utilize your QuantConnect subscriptions for a month or two, pause your subscriptions to avoid
unnecessary charges. Pausing suspends access to your account, but all your cloud configuration, project files, and set up will
be kept as is. When you resume your subscriptions, your account will be the same as you left it.
Pause Subscriptions
Resume Subscriptions
To resume your paused subscriptions, open the Billing page and then click Resume . If you prematurely resume your
subscriptions, the credit you receive is pro-rated based on the duration of the pause period.
Payment Failures
If your payment fails, Stripe automatically tries again after 6-12 hours.
Organizations > Credit
Organizations
Credit
Introduction
We created QuantConnect Credit (QCC) to enable micropayments on QuantConnect. You can use QCC to optimize parameters,
download datasets, gift to members in the forum, and apply to your organization's monthly invoice. You can purchase QCC in
the Algorithm Lab at a rate of 1 QCC = $0.01 USD. Since QCC is owned by organizations instead of members, all of the members
within your organization have the ability to spend the QCC balance.
Optimizing Parameters
You need QCC in your organization to unlock parameter optimization . Parameter optimization jobs use optimization nodes,
which are rented on a time basis. Therefore, the longer it takes to run all of the backtests in your optimization job, the more QCC
it costs. Before you run optimizations, we estimate on how much QCC it will cost to run the job, but the final cost can differ from
our estimates because we can't know exactly how long all of the backtests will take to run ahead of time. For instructions on
Downloading Datasets
You can spend some QCC to download datasets from the Dataset Market to your local machine. The cost of downloading
depends on the dataset and it's calculated on a per-file or per-day basis. For instructions on downloading datasets, see
Licensing .
Giving to Others
To show your appreciation for contributions in the forum, give some QuantConnect Credit (QCC) rewards . The following table
Bestowed in recognition of
80
quantitative advances.
Nobel Laureate
Purchase QCC
2. Scroll down to the Organization Credit (QCC) section and then click Purchase Credit .
3. Select a credit pack and then click Continue .
4. If your preferred organization has a credit card and you want to charge that card, click Purchase .
5. If your preferred organization doesn't have a credit card, enter the credit card details and then click Purchase .
Only the preferred organization can be charged when purchasing QCC. If you want to charge a different organization you
You can apply QCC to your organization's invoices to pay for your subscriptions, but you must enable invoice payments before
your invoice is generated to pay it with QCC. To enable invoice payment with QCC, open the Billing page, scroll down to the
Organization Credit (QCC) section, and then select the Only apply organization QCC to invoices check box.
Organizations > Training
Organizations
Training
Introduction
Onboard new team members to your organization through the content in the Learning Center . The Learning Center enables you
to systematically track and monitor the progress of your team members on the courses you purchase or create. If you purchase
or create a course, you can access it from the Organization > Resources page in the Algorithm Lab.
Paid Courses
Currently, there are only free tutorials in the Learning Center, but we expect to expand the paid course offerings through 2023.
We charge for paid courses based on the number of members in your organization. For example, if there are 5 team members in
your organization, multiply the listed price of a course by 5. When you purchase a course, the team members in your
Private Courses
Private courses are not for sale in the Learning Center. You can upload private courses to your Organization > Resources page,
but they will not be available for other organizations to purchase. Create private courses to help onboard your team members
while using the familiar Learning Center environment. Since the Learning Center has built-in tools to help you monitor your team
members, you can track the progress of your team members as they work on your internal private courses.
This feature is designed for Institutional clients with large teams of quants on QuantConnect
Learning Center
Learning Center
The Learning Center is a coding environment to learn quantitative trading using LEAN. The Learning Center features a collection
of courses from educators from the QuantConnect team and the community. The goal of the Learning Center is to give you an
understanding of robust algorithm design and the tools you need to implement your own trading strategies. As you work through
the courses, youʼll manage a portfolio, use indicators in technical trading strategies, trade on universes of assets, automate
trades based on market behavior, and understand how data moves through your algorithm. After you've completed a course,
you can keep the code to perform further research and deploy to live trading. Start learning today because you need to
complete 30% of the Bootcamp lessons to post in the community forum.
Training
Educators
Course Structure
See Also
Available Courses
Learn Programming
Algorithm Engine
Learning Center > Training
Learning Center
Training
Introduction
The Learning Center is a coding environment to learn quantitative trading using LEAN. The Learning Center features a collection
of courses from educators from the QuantConnect team and the community. The goal of the Learning Center is to give you an
understanding of robust algorithm design and the tools you need to implement your own trading strategies. As you work through
the courses, youʼll manage a portfolio, use indicators in technical trading strategies, trade on universes of assets, automate
trades based on market behavior, and understand how data moves through your algorithm. After you've completed a course,
you can keep the code to perform further research and deploy to live trading. Start learning today because you need to
Onboard new team members to your organization through the content in the Learning Center. The Learning Center enables you
to systematically track and monitor the progress of your team members on the courses that you purchase or create. If you
purchase or create a course, you can access it from the Organization > Resources page in the Algorithm Lab.
Articles
QuantConnect maintains collections of related tutorials we call a Learning Series . We have tutorial series covering the topics
The Strategy Library is a collection of tutorials written by the QuantConnect team and community members. Review these
tutorials to learn about trading strategies found in the academic literature and how to implement them with QuantConnect/LEAN.
Introduction to Options
Introduces Options to those who are Option novices and have basic knowledge of applied mathematics, statistics, and financial
markets.
Applied Options
Simple Options trading algorithms on QuantConnect for those who already have basic knowledge of Options markets.
Paid Courses
Currently, there are only free tutorials in the Learning Center, but we expect to expand the paid course offerings through 2023.
We charge for paid courses based on the number of members in your organization. For example, if there are 5 team members in
your organization, multiply the listed price of a course by 5. When you purchase a course, the team members in your
Private Courses
Private courses are not for sale in the Learning Center. You can upload private courses to your Organization > Resources page,
but they will not be available for other organizations to purchase. Create private courses to help onboard your team members
while using the familiar Learning Center environment. Since the Learning Center has built-in tools to help you monitor your team
members, you can track the progress of your team members as they work on your internal private courses.
This feature is designed for Institutional clients with large teams of quants on QuantConnect
The Available Courses page displays all of the courses in the Learning Center. To view the page, open the Algorithm Lab and
then, in the left navigation bar, click Learning Center > All Courses .
Name
Description
Author
Price
Review summary
Instructor biography
Requirements
Syllabus
Reviews
Enroll in Courses
2. In the left navigation bar, click Learning Center > All Courses .
3. On the Available Courses page, click the course in which you want to enroll.
4. Click Enroll .
3. (Optional) Scroll down to the bottom of the instruction panel and click Show Hint to show a hint.
4. (Optional) Scroll down to the bottom of the instruction panel and click Solution to show the solution file.
8. Click Continue .
2. In the left navigation bar, click Learning Center > All Courses .
3. On the Available Courses page, click the course for which you want to see your progress.
On the course page, the About this Course section displays your progress.
Log in to the Algorithm Lab and then, in the left navigation bar, click Learning Center > Completed to view your completed
courses.
Submit Reviews
You need to complete a course before you can submit a review on it.
3. Scroll down to the User Reviews section and then click the number of stars you want to give the course in your review.
4. Write your review.
Report Errors
To report errors you experience with courses, email us an explanation of the error and the task URL where the error occurred.
Learning Center > Educators
Learning Center
Educators
Introduction
Educators are QuantConnect experts who contribute courses to the Learning Center. We are always looking for experts to
become Educators and share their insight with the community. As an Educator, you create the description, requirements, and
lessons of each course you contribute. You also provide the images for the course listing in the Learning Center. As students
complete your course, you'll receive course reviews so you can improve your course material.
Registration
Anyone can register to become an Educator. We are looking for Educators that specialize in the following areas:
Quant finance
C# and Python
Jupyter
If you have the skills listed above, contact us to start the registration process.
Compensation
Educators are compensated in knowledge, commissions, and exposure. You earn a $5,000 commission per accepted course
and a 70% revenue share for your courses. When your courses are listed in the Learning Center, your name and social media
accounts are public, giving you exposure to the QuantConnect community.
Learning Center > Course Structure
Learning Center
Course Structure
Introduction
The courses in the Learning Center are structured in a way so you can complete courses at your own pace. The course
structure enables you to improve your skills in finance, statistics, and software development while learning the QuantConnect
API in easily digestible portions. The idea behind the course lessons is to focus on implementing individual strategies rather than
Lessons
Courses are broken up into multiple lessons. Lessons are made up of videos, readings, and coding exercises. Lessons break up
the process of learning into digestible tasks. Each lesson builds on an understanding of the API from the lesson before it, so we
recommend completing the lessons in order. The introductory video of each lesson demonstrates the process of completing the
Tasks
Lessons are broken up into multiple tasks to test your understanding of the course topic. Each task is accompanied by text
instruction to guide you to complete the task. The Learning Center environment, where you complete each task, is similar to the
regular web IDE used for backtesting and live trading. After you read the task instructions and run your solution algorithm, you
are informed if you completed the task. If you need assistance, you can view a hint or the full solution file .
Results
To check if you have completed a task correctly, backtest your algorithm in the Learning Center environment and then the result
window displays your results. If you receive an error message, update the code and then run the backtest again. If you pass the
task, you'll be prompted to proceed to the next task in the course. If you're having trouble completing the task, you can copy the
Solutions
A solution file for each task is available in the Learning Center environment. You may use it, but we recommend you try to solve
the problem before you check the solution file. You'll learn best by solving the problem on your own. However, errors can occur
when running backtests, so you may use the solution file to ensure the environment is running without error.
Errors
If you run into an error when you are working on a task, compare your code to the solution file. The error may be caused by
either an error in your submission or an error in the backend of the Learning Center environment. In cases when errors occur in
the backtest of the Learning Center environment, email us the following information:
Projects
Projects contain files to run backtests, launch research notebooks, perform parameter optimizations, and deploy live trading
strategies. You need to create projects in order to create strategies and share your work with other members. Projects enable
you to generate institutional-grade reports on the performance of your backtests. You can create your projects from scratch or
you can utilize pre-built libraries and third-party libraries to expedite your development process.
Getting Started
Structure
Files
IDE
Encryption
Debugging
Collaboration
Code Sessions
Shared Libraries
Package Environments
See Also
Backtesting
Sharing Backtests
Report
Projects > Getting Started
Projects
Getting Started
Introduction
Projects contain files to run backtests, launch research notebooks, perform parameter optimizations, and deploy live trading
strategies. You need to create projects in order to create strategies and share your work with other members. Projects enable
you to generate institutional-grade reports on the performance of your backtests. You can create your projects from scratch or
you can utilize pre-built libraries and third-party packages to expedite your development process.
The Algorithm lab enables you to create, store, and manage your projects in the cloud. You can only access your own projects
The All Projects page displays all of your QuantConnect projects in the organization, including libraries and Boot Camp lessons.
Click a project or directory on the page to open it.
Create Projects
Close Projects
Clone Projects
Clone a project to create a new copy of the project and save it within the same organization. When you clone a project, the
project files are duplicated but the backtest results and live deployment history are not retained. Cloning enables you to test
small changes in your projects before merging the changes back into the original project and start a new live deployment
record.
To clone a project, open the project and then, in the Project panel, click Clone .
Migrate Projects
Migrating moves a project from one organization to another. You must be the organization administrator to migrate projects out
of the organization. Migrate a project to run the project using resources from a different organization and to collaborate on the
project with members from a different organization. When you migrate projects, the project files are copied but the content
To migrate a project, open the project and then, in the Project panel, click Migrate .
Rename Projects
2. In the Project panel, hover over the project name and then click the pencil icon that appears.
3. In the Name field, enter the new project name and then click Save Changes .
The project name must only contain - , _ , letters, numbers, and spaces. The project name can't start with a space or be any of
the following reserved names: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1,
Set Descriptions
2. In the Project panel, hover over the project name and then click the pencil icon that appears.
3. In the Description field, enter the new project description and then click Save Changes .
Edit Parameters
Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. Add parameters
to your projects to remove hard-coded values from your code files and to perform parameter optimizations. You can add
parameters, set default parameter values, and remove parameters from your projects.
Add Parameters
To get the parameter values into your algorithm, see Get Parameters .
2. In the Project panel, hover over the algorithm parameter and then click the pencil icon that appears.
3. Enter a default value for the parameter and then click Save .
The Project panel displays the default parameter value next to the parameter name.
Delete Parameters
2. In the Project panel, hover over the algorithm parameter and then click the trash can icon that appears.
3. Remove the GetParameter calls that were associated with the parameter from your code files.
Delete Projects
In the Project panel, click Delete , and then click Yes to delete the project.
2. If the project is in a directory, click the directory files to navigate to the project file.
3. Hover over the project file and then click the trash can icon that appears.
Encrypt Projects
When you save projects in QuantConnect Cloud, you can save encrypted versions of your project files instead of the raw,
human readable, file content. Encrypting your projects gives you an additional layer of protection. To use the encryption
system, you provide your own encryption key, which your local browser saves to memory. For more information about project
Get Project Id
To get the project Id, open the project and check the URL. For example, the project Id of
https://www.quantconnect.com/project/13946911 is 13946911.
Projects > Structure
Projects
Structure
Introduction
Projects organize your algorithm data. They have settings, files, results, and attached libraries.
Your account has a directory to organize the projects that you have access to in each of your organizations. If you switch the
organization that you are connected as , your directory of projects is updated to reflect the projects that you have access to
Files
New projects contain code files ( .py or .cs ) and notebook files ( .ipynb ). Run backtests with code files and launch the Research
Environment with notebook files. Code files must stay within your size quotas . To keep files small, files can import code from
other code files. To aid navigation, you can rename, move, and delete files in the web IDE. Notebook files save the input cells,
Directories
Your directory of projects can contain nested directories of projects to make navigation easier. Similarly, the code and notebook
files in your projects can contain nested directories of files. For example, if you have multiple Alpha models in your strategy, you
can create an alphas directory in your project to hold a file for each Alpha model.
Description
You can give a project a description to provide a high-level overview of the project and its functionality. Descriptions make it
easier to return to old projects and understand what is going on at a high level without having to look at the code. The project
description is also displayed at the top of backtest reports , which you can create after your backtest completes.
Libraries
Libraries are reusable code files that you can import into any project for use in backtesting, research, and live trading. Use
libraries to increase your development speed and save yourself from copy-pasting between projects. You can create libraries
and add them to your projects using the web IDE. Your libraries are saved under the Library directory in the Algorithm Lab.
Parameters
Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. Add parameters
to your projects to remove hard-coded values from your code files and to perform parameter optimizations . To get the
parameter values into your algorithm, see Get Parameters . The parameter values are sent to your algorithm when you deploy
the algorithm, so it's not possible to change the parameter values while the algorithm runs.
Projects > Files
Projects
Files
Introduction
The files in your projects enable you to implement trading algorithms, perform research, and store important information. Python
projects start with a main.py and a research.ipynb file. C# projects start with a Main.cs and a Research.ipynb file. Use the
main.py or Main.cs file to implement trading algorithms and use the ipynb file to access the Research Environment.
.cs
.ipynb
.py
.html
.css
Add Files
6. Press Enter .
Add Directories
Open Files
Close Files
To close a file, at the top of the IDE, click the x button on the file tab you want to close.
To close all of the files in a project, at the top of the IDE, right-click one of the file tabs and then click Close All .
3. In the Explorer panel, right-click the file or directory you want to delete and then click Delete Permanently .
4. Click Delete .
Size Quotas
The maximum file size you can have in a project depends on your organization's tier. The following table shows the quota of
each tier:
Free 32
Quant Researcher 64
Team 128
Institution 256
Projects > IDE
Projects
IDE
Introduction
The web Integrated Development Environment (IDE) lets you work on research notebooks and develop algorithms for
backtesting and live trading. When you open a project , the IDE automatically displays. You can access your trading algorithms
from anywhere in the world with just an internet connection and a browser. If you prefer to use a different IDE, the CLI allows
Supported Languages
The Lean engine supports C# and Python. Python is less verbose, has more third-party libraries, and is more popular among the
QuantConnect community than C#. C# is faster than Python and it's easier to contribute to Lean if you have features written in
C# modules. Python is also the native language for the research notebooks, so it's easier to use in the Research Environment.
The programming language that you have set on your account determines how autocomplete and IntelliSense are verified and
determines the types of files that are included in your new projects. If you have Python set as your programming language, new
projects will have .py files. If you have C# set as your programming language, new projects will have .cs files.
Change Languages
Intellisense is a GUI tool in your code files that shows auto-completion options and presents the members that are accessible
from the current object. The tool works by searching for the statement that you're typing, given the context. You can use
Intellisense to auto-complete method names and object attributes. When you use it, a pop-up displays in the IDE with the
following information:
Member type
Member description
The parameters that the method accepts (if the member is a method)
Use Intellisense to speed up your algorithm development. It works with all of the default class members in Lean, but it doesn't
Use Autocomplete
1. Open a project .
2. Type the first few characters of a variable, function, class, or class member that you want to autocomplete (for example,
self.set or SimpleMovingAverage.Upda ).
3. Press CTRL+Space .
If there are class members that match the characters you provided, a list of class members displays.
The rest of the class member name is automatically written in the code file.
Console
The console panel at the bottom of the IDE provides some helpful information while you're developing algorithms.
Cloud Terminal
The Cloud Terminal tab of the panel shows the API messages, errors, and the logs from your algorithms.
To clear the Cloud Terminal, click the Clear Logs icon in the top-right corner of the panel.
Ask Mia
The Ask Mia tab of the panel is where you can interact with our AI assistant, Mia.
Mia provides contextual assistance to most issues you may encounter when developing a strategy, including build errors, API
methods, and best coding practices. It has been trained on hundreds of algorithms and thousands of documentation pages.
To clear the chat with Mia, click the Clear Mia Chat icon in the top-right corner of the panel.
Problems
The Problems tab of the panel highlights the coding errors in your algorithms.
Manage Nodes
The Resources panel shows the cloud backtesting, research, and live trading nodes within your organization.
To view the Resources panel, open a project and then, in the right navigation menu, click the Resources icon.
Column Description
In Use By The owner and name of the project using the node.
To stop a running node, click the stop button next to it. You can stop nodes that you are using, but you need stop node
By default, we select the best node available in your clusters when you launch a backtest or research notebook. To use a
specific node, click the check box next to a node in the panel.
The Outline section in the Explorer panel is an easy way to navigate your files. The section shows the name of classes,
members, and functions defined throughout the file. Click one of the names to jump your cursor to the respective definition in
the file. To view the Outline , open a project and then, in the right navigation menu, click the Explorer icon.
Split the Editor
The editor can split horizontally and vertically to display multiple files at once. Follow these steps to split the editor:
1. Open a project .
2. In the right navigation bar, click the Explorer icon.
3. In the QC (Workspace) section, drag and drop the files you want to open.
Use this feature instead of opening multiple browser tabs for a single project. If you open open multiple browser tabs, two code
sessions will be updating the same project, which will cause the code sessions to fall out of sync.
The editor can hide and show code blocks to make navigating files easier. To hide and show code blocks, open a project and
Keyboard Shortcuts
Keyboard shortcuts are combinations of keys that you can issue to manipulate the IDE. They can speed up your workflow
because they remove the need for you to reach for your mouse.
1. Open a project .
2. Press F1 .
To set a key binding for a command, click the pencil icon in the left column of the keyboard shortcuts table, enter the key
Themes
The Algorithm Lab offers light and dark themes. Follow these steps to change themes:
3. On your Account page, in the Account Settings section, click Light Theme or Dark Theme
Supported Browsers
The IDE works with Chrome, Edge, Firefox, and Safari. For more information about browser support, see Browser Support in the
Cookies
Cookies are essential for the Algorithm Lab to connect to the VS Code environment because modern browsers treat the coding
environment domain (e.g., {...}.code.qc.com) as a third-party domain relative to the main domain (www.qc.com). This
distinction means that if cookies for the coding environment are blocked, essential functions like user authentication, passing
messages, adjusting panel sizes, setting tasks in bootcamp, and encrypting/decrypting project files will not work correctly,
leading to a disrupted user experience. Enabling cookies ensures that your coding session remains seamless and fully
functional. To enable third-party cookies, see the support page of the following browsers:
Chrome
Edge
Firefox
Safari
Troubleshooting
If you experience issues trying to load the IDE, follow these steps:
The internet protection of some anti-virus products block the "Service Workers" that the IDE needs to operate. Kaspersky
and Avast are the two products that commonly block the IDE from using Service Workers. These are background threads
The DNS settings of some ISPs block Microsoft DNS, so some panels don't load and display the following message:
Firefox DNS-over-HTTPS
Try to load the IDE with a different computer, tablet, or cell phone.
Clear your browser cache, especially if you created your project before the new IDE (March 2022).
If these steps don't solve the issues, send the logs to the Console Inspector to the Support Team .
Projects > Encryption
Projects
Encryption
Introduction
When you save projects in QuantConnect Cloud, you can save encrypted versions of your project files instead of the raw,
human readable, file content. To use the encryption system, you provide your own encryption key, which your local browser
saves to memory. Afterwards, whenever you save your project, your browser uses the local key to encrypt your project files and
The organization homepage displays the name of all your organization's encryption keys and provides a way to upload more. A
MD5 hash of the key is recorded to know which key encoded a project.
The icon means the key is registered in the database but we could not locate it on your computer. This may happen when
you login from a new computer. To use this key, click Use Key and upload the key with the pop-up. This process stores a copy
of your key in the browser local store so you can decrypt the relevant projects in your organization.
Add Keys
3. In the Add Encryption Key window, enter a name for the key and then add the encryption key file.
The encryption key file must be a txt file with at least 32 characters. Itʼs content can be arbitrary.
4. Click Add Key .
Delete Keys
3. Click Delete .
Add Encryption
3. If you have added an encryption key before and want to use it for this project, click the key name from the drop-down
menu.
4. If you havenʼt added an encryption key before or you want to add a new one, follow these steps:
2. In the Add Encryption Key window, enter a name for the key and then add the encryption key file.
The encryption key file must be a txt file with at least 32 characters. Itʼs content can be arbitrary.
5. Click Encrypt .
Remove Encryption
To remove encryption from a project, open the project and then, in the Project panel, click the unlock icon next to the name of
your encryption key.
Collaboration Support
Libraries
Encrypted projects can use libraries encrypted with the same project key or unencrypted libraries. However, you cannot use a
To encrypt a library, open its project and set its encryption key .
Projects > Debugging
Projects
Debugging
Introduction
Debugging is the process of systematically using a tool to find and fix errors in software. Errors can cause unintended trades,
unexpected algorithm crashes, and faulty risk management logic. We use a debugging tool step through code line-by-line, and
inspect the variables to understand the internal state of the program. You have many tools to debug your algorithm, including
our built-in debugger, logging statements, charting, and the Object Store.
Coding Errors
Coding errors are errors that cause your projects to not build, throw exceptions, or behave unexpectedly. There are generally 3
types of coding errors: build, runtime, and logic errors. Each type of error occurs for different reasons.
Build Errors
Build errors occur when the interpreter's syntax check fails. An example code snippet that produces a build error is the
following:
PY
a = 1
if a = 2:
pass
If build errors occur in your project, you can not use the debugger, logging statements, or custom charts to debug the issue.
The Problems panel at the bottom of the IDE displays the errors.
The Explorer panel highlights the editors, files, and outlines in red where the error occurs.
Runtime Errors
Runtime Errors, also called exceptions, occur when the interpreterʼs syntax checks pass but an error occurs during execution.
PY
a = [1]
a[1]
If runtime errors occur in your project, a stack trace of the error is added to the Cloud Terminal and the log file. For example, the
The stack trace from the build error identifies the line of code where the error occurs. If the error doesn't reference your project
files, it's an issue with Lean or another library. To view more information about the error, click (Open Stack Trace) .
Logic Errors
Logic errors occur when your algorithm behaves in an unexpected or unintended manner. These types of errors don't halt the
program execution, so they are difficult to diagnose. An example code snippet that produces a logic error is the following:
PY
average = x + y / 2 # instead of (x + y) / 2
To resolve logic errors, carefully trace your algorithm. You may use the log method and debug method methods or the built-in
debugger.
Debugger
The debugger is a built-in tool to help you debug coding errors while backtesting. The debugger enables you to slow down the
code execution, step through the program line-by-line, and inspect the variables to understand the internal state of the program.
For more information about the backtesting debugger, see Backtest Debugging .
Logging Statements
Algorithms can record string messages ('log statements') to a file for analysis after a backtest is complete, or as a live algorithm
is running. These records can assist in debugging logical flow errors in the project code. Consider adding them in the code block
It's good practice to add logging statements to live algorithms so you can understand its behavior and keep records to compare
against backtest results. If you don't add logging statements to a live algorithm and the algorithm doesn't trade as you expect,
Log
Log statements are added to the log file while your algorithm continues executing. Logging dataset information is not permitted.
Use log method statements to debug your backtests and live trading algorithms.
Log length is capped by organization tier . If your organization hits the daily limit, contact us .
If you log the same content multiple times, only the first instance is added to the log file. To bypass this rate-limit, add a
For live trading, the log files of each cloud project can store up to 100,000 lines for up to one year. If you log more than 100,000
lines or some lines become older than one year, we remove the oldest lines in the files so your project stays within the quota.
To record the algorithm state when the algorithm stops executing, add log statements to the on_end_of_algorithm event
handler.
PY
Debug
Debug statements are the same as log statements, but debug method statements are orange in the Cloud Terminal. Use these
statements when you want to give more attention to a message in the Cloud Terminal. Debug messages can be up to 200
characters in length. If you send multiple debug statements within 1 second, your messages are rate-limited to avoid crashing
your browser.
PY
Error
Error statements are the same as log statements, but error method statements are displayed in red text in the Cloud Terminal.
Use these statements when you want to give the most attention to a message in the Cloud Terminal. Error statements are rate-
PY
Quit
Quit statements cause your project to stop running and may log some data to the log file and Cloud Terminal. These statements
are orange in the Cloud Terminal. When you call the quit method method, the program continues executing until the end of the
method definition. If you want to quit execution immediately, return after you call quit method.
PY
Charting
You can use the IDE charting capabilities to plot values over time when debugging. To add data points to a custom chart, call the
plot method with a chart name, series name, and value. For a full example, see Charting .
PY
If you run your algorithm in QuantConnect Cloud, we limit the number of points a chart can have to 4,000 because intensive
charting generates hundreds of megabytes (200MB) of data, which is too much to stream online or display in a web browser. If
Object Store
The Object Store is a key-value data store for low-latency information storage and retrieval. During a backtest, you can build
large objects youʼd like to analyze and write them for later analysis. This workflow can be helpful when the objects are large and
plotting is impossible or when you want to perform analysis across many backtests.
PY
For more information about the Object Store, see Object Store . For a specific example of saving indicator values during a
backtest into the Object Store and then plotting them in the Research Environment, see Example for Plotting .
Projects > Collaboration
Projects
Collaboration
Introduction
Project collaboration is a real-time coding experience with other members of your team. Collaborating can speed up your
development time. By working with other members in an organization, members within the organization can specialize in
Video Demo
When there are multiple people working on the same project, the cursor of each member is visible in the IDE and all file changes
occur in real-time for everyone. The following video demonstrates the collaboration feature:
3. Click the Select User... field and then click a member from the drop-down menu.
4. If you want to give the member control of the project's live deployments , select the Live Control check box.
The member you add receives an email with a link to the project.
If the project has a shared library , the collaborator can access the project, but not the library. To grant them access to the
Collaborator Quotas
The number of members you can add to a project depends on your organization's tier . The following table shows the number of
Free Unsupported
Team 10
Institution Unlimited
You need to have added a member to the project to toggle their live control of the project.
Follow these steps to enable and disable live control for a team member:
2. In the Collaborate section of the Project panel, click the profile image of the team member.
Follow these steps to remove a team member from a project you own:
2. In the Collaborate section of the Project panel, click the profile image of the team member.
To remove yourself as a collaborator from a project you don't own, delete the project .
Intellectual Property
All individuals on QuantConnect own their intellectual property (IP) on our platform. Your code is private and only accessible by
people you share the project with and with support-engineers when you submit a support ticket. At no point does QuantConnect
ever claim ownership of user IP. The only case where algorithm code becomes public domain is when they are shared to the
forum. In this case, algorithms need to be made public domain to allow the sharing of the algorithm code.
It is common when companies hire engineers to write software, they require their employees to sign an agreement that gives the
company IP ownership of any code written for work. They need this because they're paying you to write software, and the
company needs to sell that software to turn a profit. Similarly, the Organizations feature allows you to control who holds IP
ownership over a project. Each type of organization has its own mechanisms for handling project IP ownership.
Individual Organizations
The Free and the Quant Researcher tiers only allow single-member organizations. This means you can't collaborate with anyone
else inside the QuantConnect platform. Simply put, you own the IP for any projects you work on since you are the sole
collaborator.
Team Organizations
For organizations that allow multiple users to collaborate on projects, the user who created the project owns it; this can be you
or one of your teammates. If you add a teammate/collaborate, they can clone it, but the original project belongs to the person
who first created it.
For Trading Firm and Institution organizations, which are generally used by companies and funds, the firm owns all employee
projects. This is made to suit firms that wish to hire consultants and need to ensure the code remains with the company when
the consultant work is finished. You have to explicitly create a project in an organization for it to be created on the
organization's account.
Clone Projects
Clone a project to create a new copy of the project and save it within the same organization. When you clone a project, the
project files are duplicated but the backtest results and live deployment history are not retained. Cloning enables you to test
small changes in your projects before merging the changes back into the original project and start a new live deployment
record.
To clone projects, open the project you want to clone and then, in the Project panel, click Clone . "Project cloned successfully"
displays.
Share Projects
Run a backtest and then make the backtest results public to share a project. Once a backtest is made public, a link is generated
for you that opens the backtest results and the project files. You can directly give the link to others, attach the backtest to a
forum discussion, or embed the backtest into a website. However, note that when you make a backtest public, the project files
are accessible to anyone who visits the link, even after you delete the project. As a result, we don't recommend collaborating on
projects by making backtests public and sharing the link with your collaborators. Instead, add team members to your project
You can share a backtest at any time when it's executing. Although, if you generate a link to share the backtest before the
backtest completes, the link that's generated will not contain all of the backtest results. Some reasons to share your project
Attach the project to the forum to ask for help, gather feedback, or report an issue.
Attach the project to a data issue to reduce the amount of time it takes to fix the data issue.
Share a link to the project with others to give them a copy of the project files and the backtest results.
Migrate Projects
Migrating moves a project from one organization to another. You must be the organization administrator to migrate projects out
of the organization. Migrate a project to run the project using resources from a different organization and to collaborate on the
project with members from a different organization. When you migrate projects, the project files are copied but the content
3. Click the name of the organization to which you want to migrate the project and then click Migrate .
Projects
Code Sessions
Introduction
Code sessions let you access a cloud hosted IDE to research and develop trading algorithms. When you open a project, a new
code session starts running with the latest master branch of the LEAN trading engine. The session is ready to go with access to
the full QuantConnect data library and the cloud resources of the QuantConnect technology stack.
The Projects page displays all of your running code sessions in your current organization. To view the page, log in to the
Algorithm Lab and then, in the left navigation menu, click Projects .
To stop the code sessions, click the stop icon next to a project name. If you log out, the code sessions don't automatically stop.
The left navigation bar of the Algorithm Lab also shows the running code sessions underneath Projects . The blue code session
represents the session that's currently open. The gray code sessions represent the sessions that are currently minimized.
If you have a project open, it uses a coding session. Paid organizations can have multiple active coding sessions, but free users
can only have one coding session open at a time. The following table shows how many active coding sessions you can have on
Quant Researcher 2
Team 4
Trading Firm 8
Institution 16
If the organization you're in has more live trading nodes than your initial coding session quota, then your coding session quota
increases to the number of live trading nodes you have in the organization so you can view all your live strategies.
The quota for free organizations is a global quota, so you can have one active coding session across all of your free
organizations. The quotas for paid organizations are at the organization level. Therefore, if you are in two Quant Researcher
organizations, you can have two active coding sessions in one of those organizations and another two active sessions in the
other organization. These paid tier quotas are for each account, not for the organization as a whole. For instance, a Trading Firm
organization can have more than eight members and all of the members can simultaneously work on projects within the
organization.
Projects > Shared Libraries
Projects
Shared Libraries
Introduction
Project libraries are QuantConnect projects you can merge into your project to avoid duplicating code files. If you have tools that
Create Libraries
4. In the Input Library Name field, enter a name for the library (for example, Calculators ).
To create a library directory, set the name to directoryName / libraryName (for example, Tools / Calculators ).
The template library files are added to your project. View the files in the Explorer panel.
7. In Explorer panel, open the Library.py file, rename it to reflect its purpose (e.g.: TaxesCalculator.py ), and implement your
library.
Add Libraries
3. Click the Choose a library... field and then click a library from the drop-down menu.
The library files are added to your project. To view the files, in the right navigation menu, click the Explorer icon.
PY
Rename Libraries
To rename a library, open the library project file and then rename the project .
Remove Libraries
2. In the Project panel, hover over the library name and then click the trash can icon that appears.
Delete Libraries
Projects
Package Environments
Introduction
Libraries (or packages) are third-party software that you can use in your projects. You can use many of the available open-
source libraries to complement the classes and methods that you create. Libraries reduce your development time because it's
faster to use a pre-built, open-source library than to write the functionality. Libraries can be used in backtesting, research, and
live trading. The environments support various libraries for machine learning, plotting, and data processing. As members often
request new libraries, we frequently add new libraries to the underlying docker image that runs the Lean engine.
This feature is primarily for Python algorithms as not all Python libraries are compatible with each other. We've bundled together
different sets of libraries into distinct environments. To use the libraries of an environment, set the environment in your project
and add the relevant import statement of a library at the top of your file.
Set Environment
1. Open a project .
2. In the Project panel, click the Python Foundation field and then select an environment from the drop-down menu.
Default Environment
PY
absl-py 2.1.0
accelerate 0.30.1
adagio 0.2.4
aesara 2.9.3
aiohttp 3.9.5
aiosignal 1.3.1
aiosqlite 0.20.0
alembic 1.13.1
alibi-detect 0.12.0
alphalens-reloaded 0.4.3
altair 5.2.0
aniso8601 9.0.1
annotated-types 0.7.0
antlr4-python3-runtime 4.9.3
anyio 4.4.0
appdirs 1.4.4
apricot-select 0.6.1
arch 6.3.0
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
arviz 0.18.0
astropy 6.0.0
astropy-iers-data 0.2024.6.3.0.31.14
asttokens 2.4.1
astunparse 1.6.3
async-lru 2.0.4
attrs 23.2.0
Authlib 1.3.0
autograd 1.6.2
autograd-gamma 0.5.0
autokeras 2.0.0
autoray 0.6.12
ax-platform 0.3.7
Babel 2.15.0
Babel 2.15.0
bayesian-optimization 1.4.3
beautifulsoup4 4.12.3
bleach 6.1.0
blinker 1.8.2
blis 0.7.11
blosc2 2.6.2
bokeh 3.3.4
botorch 0.10.0
Bottleneck 1.3.8
cachetools 5.3.3
captum 0.7.0
catalogue 2.0.10
catboost 1.2.3
category-encoders 2.6.3
causal-conv1d 1.2.0.post2
chardet 5.2.0
check-shapes 1.1.1
clarabel 0.9.0
click 8.1.7
clikit 0.6.2
cloudpathlib 0.16.0
cloudpickle 3.0.0
cmdstanpy 1.2.1
colorama 0.4.6
colorcet 3.1.0
colorlog 6.8.2
colorlover 0.3.0
colour 0.1.5
comm 0.2.2
confection 0.1.5
cons 0.4.6
contourpy 1.2.0
control 0.9.4
copulae 0.7.9
copulas 0.10.1
coreforecast 0.0.9
cramjam 2.8.3
crashtest 0.3.1
creme 0.6.1
cufflinks 0.17.3
cvxopt 1.3.2
cvxpy 1.4.2
cycler 0.12.1
cymem 2.0.8
Cython 3.0.10
darts 0.28.0
dash 2.17.0
dash-core-components 2.0.0
dash-cytoscape 1.0.1
dash-html-components 2.0.0
dash-table 5.0.0
dask 2024.3.1
dask-expr 1.0.5
dataclasses-json 0.6.6
datasets 2.17.1
deap 1.4.1
debugpy 1.6.7.post1
decorator 5.1.1
deepmerge 1.1.1
defusedxml 0.7.1
Deprecated 1.2.14
deprecation 2.1.0
dgl 2.1.0
dill 0.3.8
dimod 0.12.14
dirtyjson 1.0.8
diskcache 5.6.3
distributed 2024.3.1
dm-tree 0.1.8
docker 7.1.0
docutils 0.20.1
DoubleML 0.7.1
dropstackframe 0.1.0
dtreeviz 2.2.2
dtw-python 1.3.1
dwave-cloud-client 0.11.3
dwave-drivers 0.4.4
dwave-greedy 0.3.0
dwave-hybrid 0.6.11
dwave-inspector 0.4.4
dwave-inspectorapp 0.3.1
dwave-inspectorapp 0.3.1
dwave-neal 0.6.0
dwave-networkx 0.8.14
dwave-ocean-sdk 6.9.0
dwave-preprocessing 0.6.5
dwave-samplers 1.2.0
dwave-system 1.23.0
dwave-tabu 0.5.0
dwavebinarycsp 0.3.0
ecos 2.0.13
einops 0.7.0
EMD-signal 1.6.0
empyrical-reloaded 0.5.10
en-core-web-md 3.7.1
en-core-web-sm 3.7.1
entrypoints 0.4
et-xmlfile 1.1.0
etuples 0.3.9
exchange_calendars 4.5.4
executing 2.0.1
faiss-cpu 1.8.0
Farama-Notifications 0.0.4
fastai 2.7.14
fastai2 0.0.30
fastcore 1.5.43
fastdownload 0.0.7
fasteners 0.19
fastjsonschema 2.19.1
fastparquet 2024.2.0
fastprogress 1.0.3
fasttext 0.9.2
feature-engine 1.6.2
featuretools 1.30.0
filelock 3.14.0
findiff 0.10.0
FixedEffectModel 0.0.5
FlagEmbedding 1.2.10
FLAML 2.1.2
Flask 3.0.3
flatbuffers 24.3.25
fonttools 4.53.0
formulaic 1.0.1
fqdn 1.5.1
frozendict 2.4.4
frozenlist 1.4.1
fs 2.4.16
fsspec 2023.10.0
fugue 0.9.0
functime 0.9.5
future 1.0.0
fuzzy-c-means 1.7.2
gast 0.5.4
gensim 4.3.2
gevent 24.2.1
gitdb 4.0.11
GitPython 3.1.43
gluonts 0.14.4
google-pasta 0.2.0
gpflow 2.9.1
gplearn 0.4.2
gpytorch 1.11
graphene 3.3
graphql-core 3.2.3
graphql-relay 3.2.0
graphviz 0.20.1
greenlet 3.0.3
grpcio 1.64.1
gunicorn 21.2.0
gym 0.26.2
gym-notices 0.0.8
gymnasium 0.28.1
h11 0.14.0
h2o 3.46.0.1
h5netcdf 1.3.0
h5py 3.11.0
hmmlearn 0.3.2
holidays 0.50
holoviews 1.18.3
homebase 1.0.1
hopcroftkarp 1.2.5
html5lib 1.1
httpcore 1.0.5
httpcore 1.0.5
httpstan 4.12.0
httpx 0.27.0
huggingface-hub 0.23.2
hurst 0.0.5
hvplot 0.9.2
hydra-core 1.3.0
hyperopt 0.2.7
ibm-cloud-sdk-core 3.20.1
ibm-platform-services 0.53.7
iisignature 0.24
ijson 3.2.3
imageio 2.34.1
imbalanced-learn 0.12.0
immutabledict 4.2.0
importlib_metadata 7.1.0
importlib_resources 6.4.0
iniconfig 2.0.0
injector 0.21.0
interface-meta 1.3.0
interpret 0.5.1
interpret-core 0.5.1
ipykernel 6.29.4
ipython 8.25.0
ipywidgets 8.1.2
isoduration 20.11.0
itsdangerous 2.2.0
jax 0.4.25
jax-jumpy 1.0.0
jaxlib 0.4.25
jaxtyping 0.2.29
jedi 0.19.1
Jinja2 3.1.4
joblib 1.3.2
json5 0.9.25
jsonpatch 1.33
jsonpath-ng 1.6.1
jsonpointer 2.1
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyter 1.0.0
jupyter-console 6.6.3
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter-resource-usage 1.0.2
jupyter_ai 2.12.0
jupyter_ai_magics 2.16.0
jupyter_bokeh 4.0.0
jupyter_client 8.6.2
jupyter_core 5.7.2
jupyter_server 2.14.1
jupyter_server_terminals 0.5.3
jupyterlab 4.1.5
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.2
jupyterlab_widgets 3.0.11
kagglehub 0.2.5
kaleido 0.2.1
keras 3.3.3
keras-core 0.1.7
keras-nlp 0.12.1
keras-rl 0.4.2
keras-tcn 3.5.0
keras-tuner 1.4.7
kiwisolver 1.4.5
kmapper 2.0.1
korean-lunar-calendar 0.3.1
kt-legacy 1.0.5
langchain 0.1.12
langchain-community 0.0.38
langchain-core 0.1.52
langchain-text-splitters 0.0.2
langcodes 3.4.0
langsmith 0.1.67
language_data 1.2.0
lark 1.1.9
lazy_loader 0.4
lazypredict-nightly 0.3.0
libclang 18.1.1
lifelines 0.28.0
lightgbm 4.3.0
lightning 2.2.5
lightning 2.2.5
lightning-utilities 0.11.2
lime 0.2.0.1
line-profiler 4.1.2
linear-operator 0.5.1
linkify-it-py 2.0.3
livelossplot 0.5.5
llama-index 0.10.19
llama-index-agent-openai 0.1.7
llama-index-cli 0.1.12
llama-index-core 0.10.43
llama-index-embeddings-openai 0.1.10
llama-index-indices-managed-llama-cloud 0.1.6
llama-index-legacy 0.9.48
llama-index-llms-openai 0.1.22
llama-index-multi-modal-llms-openai 0.1.6
llama-index-program-openai 0.1.6
llama-index-question-gen-openai 0.1.3
llama-index-readers-file 0.1.23
llama-index-readers-llama-parse 0.1.4
llama-parse 0.4.4
llamaindex-py-client 0.1.19
llvmlite 0.42.0
locket 1.0.0
logical-unification 0.4.6
lxml 5.1.0
lz4 4.3.3
Mako 1.3.5
mamba-ssm 1.2.0.post1
MAPIE 0.8.3
marisa-trie 1.1.1
Markdown 3.6
markdown-it-py 3.0.0
MarkupSafe 2.1.5
marshmallow 3.21.2
matplotlib 3.7.5
matplotlib-inline 0.1.7
mdit-py-plugins 0.4.1
mdurl 0.1.2
mgarch 0.3.0
miniKanren 1.0.3
minorminer 0.2.13
mistune 3.0.2
ml-dtypes 0.3.2
mlflow 2.11.1
mlforecast 0.12.0
mljar-supervised 1.1.6
mlxtend 0.23.1
mmh3 2.5.1
modin 0.26.1
mplfinance 0.12.10b0
mpmath 1.3.0
msgpack 1.0.8
multidict 6.0.5
multipledispatch 1.0.0
multiprocess 0.70.16
multitasking 0.0.11
murmurhash 1.0.10
mypy-extensions 1.0.0
namex 0.0.8
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
ndindex 1.8
nest-asyncio 1.6.0
networkx 3.3
neural-tangents 0.6.5
neuralprophet 0.8.0
nfoursid 1.0.1
ngboost 0.5.1
ninja 1.11.1.1
nltk 3.8.1
nolds 0.5.2
nose 1.3.7
notebook 7.1.3
notebook_shim 0.2.4
numba 0.59.0
numerapi 2.18.0
numexpr 2.10.0
numpy 1.26.4
nvidia-cublas-cu12 12.1.3.1
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-nvrtc-cu12 12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12 8.9.2.26
nvidia-cufft-cu12 11.0.2.54
nvidia-curand-cu12 10.3.2.106
nvidia-cusolver-cu12 11.4.5.107
nvidia-cusparse-cu12 12.1.0.106
nvidia-nccl-cu12 2.19.3
nvidia-nvjitlink-cu12 12.5.40
nvidia-nvtx-cu12 12.1.105
oauthlib 3.2.2
omegaconf 2.3.0
openai 1.30.4
opencv-contrib-python-headless 4.9.0.80
opencv-python 4.10.0.82
openpyxl 3.1.2
opt-einsum 3.3.0
optree 0.11.0
optuna 3.5.0
orjson 3.10.3
ortools 9.9.3963
osqp 0.6.7
overrides 7.7.0
packaging 23.2
pandas 2.1.4
pandas-flavor 0.6.0
pandas-ta 0.3.14b0
pandas_market_calendars 4.4.0
pandocfilters 1.5.1
panel 1.3.8
param 2.1.0
parso 0.8.4
partd 1.4.2
pastel 0.2.1
pathos 0.3.2
patsy 0.5.6
pbr 6.0.0
peewee 3.17.3
peft 0.11.1
penaltymodel 1.1.0
PennyLane 0.35.1
PennyLane-qiskit 0.35.1
PennyLane_Lightning 0.35.1
persim 0.3.5
pexpect 4.9.0
pgmpy 0.1.25
pillow 10.3.0
pingouin 0.5.4
plotly 5.20.0
plotly-resampler 0.10.0
plucky 0.4.3
pluggy 1.5.0
ply 3.11
pmdarima 2.0.4
polars 0.20.15
pomegranate 1.0.4
POT 0.9.3
pox 0.3.4
ppft 1.7.6.8
pprofile 2.1.0
preshed 3.0.9
prometheus_client 0.20.0
prompt_toolkit 3.0.45
prophet 1.1.5
protobuf 4.25.3
psutil 5.9.8
ptvsd 4.3.2
ptyprocess 0.7.0
PuLP 2.8.0
pure-eval 0.2.2
py-cpuinfo 9.0.0
py-heat 0.0.6
py-heat-magic 0.0.2
py-lets-be-rational 1.0.1
py-vollib 1.0.1
py4j 0.10.9.7
pyaml 24.4.0
pyarrow 15.0.1
pyarrow-hotfix 0.6
pybind11 2.12.0
pycaret 3.3.2
pycaret 3.3.2
pydantic 2.7.3
pydantic_core 2.18.4
pydevd-pycharm 231.9225.15
pydmd 1.0.0
pyerfa 2.0.1.4
pyfolio-reloaded 0.9.5
Pygments 2.18.0
PyJWT 2.8.0
pykalman 0.9.7
pylev 1.4.0
pyluach 2.2.0
pymannkendall 1.4.3
pymc 5.10.4
pymdptoolbox 4.0b3
pynndescent 0.5.12
pyod 2.0.0
Pyomo 6.7.1
pyparsing 3.1.2
pypdf 4.2.0
pyportfolioopt 1.5.5
pyre-extensions 0.0.30
pyro-api 0.1.2
pyro-ppl 1.9.0
pysimdjson 5.0.2
pyspnego 0.10.2
pystan 3.9.0
pytensor 2.18.6
pytest 8.2.1
python-dateutil 2.9.0.post0
python-dotenv 1.0.0
python-json-logger 2.0.7
python-statemachine 2.1.2
pytorch-ignite 0.4.13
pytorch-lightning 1.9.5
pytorch-tabnet 4.1.0
pytz 2024.1
pyvinecopulib 0.6.5
pyviz_comms 3.0.2
PyWavelets 1.5.0
PyYAML 6.0.1
pyzmq 26.0.3
qdldl 0.1.7.post2
qiskit 1.0.2
qiskit-aer 0.14.2
qiskit-ibm-provider 0.11.0
qiskit-ibm-runtime 0.20.0
qtconsole 5.5.2
QtPy 2.4.1
quadprog 0.1.12
quantecon 0.7.2
QuantLib 1.33
QuantStats 0.0.62
querystring-parser 1.2.4
rauth 0.7.3
ray 2.9.3
Rbeast 0.1.19
rectangle-packer 2.0.2
referencing 0.35.1
regex 2024.5.15
requests-ntlm 1.2.0
requests-oauthlib 1.3.1
retrying 1.3.4
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.7.1
ripser 0.6.8
Riskfolio-Lib 6.0.0
riskparityportfolio 0.5.1
river 0.21.0
rpds-py 0.18.1
ruptures 1.1.9
rustworkx 0.14.2
safetensors 0.4.3
SALib 1.5.0
schemdraw 0.15
scikeras 0.13.0
scikit-base 0.7.8
scikit-image 0.22.0
scikit-learn 1.4.2
scikit-learn-extra 0.3.0
scikit-optimize 0.10.0
scikit-optimize 0.10.0
scikit-plot 0.3.7
scikit-tda 1.0.0
scipy 1.11.4
scs 3.2.4.post2
sdeint 0.3.0
seaborn 0.13.2
semantic-version 2.10.0
Send2Trash 1.8.3
sentence-transformers 3.0.0
setuptools-scm 8.1.0
shap 0.45.0
Shimmy 1.3.0
simplejson 3.19.2
simpy 4.1.1
six 1.16.0
sklearn-json 0.1.0
sktime 0.26.0
slicer 0.0.7
smart-open 6.4.0
smmap 5.0.1
sniffio 1.3.1
sortedcontainers 2.4.0
soupsieve 2.5
spacy 3.7.4
spacy-legacy 3.0.12
spacy-loggers 1.0.5
SQLAlchemy 2.0.30
sqlparse 0.5.0
srsly 2.4.8
stable_baselines3 2.3.2
stack-data 0.6.3
stanio 0.3.0
statsforecast 1.7.5
statsmodels 0.14.1
stevedore 5.2.0
stochastic 0.6.0
stockstats 0.6.2
stopit 1.1.2
striprtf 0.0.26
stumpy 1.12.0
symengine 0.11.0
sympy 1.12.1
ta 0.11.0
TA-Lib 0.4.28
tables 3.9.2
tabulate 0.8.10
tadasets 0.2.1
tbats 1.1.3
tblib 3.0.0
tenacity 8.3.0
tensorboard 2.16.2
tensorboard-data-server 0.7.2
tensorboardX 2.6.2.2
tensorflow 2.16.1
tensorflow-addons 0.23.0
tensorflow-io-gcs-filesystem 0.37.0
tensorflow-probability 0.24.0
tensorflow-text 2.16.1
tensorflow_decision_forests 1.9.0
tensorly 0.8.1
tensorrt 8.6.1.post1
tensorrt-bindings 8.6.1
tensorrt-libs 8.6.1
tensortrade 1.0.3
termcolor 2.4.0
terminado 0.18.1
tf2jax 0.3.6
tf_keras 2.16.0
thinc 8.2.3
threadpoolctl 3.5.0
thundergbm 0.3.17
tifffile 2024.5.22
tiktoken 0.7.0
tinycss2 1.3.0
tokenizers 0.19.1
toml 0.10.2
toolz 0.12.1
torch 2.2.1
torch-cluster 1.6.3
torch-scatter 2.1.2
torch-sparse 0.6.18
torch-sparse 0.6.18
torch-spline-conv 1.2.2
torch_geometric 2.5.1
torchdata 0.7.1
torchmetrics 1.4.0.post0
torchvision 0.17.1
tornado 6.4
TPOT 0.12.2
tqdm 4.66.4
traitlets 5.14.3
transformers 4.40.2
triad 0.9.6
triton 2.2.0
tsdownsample 0.1.3
tsfresh 0.20.2
tslearn 0.6.3
tweepy 4.14.0
typeguard 2.13.3
typer 0.9.4
typer-config 1.4.0
types-python-dateutil 2.9.0.20240316
typing-inspect 0.9.0
typing_extensions 4.12.1
tzdata 2024.1
uc-micro-py 1.0.3
umap-learn 0.5.5
update-checker 0.18.0
uri-template 1.3.0
utilsforecast 0.1.10
wasabi 1.1.3
wcwidth 0.2.13
weasel 0.3.4
webargs 8.4.0
webcolors 1.13
webencodings 0.5.1
websocket-client 1.8.0
websockets 12.0
Werkzeug 3.0.1
widgetsnbextension 4.0.11
window_ops 0.0.15
woodwork 0.31.0
wordcloud 1.9.3
wrapt 1.16.0
wurlitzer 3.1.0
x-transformers 1.30.4
xarray 2024.2.0
xarray-einstats 0.7.0
xgboost 2.0.3
xlrd 2.0.1
XlsxWriter 3.2.0
xxhash 3.4.1
xyzservices 2024.4.0
yarl 1.9.4
yellowbrick 1.5
yfinance 0.2.40
zict 3.0.0
zipp 3.19.1
zope.event 5.0
zope.interface 6.4.post2
Autokeras Environment
The Autokeras environment provides a backwards compatability environment for compatibility with Keras < 3 ,
Tensorflow 2.14.1 , and Pydantic . This environment supports the following libraries:
PY
absl-py 2.1.0
accelerate 0.30.1
adagio 0.2.4
aesara 2.9.3
aiohttp 3.9.5
aiosignal 1.3.1
aiosqlite 0.20.0
alibi-detect 0.12.0
alphalens-reloaded 0.4.3
altair 5.2.0
aniso8601 9.0.1
annotated-types 0.7.0
annotated-types 0.7.0
antlr4-python3-runtime 4.9.3
anyio 4.4.0
appdirs 1.4.4
apricot-select 0.6.1
arch 6.3.0
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
arviz 0.18.0
astropy 6.0.0
astropy-iers-data 0.2024.6.3.0.31.14
asttokens 2.4.1
astunparse 1.6.3
async-generator 1.10
async-lru 2.0.4
Authlib 1.3.0
autograd 1.6.2
autograd-gamma 0.5.0
autokeras 1.1.0
autoray 0.6.12
ax-platform 0.3.7
Babel 2.15.0
bayesian-optimization 1.4.3
beautifulsoup4 4.12.3
bleach 6.1.0
blis 0.7.11
blosc2 2.6.2
bokeh 3.3.4
botorch 0.10.0
Bottleneck 1.3.8
cachetools 5.3.3
captum 0.7.0
catalogue 2.0.10
catboost 1.2.3
category-encoders 2.6.3
causal-conv1d 1.2.0.post2
certipy 0.1.3
chardet 5.2.0
check-shapes 1.1.1
clarabel 0.9.0
click 8.1.7
clikit 0.6.2
cloudpathlib 0.16.0
cloudpickle 3.0.0
clr-loader 0.1.6
cmdstanpy 1.2.1
colorama 0.4.6
colorcet 3.1.0
colorlog 6.8.2
colorlover 0.3.0
colour 0.1.5
comm 0.2.2
confection 0.1.5
cons 0.4.6
contourpy 1.2.0
control 0.9.4
copulae 0.7.9
copulas 0.10.1
coreforecast 0.0.9
cramjam 2.8.3
crashtest 0.3.1
creme 0.6.1
cufflinks 0.17.3
cvxopt 1.3.2
cvxpy 1.4.2
cycler 0.12.1
cymem 2.0.8
Cython 3.0.9
darts 0.28.0
dash 2.17.0
dash-core-components 2.0.0
dash-cytoscape 1.0.1
dash-html-components 2.0.0
dash-table 5.0.0
dask 2024.3.1
dask-expr 1.0.5
dataclasses-json 0.6.6
datasets 2.17.1
deap 1.4.1
debugpy 1.8.1
decorator 5.1.1
deepmerge 1.1.1
defusedxml 0.7.1
Deprecated 1.2.14
deprecation 2.1.0
dgl 2.1.0
dill 0.3.8
dimod 0.12.14
dirtyjson 1.0.8
diskcache 5.6.3
distributed 2024.3.1
dm-tree 0.1.8
docker 7.1.0
docutils 0.20.1
DoubleML 0.7.1
dropstackframe 0.1.0
dtreeviz 2.2.2
dtw-python 1.3.1
dwave-cloud-client 0.11.3
dwave-drivers 0.4.4
dwave-greedy 0.3.0
dwave-hybrid 0.6.11
dwave-inspector 0.4.4
dwave-inspectorapp 0.3.1
dwave-neal 0.6.0
dwave-networkx 0.8.14
dwave-ocean-sdk 6.9.0
dwave-preprocessing 0.6.5
dwave-samplers 1.2.0
dwave-system 1.23.0
dwave-tabu 0.5.0
dwavebinarycsp 0.3.0
ecos 2.0.13
einops 0.7.0
EMD-signal 1.6.0
empyrical-reloaded 0.5.10
en-core-web-md 3.7.1
en-core-web-sm 3.7.1
et-xmlfile 1.1.0
etuples 0.3.9
exchange_calendars 4.5.4
executing 2.0.1
faiss-cpu 1.8.0
Farama-Notifications 0.0.4
fastai 2.7.14
fastai2 0.0.30
fastcore 1.5.43
fastdownload 0.0.7
fasteners 0.19
fastjsonschema 2.19.1
fastparquet 2024.2.0
fastprogress 1.0.3
fasttext 0.9.2
feature-engine 1.6.2
featuretools 1.30.0
filelock 3.14.0
findiff 0.10.0
FixedEffectModel 0.0.5
FlagEmbedding 1.2.10
FLAML 2.1.2
Flask 3.0.3
flatbuffers 24.3.25
fonttools 4.53.0
formulaic 1.0.1
fqdn 1.5.1
frozendict 2.4.4
frozenlist 1.4.1
fs 2.4.16
fsspec 2023.10.0
fugue 0.9.0
functime 0.9.5
future 1.0.0
fuzzy-c-means 1.7.2
gast 0.5.4
gensim 4.3.2
gevent 24.2.1
gitdb 4.0.11
GitPython 3.1.43
gluonts 0.14.4
google-auth 2.29.0
google-auth-oauthlib 1.0.0
google-auth-oauthlib 1.0.0
google-pasta 0.2.0
gpflow 2.9.1
gplearn 0.4.2
gpytorch 1.11
graphene 3.3
graphql-core 3.2.3
graphql-relay 3.2.0
graphviz 0.20.1
grpcio 1.64.1
gunicorn 21.2.0
gym 0.26.2
gym-notices 0.0.8
gymnasium 0.28.1
h11 0.14.0
h2o 3.46.0.1
h5netcdf 1.3.0
h5py 3.11.0
hmmlearn 0.3.2
holidays 0.50
holoviews 1.18.3
homebase 1.0.1
hopcroftkarp 1.2.5
html5lib 1.1
httpcore 1.0.5
httpstan 4.12.0
httpx 0.27.0
huggingface-hub 0.23.2
hurst 0.0.5
hvplot 0.9.2
hydra-core 1.3.0
hyperopt 0.2.7
ibm-cloud-sdk-core 3.20.1
ibm-platform-services 0.53.7
iisignature 0.24
ijson 3.2.3
imageio 2.34.1
imbalanced-learn 0.12.0
immutabledict 4.2.0
importlib-metadata 4.13.0
iniconfig 2.0.0
injector 0.21.0
interface-meta 1.3.0
interpret 0.5.1
interpret-core 0.5.1
ipykernel 6.29.4
ipython 8.25.0
ipywidgets 8.1.2
isoduration 20.11.0
itsdangerous 2.2.0
jax 0.4.25
jax-jumpy 1.0.0
jaxlib 0.4.25
jaxtyping 0.2.29
jedi 0.19.1
joblib 1.3.2
json5 0.9.25
jsonpatch 1.33
jsonpath-ng 1.6.1
jsonpointer 2.1
jupyter 1.0.0
jupyter-console 6.6.3
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter-resource-usage 1.0.2
jupyter_ai 2.12.0
jupyter_ai_magics 2.16.0
jupyter_bokeh 4.0.0
jupyter_client 8.6.2
jupyter_core 5.7.2
jupyter_server 2.14.1
jupyter_server_terminals 0.5.3
jupyterlab 4.1.5
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.2
jupyterlab_widgets 3.0.11
kagglehub 0.2.5
kaleido 0.2.1
keras 2.14.0
keras-core 0.1.7
keras-nlp 0.12.1
keras-rl 0.4.2
keras-rl 0.4.2
keras-tcn 3.5.0
keras-tuner 1.4.7
kiwisolver 1.4.5
kmapper 2.0.1
korean-lunar-calendar 0.3.1
kt-legacy 1.0.5
langchain 0.1.12
langchain-community 0.0.38
langchain-core 0.1.52
langchain-text-splitters 0.0.2
langcodes 3.4.0
langsmith 0.1.67
language_data 1.2.0
lark 1.1.9
lazy_loader 0.4
lazypredict-nightly 0.3.0
libclang 18.1.1
lifelines 0.28.0
lightgbm 4.3.0
lightning 2.2.5
lightning-utilities 0.11.2
lime 0.2.0.1
line-profiler 4.1.2
linear-operator 0.5.1
linkify-it-py 2.0.3
livelossplot 0.5.5
llama-index 0.10.19
llama-index-agent-openai 0.1.7
llama-index-cli 0.1.12
llama-index-core 0.10.43
llama-index-embeddings-openai 0.1.10
llama-index-indices-managed-llama-cloud 0.1.6
llama-index-legacy 0.9.48
llama-index-llms-openai 0.1.22
llama-index-multi-modal-llms-openai 0.1.6
llama-index-program-openai 0.1.6
llama-index-question-gen-openai 0.1.3
llama-index-readers-file 0.1.23
llama-index-readers-llama-parse 0.1.4
llama-parse 0.4.4
llamaindex-py-client 0.1.19
llvmlite 0.42.0
locket 1.0.0
logical-unification 0.4.6
lxml 5.1.0
lz4 4.3.3
mamba-ssm 1.2.0.post1
MAPIE 0.8.3
marisa-trie 1.1.1
Markdown 3.6
markdown-it-py 3.0.0
marshmallow 3.21.2
matplotlib 3.7.5
matplotlib-inline 0.1.7
mdit-py-plugins 0.4.1
mdurl 0.1.2
mgarch 0.3.0
miniKanren 1.0.3
minorminer 0.2.13
mistune 3.0.2
ml-dtypes 0.2.0
mlflow 2.11.1
mlforecast 0.12.0
mljar-supervised 1.1.6
mlxtend 0.23.1
mmh3 2.5.1
modin 0.26.1
mplfinance 0.12.10b0
mpmath 1.3.0
msgpack 1.0.8
multidict 6.0.5
multipledispatch 1.0.0
multiprocess 0.70.16
multitasking 0.0.11
murmurhash 1.0.10
mypy-extensions 1.0.0
namex 0.0.8
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
ndindex 1.8
ndindex 1.8
nest-asyncio 1.6.0
networkx 3.3
neural-tangents 0.6.5
neuralprophet 0.8.0
nfoursid 1.0.1
ngboost 0.5.1
ninja 1.11.1.1
nixtlats 0.2.0
nltk 3.8.1
nolds 0.5.2
nose 1.3.7
notebook 7.1.3
notebook_shim 0.2.4
numba 0.59.0
numerapi 2.18.0
numexpr 2.10.0
numpy 1.26.4
nvidia-cublas-cu12 12.5.2.13
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-nvrtc-cu12 12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12 8.9.2.26
nvidia-cufft-cu12 11.0.2.54
nvidia-curand-cu12 10.3.2.106
nvidia-cusolver-cu12 11.4.5.107
nvidia-cusparse-cu12 12.1.0.106
nvidia-nccl-cu12 2.19.3
nvidia-nvjitlink-cu12 12.5.40
nvidia-nvtx-cu12 12.1.105
omegaconf 2.3.0
openai 1.30.4
opencv-contrib-python-headless 4.9.0.80
opencv-python 4.10.0.82
openpyxl 3.1.2
opt-einsum 3.3.0
optree 0.11.0
optuna 3.5.0
orjson 3.10.3
ortools 9.9.3963
osqp 0.6.7
overrides 7.7.0
packaging 23.2
pandas 2.1.4
pandas-flavor 0.6.0
pandas-ta 0.3.14b0
pandas_market_calendars 4.4.0
pandocfilters 1.5.1
panel 1.3.8
param 2.1.0
parso 0.8.4
partd 1.4.2
pastel 0.2.1
pathos 0.3.2
patsy 0.5.6
pbr 6.0.0
pearl 2.3.12
peewee 3.17.3
peft 0.11.1
penaltymodel 1.1.0
PennyLane 0.35.1
PennyLane-qiskit 0.35.1
PennyLane_Lightning 0.35.1
persim 0.3.5
pexpect 4.9.0
pgmpy 0.1.25
pillow 10.3.0
pingouin 0.5.4
plotly 5.20.0
plotly-resampler 0.10.0
plucky 0.4.3
pluggy 1.5.0
ply 3.11
pmdarima 2.0.4
polars 0.20.15
pomegranate 1.0.4
POT 0.9.3
pox 0.3.4
ppft 1.7.6.8
pprofile 2.1.0
preshed 3.0.9
prompt_toolkit 3.0.45
prompt_toolkit 3.0.45
prophet 1.1.5
protobuf 4.25.3
ptyprocess 0.7.0
PuLP 2.8.0
pure-eval 0.2.2
py-cpuinfo 9.0.0
py-heat 0.0.6
py-heat-magic 0.0.2
py-lets-be-rational 1.0.1
py-vollib 1.0.1
py4j 0.10.9.7
pyaml 24.4.0
pyarrow 15.0.1
pyarrow-hotfix 0.6
pyasn1 0.6.0
pyasn1_modules 0.4.0
pybind11 2.12.0
pycaret 3.3.2
pycparser 2.20
pydantic 1.10.15
pydantic_core 2.18.4
pydmd 1.0.0
pyerfa 2.0.1.4
pyfolio-reloaded 0.9.5
Pygments 2.18.0
pykalman 0.9.7
pylev 1.4.0
pyluach 2.2.0
pymannkendall 1.4.3
pymc 5.10.4
pymdptoolbox 4.0b3
pynndescent 0.5.12
pyod 2.0.0
Pyomo 6.7.1
pyparsing 3.1.2
pypdf 4.2.0
pyportfolioopt 1.5.5
pyre-extensions 0.0.30
pyro-api 0.1.2
pyro-ppl 1.9.0
pysimdjson 5.0.2
pyspnego 0.10.2
pystan 3.9.0
pytensor 2.18.6
pytest 8.2.1
python-dotenv 1.0.0
python-statemachine 2.1.2
pytorch-ignite 0.4.13
pytorch-lightning 1.9.5
pytorch-tabnet 4.1.0
pytz 2024.1
pyvinecopulib 0.6.5
pyviz_comms 3.0.2
PyWavelets 1.5.0
PyYAML 6.0.1
pyzmq 26.0.3
qdldl 0.1.7.post2
qiskit 1.0.2
qiskit-aer 0.14.2
qiskit-ibm-provider 0.11.0
qiskit-ibm-runtime 0.20.0
qtconsole 5.5.2
QtPy 2.4.1
quadprog 0.1.12
quantconnect-stubs 16467
quantecon 0.7.2
QuantLib 1.33
QuantStats 0.0.62
querystring-parser 1.2.4
rauth 0.7.3
ray 2.9.3
Rbeast 0.1.19
rectangle-packer 2.0.2
regex 2024.5.15
requests-ntlm 1.2.0
requests-oauthlib 1.3.1
retrying 1.3.4
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.7.1
ripser 0.6.8
ripser 0.6.8
Riskfolio-Lib 6.0.0
riskparityportfolio 0.5.1
river 0.21.0
rsa 4.9
ruptures 1.1.9
rustworkx 0.14.2
safetensors 0.4.3
SALib 1.5.0
schemdraw 0.15
scikeras 0.13.0
scikit-base 0.7.8
scikit-image 0.22.0
scikit-learn 1.4.2
scikit-learn-extra 0.3.0
scikit-optimize 0.10.0
scikit-plot 0.3.7
scikit-tda 1.0.0
scipy 1.11.4
scs 3.2.4.post2
sdeint 0.3.0
seaborn 0.13.2
semantic-version 2.10.0
Send2Trash 1.8.3
sentence-transformers 3.0.0
setuptools-scm 8.1.0
shap 0.45.0
Shimmy 1.3.0
simplejson 3.19.2
simpy 4.1.1
sklearn-json 0.1.0
sktime 0.26.0
slicer 0.0.7
smart-open 6.4.0
smmap 5.0.1
sniffio 1.3.1
sortedcontainers 2.4.0
soupsieve 2.5
spacy 3.7.4
spacy-legacy 3.0.12
spacy-loggers 1.0.5
sqlparse 0.5.0
srsly 2.4.8
stable_baselines3 2.3.2
stack-data 0.6.3
stanio 0.3.0
statsforecast 1.7.5
statsmodels 0.14.1
stevedore 5.2.0
stochastic 0.6.0
stockstats 0.6.2
stopit 1.1.2
striprtf 0.0.26
stumpy 1.12.0
symengine 0.11.0
sympy 1.12.1
ta 0.11.0
TA-Lib 0.4.28
tables 3.9.2
tabulate 0.8.10
tadasets 0.2.1
tbats 1.1.3
tblib 3.0.0
tenacity 8.3.0
tensorboard 2.14.1
tensorboard-data-server 0.7.2
tensorboardX 2.6.2.2
tensorflow 2.14.1
tensorflow-addons 0.23.0
tensorflow-estimator 2.14.0
tensorflow-hub 0.16.1
tensorflow-io-gcs-filesystem 0.37.0
tensorflow-probability 0.24.0
tensorflow-ranking 0.5.3
tensorflow-serving-api 2.14.1
tensorflow-text 2.14.0
tensorflow_decision_forests 1.9.0
tensorly 0.8.1
tensorrt 8.6.1.post1
tensorrt-bindings 8.6.1
tensorrt-libs 8.6.1
tensortrade 1.0.3
tensortrade 1.0.3
termcolor 2.4.0
terminado 0.18.1
tf-keras 2.15.0
tf2jax 0.3.6
thinc 8.2.3
threadpoolctl 3.5.0
thundergbm 0.3.17
tifffile 2024.5.22
tiktoken 0.7.0
tinycss2 1.3.0
tokenizers 0.19.1
toml 0.10.2
toolz 0.12.1
torch 2.2.1
torch-cluster 1.6.3
torch-scatter 2.1.2
torch-sparse 0.6.18
torch-spline-conv 1.2.2
torch_geometric 2.5.1
torchdata 0.7.1
torchmetrics 1.4.0.post0
torchvision 0.17.1
TPOT 0.12.2
tqdm 4.66.4
transformers 4.40.2
triad 0.9.6
triton 2.2.0
tsdownsample 0.1.3
tsfresh 0.20.2
tslearn 0.6.3
tweepy 4.14.0
typeguard 2.13.3
typer 0.9.4
typer-config 1.4.0
types-python-dateutil 2.9.0.20240316
typing-inspect 0.9.0
tzdata 2024.1
uc-micro-py 1.0.3
umap-learn 0.5.5
update-checker 0.18.0
uri-template 1.3.0
utilsforecast 0.1.10
wasabi 1.1.3
wcwidth 0.2.13
weasel 0.3.4
webargs 8.4.0
webcolors 1.13
webencodings 0.5.1
websocket-client 1.8.0
websockets 12.0
Werkzeug 3.0.1
widgetsnbextension 4.0.11
window_ops 0.0.15
woodwork 0.31.0
wordcloud 1.9.3
wrapt 1.14.1
wurlitzer 3.1.0
x-transformers 1.30.4
xarray 2024.2.0
xarray-einstats 0.7.0
xgboost 2.0.3
xlrd 2.0.1
XlsxWriter 3.2.0
xxhash 3.4.1
xyzservices 2024.4.0
yarl 1.9.4
yellowbrick 1.5
yfinance 0.2.40
zict 3.0.0
zope.event 5.0
zope.interface 6.4.post2
Autogluon Environment
PY
PY
absl-py 2.1.0
accelerate 0.21.0
adagio 0.2.4
aesara 2.9.3
aiohttp 3.9.5
aiohttp-cors 0.7.0
aiosignal 1.3.1
aiosqlite 0.20.0
alibi-detect 0.12.0
aliyun-python-sdk-core 2.15.1
aliyun-python-sdk-kms 2.16.3
alphalens-reloaded 0.4.3
altair 5.2.0
aniso8601 9.0.1
annotated-types 0.7.0
antlr4-python3-runtime 4.9.3
anyio 4.4.0
appdirs 1.4.4
apricot-select 0.6.1
arch 6.3.0
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
arviz 0.18.0
astropy 6.0.0
astropy-iers-data 0.2024.6.3.0.31.14
asttokens 2.4.1
astunparse 1.6.3
async-generator 1.10
async-lru 2.0.4
Authlib 1.3.0
autogluon 1.1.0
autogluon.common 1.1.0
autogluon.core 1.1.0
autogluon.features 1.1.0
autogluon.multimodal 1.1.0
autogluon.tabular 1.1.0
autogluon.timeseries 1.1.0
autograd 1.6.2
autograd-gamma 0.5.0
autokeras 2.0.0
autoray 0.6.12
ax-platform 0.3.7
Babel 2.15.0
bayesian-optimization 1.4.3
beautifulsoup4 4.12.3
bleach 6.1.0
blis 0.7.11
blosc2 2.6.2
bokeh 3.3.4
boto3 1.34.118
botocore 1.34.118
botorch 0.10.0
Bottleneck 1.3.8
cachetools 5.3.3
captum 0.7.0
catalogue 2.0.10
catboost 1.2.3
category-encoders 2.6.3
causal-conv1d 1.2.0.post2
certipy 0.1.3
chardet 5.2.0
check-shapes 1.1.1
clarabel 0.9.0
click 8.1.7
clikit 0.6.2
cloudpathlib 0.16.0
cloudpickle 3.0.0
clr-loader 0.1.6
cmdstanpy 1.2.1
colorama 0.4.6
colorcet 3.1.0
coloredlogs 15.0.1
colorful 0.5.6
colorlog 6.8.2
colorlover 0.3.0
colour 0.1.5
comm 0.2.2
confection 0.1.5
cons 0.4.6
cons 0.4.6
contourpy 1.2.0
control 0.9.4
copulae 0.7.9
copulas 0.10.1
coreforecast 0.0.9
cramjam 2.8.3
crashtest 0.3.1
crcmod 1.7
creme 0.6.1
cufflinks 0.17.3
cvxopt 1.3.2
cvxpy 1.4.2
cycler 0.12.1
cymem 2.0.8
Cython 3.0.9
darts 0.28.0
dash 2.17.0
dash-core-components 2.0.0
dash-cytoscape 1.0.1
dash-html-components 2.0.0
dash-table 5.0.0
dask 2024.3.1
dask-expr 1.0.5
dataclasses-json 0.6.6
datasets 2.17.1
deap 1.4.1
debugpy 1.8.1
decorator 5.1.1
deepmerge 1.1.1
defusedxml 0.7.1
Deprecated 1.2.14
deprecation 2.1.0
dgl 2.1.0
dill 0.3.8
dimod 0.12.14
dirtyjson 1.0.8
diskcache 5.6.3
distlib 0.3.8
distributed 2024.3.1
dm-tree 0.1.8
docker 7.1.0
docutils 0.20.1
DoubleML 0.7.1
dropstackframe 0.1.0
dtreeviz 2.2.2
dtw-python 1.3.1
dwave-cloud-client 0.11.3
dwave-drivers 0.4.4
dwave-greedy 0.3.0
dwave-hybrid 0.6.11
dwave-inspector 0.4.4
dwave-inspectorapp 0.3.1
dwave-neal 0.6.0
dwave-networkx 0.8.14
dwave-ocean-sdk 6.9.0
dwave-preprocessing 0.6.5
dwave-samplers 1.2.0
dwave-system 1.23.0
dwave-tabu 0.5.0
dwavebinarycsp 0.3.0
ecos 2.0.13
einops 0.7.0
EMD-signal 1.6.0
empyrical-reloaded 0.5.10
en-core-web-md 3.7.1
en-core-web-sm 3.7.1
et-xmlfile 1.1.0
etuples 0.3.9
evaluate 0.4.2
exchange_calendars 4.5.4
executing 2.0.1
faiss-cpu 1.8.0
Farama-Notifications 0.0.4
fastai 2.7.14
fastai2 0.0.30
fastcore 1.5.43
fastdownload 0.0.7
fasteners 0.19
fastjsonschema 2.19.1
fastparquet 2024.2.0
fastprogress 1.0.3
fastprogress 1.0.3
fasttext 0.9.2
feature-engine 1.6.2
featuretools 1.30.0
filelock 3.14.0
findiff 0.10.0
FixedEffectModel 0.0.5
FlagEmbedding 1.2.10
FLAML 2.1.2
Flask 3.0.3
flatbuffers 24.3.25
fonttools 4.53.0
formulaic 1.0.1
fqdn 1.5.1
frozendict 2.4.4
frozenlist 1.4.1
fs 2.4.16
fsspec 2023.10.0
fugue 0.9.0
functime 0.9.5
future 1.0.0
fuzzy-c-means 1.7.2
gast 0.5.4
gdown 5.2.0
gensim 4.3.2
gevent 24.2.1
gitdb 4.0.11
GitPython 3.1.43
gluonts 0.14.3
google-api-core 2.19.0
google-auth 2.29.0
google-pasta 0.2.0
googleapis-common-protos 1.63.1
gpflow 2.9.1
gplearn 0.4.2
gpytorch 1.11
graphene 3.3
graphql-core 3.2.3
graphql-relay 3.2.0
graphviz 0.20.1
grpcio 1.64.1
gunicorn 21.2.0
gym 0.26.2
gym-notices 0.0.8
gymnasium 0.28.1
h11 0.14.0
h2o 3.46.0.1
h5netcdf 1.3.0
h5py 3.11.0
hmmlearn 0.3.2
holidays 0.50
holoviews 1.18.3
homebase 1.0.1
hopcroftkarp 1.2.5
html5lib 1.1
httpcore 1.0.5
httpstan 4.12.0
httpx 0.27.0
huggingface-hub 0.23.2
humanfriendly 10.0
hurst 0.0.5
hvplot 0.9.2
hydra-core 1.3.0
hyperopt 0.2.7
ibm-cloud-sdk-core 3.20.1
ibm-platform-services 0.53.7
iisignature 0.24
ijson 3.2.3
imageio 2.34.1
imbalanced-learn 0.12.0
immutabledict 4.2.0
iniconfig 2.0.0
injector 0.21.0
interface-meta 1.3.0
interpret 0.5.1
interpret-core 0.5.1
ipykernel 6.29.4
ipython 8.25.0
ipywidgets 8.1.2
isoduration 20.11.0
itsdangerous 2.2.0
jax 0.4.25
jax 0.4.25
jax-jumpy 1.0.0
jaxlib 0.4.25
jaxtyping 0.2.29
jedi 0.19.1
jmespath 0.10.0
joblib 1.3.2
json5 0.9.25
jsonpatch 1.33
jsonpath-ng 1.6.1
jsonpointer 2.1
jupyter 1.0.0
jupyter-console 6.6.3
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter-resource-usage 1.0.2
jupyter_ai 2.12.0
jupyter_ai_magics 2.16.0
jupyter_bokeh 4.0.0
jupyter_client 8.6.2
jupyter_core 5.7.2
jupyter_server 2.14.1
jupyter_server_terminals 0.5.3
jupyterlab 4.1.5
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.2
jupyterlab_widgets 3.0.11
kagglehub 0.2.5
kaleido 0.2.1
keras 3.3.3
keras-core 0.1.7
keras-nlp 0.12.1
keras-rl 0.4.2
keras-tcn 3.5.0
keras-tuner 1.4.7
kiwisolver 1.4.5
kmapper 2.0.1
korean-lunar-calendar 0.3.1
kt-legacy 1.0.5
langchain 0.1.12
langchain-community 0.0.38
langchain-core 0.1.52
langchain-text-splitters 0.0.2
langcodes 3.4.0
langsmith 0.1.67
language_data 1.2.0
lark 1.1.9
lazy_loader 0.4
lazypredict-nightly 0.3.0
libclang 18.1.1
lifelines 0.28.0
lightgbm 4.3.0
lightning 2.1.4
lightning-utilities 0.11.2
lime 0.2.0.1
line-profiler 4.1.2
linear-operator 0.5.1
linkify-it-py 2.0.3
livelossplot 0.5.5
llama-index 0.10.19
llama-index-agent-openai 0.1.7
llama-index-cli 0.1.12
llama-index-core 0.10.43
llama-index-embeddings-openai 0.1.10
llama-index-indices-managed-llama-cloud 0.1.6
llama-index-legacy 0.9.48
llama-index-llms-openai 0.1.22
llama-index-multi-modal-llms-openai 0.1.6
llama-index-program-openai 0.1.6
llama-index-question-gen-openai 0.1.3
llama-index-readers-file 0.1.23
llama-index-readers-llama-parse 0.1.4
llama-parse 0.4.4
llamaindex-py-client 0.1.19
llvmlite 0.42.0
locket 1.0.0
logical-unification 0.4.6
lxml 5.1.0
lz4 4.3.3
mamba-ssm 1.2.0.post1
MAPIE 0.8.3
marisa-trie 1.1.1
marisa-trie 1.1.1
Markdown 3.6
markdown-it-py 3.0.0
marshmallow 3.21.2
matplotlib 3.7.5
matplotlib-inline 0.1.7
mdit-py-plugins 0.4.1
mdurl 0.1.2
mgarch 0.3.0
miniKanren 1.0.3
minorminer 0.2.13
mistune 3.0.2
ml-dtypes 0.3.2
mlflow 2.11.1
mlforecast 0.10.0
mljar-supervised 1.1.6
mlxtend 0.23.1
mmh3 2.5.1
model-index 0.1.11
modin 0.26.1
mplfinance 0.12.10b0
mpmath 1.3.0
msgpack 1.0.8
multidict 6.0.5
multipledispatch 1.0.0
multiprocess 0.70.16
multitasking 0.0.11
murmurhash 1.0.10
mypy-extensions 1.0.0
namex 0.0.8
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
ndindex 1.8
nest-asyncio 1.6.0
networkx 3.3
neural-tangents 0.6.5
neuralprophet 0.8.0
nfoursid 1.0.1
ngboost 0.5.1
ninja 1.11.1.1
nlpaug 1.1.11
nltk 3.8.1
nolds 0.5.2
nose 1.3.7
notebook 7.1.3
notebook_shim 0.2.4
nptyping 2.4.1
numba 0.59.0
numerapi 2.18.0
numexpr 2.10.0
numpy 1.26.4
nvidia-cublas-cu12 12.5.2.13
nvidia-cuda-cupti-cu12 12.1.105
nvidia-cuda-nvrtc-cu12 12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12 8.9.2.26
nvidia-cufft-cu12 11.0.2.54
nvidia-curand-cu12 10.3.2.106
nvidia-cusolver-cu12 11.4.5.107
nvidia-cusparse-cu12 12.1.0.106
nvidia-ml-py3 7.352.0
nvidia-nccl-cu12 2.18.1
nvidia-nvjitlink-cu12 12.5.40
nvidia-nvtx-cu12 12.1.105
omegaconf 2.2.3
onnx 1.16.1
onnxruntime 1.18.0
openai 1.30.4
opencensus 0.11.4
opencensus-context 0.1.3
opencv-contrib-python-headless 4.9.0.80
opencv-python 4.10.0.82
opendatalab 0.0.10
openmim 0.3.9
openpyxl 3.1.2
openxlab 0.1.0
opt-einsum 3.3.0
optimum 1.18.1
optree 0.11.0
optuna 3.5.0
ordered-set 4.1.0
ordered-set 4.1.0
orjson 3.10.3
ortools 9.9.3963
osqp 0.6.7
oss2 2.17.0
overrides 7.7.0
packaging 24.0
pandas 2.1.4
pandas-flavor 0.6.0
pandas-ta 0.3.14b0
pandas_market_calendars 4.4.0
pandocfilters 1.5.1
panel 1.3.8
param 2.1.0
parso 0.8.4
partd 1.4.2
pastel 0.2.1
pathos 0.3.2
patsy 0.5.6
pbr 6.0.0
pdf2image 1.17.0
peewee 3.17.3
peft 0.11.1
penaltymodel 1.1.0
PennyLane 0.35.1
PennyLane-qiskit 0.35.1
PennyLane_Lightning 0.35.1
persim 0.3.5
pexpect 4.9.0
pgmpy 0.1.25
pillow 10.3.0
pingouin 0.5.4
plotly 5.20.0
plotly-resampler 0.10.0
plucky 0.4.3
pluggy 1.5.0
ply 3.11
pmdarima 2.0.4
polars 0.20.15
pomegranate 1.0.4
POT 0.9.3
pox 0.3.4
ppft 1.7.6.8
pprofile 2.1.0
preshed 3.0.9
prompt_toolkit 3.0.45
prophet 1.1.5
proto-plus 1.23.0
protobuf 4.25.3
ptyprocess 0.7.0
PuLP 2.8.0
pure-eval 0.2.2
py-cpuinfo 9.0.0
py-heat 0.0.6
py-heat-magic 0.0.2
py-lets-be-rational 1.0.1
py-spy 0.3.14
py-vollib 1.0.1
py4j 0.10.9.7
pyaml 24.4.0
pyarrow 15.0.1
pyarrow-hotfix 0.6
pyasn1 0.6.0
pyasn1_modules 0.4.0
pybind11 2.12.0
pycaret 3.3.2
pycparser 2.20
pycryptodome 3.20.0
pydantic 2.7.3
pydantic_core 2.18.4
pydmd 1.0.0
pyerfa 2.0.1.4
pyfolio-reloaded 0.9.5
Pygments 2.18.0
pykalman 0.9.7
pylev 1.4.0
pyluach 2.2.0
pymannkendall 1.4.3
pymc 5.10.4
pymdptoolbox 4.0b3
pynndescent 0.5.12
pyod 2.0.0
pyod 2.0.0
Pyomo 6.7.1
pyparsing 3.1.2
pypdf 4.2.0
pyportfolioopt 1.5.5
pyre-extensions 0.0.30
pyro-api 0.1.2
pyro-ppl 1.9.0
pysimdjson 5.0.2
pyspnego 0.10.2
pystan 3.9.0
pytensor 2.18.6
pytesseract 0.3.10
pytest 8.2.1
python-dotenv 1.0.0
python-statemachine 2.1.2
pytorch-ignite 0.4.13
pytorch-lightning 2.1.4
pytorch-metric-learning 2.3.0
pytorch-tabnet 4.1.0
pytz 2023.4
pyvinecopulib 0.6.5
pyviz_comms 3.0.2
PyWavelets 1.5.0
PyYAML 6.0.1
pyzmq 26.0.3
qdldl 0.1.7.post2
qiskit 1.0.2
qiskit-aer 0.14.2
qiskit-ibm-provider 0.11.0
qiskit-ibm-runtime 0.20.0
qtconsole 5.5.2
QtPy 2.4.1
quadprog 0.1.12
quantconnect-stubs 16467
quantecon 0.7.2
QuantLib 1.33
QuantStats 0.0.62
querystring-parser 1.2.4
rauth 0.7.3
ray 2.10.0
Rbeast 0.1.19
rectangle-packer 2.0.2
regex 2024.5.15
requests 2.28.2
requests-ntlm 1.2.0
requests-oauthlib 1.3.1
retrying 1.3.4
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.4.2
ripser 0.6.8
Riskfolio-Lib 6.0.0
riskparityportfolio 0.5.1
river 0.21.0
rsa 4.9
ruptures 1.1.9
rustworkx 0.14.2
s3transfer 0.10.1
safetensors 0.4.3
SALib 1.5.0
schemdraw 0.15
scikeras 0.13.0
scikit-base 0.7.8
scikit-image 0.20.0
scikit-learn 1.4.0
scikit-learn-extra 0.3.0
scikit-optimize 0.10.0
scikit-plot 0.3.7
scikit-tda 1.0.0
scipy 1.11.4
scs 3.2.4.post2
sdeint 0.3.0
seaborn 0.13.2
semantic-version 2.10.0
Send2Trash 1.8.3
sentence-transformers 3.0.0
sentencepiece 0.2.0
seqeval 1.2.2
setuptools-scm 8.1.0
shap 0.45.0
Shimmy 1.3.0
Shimmy 1.3.0
simplejson 3.19.2
simpy 4.1.1
sklearn-json 0.1.0
sktime 0.26.0
slicer 0.0.7
smart-open 6.4.0
smmap 5.0.1
sniffio 1.3.1
sortedcontainers 2.4.0
soupsieve 2.5
spacy 3.7.4
spacy-legacy 3.0.12
spacy-loggers 1.0.5
sqlparse 0.5.0
srsly 2.4.8
stable_baselines3 2.3.2
stack-data 0.6.3
stanio 0.3.0
statsforecast 1.4.0
statsmodels 0.14.1
stevedore 5.2.0
stochastic 0.6.0
stockstats 0.6.2
stopit 1.1.2
striprtf 0.0.26
stumpy 1.12.0
symengine 0.11.0
sympy 1.12.1
ta 0.11.0
TA-Lib 0.4.28
tables 3.9.2
tabulate 0.8.10
tadasets 0.2.1
tbats 1.1.3
tblib 3.0.0
tenacity 8.3.0
tensorboard 2.16.2
tensorboard-data-server 0.7.2
tensorboardX 2.6.2.2
tensorflow 2.16.1
tensorflow-addons 0.23.0
tensorflow-io-gcs-filesystem 0.37.0
tensorflow-probability 0.24.0
tensorflow-text 2.16.1
tensorflow_decision_forests 1.9.0
tensorly 0.8.1
tensorrt 8.6.1.post1
tensorrt-bindings 8.6.1
tensorrt-libs 8.6.1
tensortrade 1.0.3
termcolor 2.4.0
terminado 0.18.1
text-unidecode 1.3
tf2jax 0.3.6
tf_keras 2.16.0
thinc 8.2.3
threadpoolctl 3.5.0
thundergbm 0.3.17
tifffile 2024.5.22
tiktoken 0.7.0
timm 0.9.16
tinycss2 1.3.0
tokenizers 0.15.2
toml 0.10.2
toolz 0.12.1
torch 2.1.2
torch-cluster 1.6.3
torch-scatter 2.1.2
torch-sparse 0.6.18
torch-spline-conv 1.2.2
torch_geometric 2.5.1
torchdata 0.7.1
torchmetrics 1.2.1
torchvision 0.16.2
TPOT 0.12.2
tqdm 4.65.2
transformers 4.38.2
triad 0.9.6
triton 2.1.0
tsdownsample 0.1.3
tsfresh 0.20.2
tsfresh 0.20.2
tslearn 0.6.3
tweepy 4.14.0
typeguard 2.13.3
typer 0.9.4
typer-config 1.4.0
types-python-dateutil 2.9.0.20240316
typing-inspect 0.9.0
tzdata 2024.1
uc-micro-py 1.0.3
umap-learn 0.5.5
update-checker 0.18.0
uri-template 1.3.0
urllib3 1.26.18
utilsforecast 0.0.10
virtualenv 20.26.2
wasabi 1.1.3
wcwidth 0.2.13
weasel 0.3.4
webargs 8.4.0
webcolors 1.13
webencodings 0.5.1
websocket-client 1.8.0
websockets 12.0
Werkzeug 3.0.1
widgetsnbextension 4.0.11
window_ops 0.0.15
woodwork 0.31.0
wordcloud 1.9.3
wrapt 1.16.0
wurlitzer 3.1.0
x-transformers 1.30.4
xarray 2024.2.0
xarray-einstats 0.7.0
xgboost 2.0.3
xlrd 2.0.1
XlsxWriter 3.2.0
xxhash 3.4.1
xyzservices 2024.4.0
yarl 1.9.4
yellowbrick 1.5
yfinance 0.2.40
zict 3.0.0
zope.event 5.0
zope.interface 6.4.post2
To request a new library, contact us . We will add the library to the queue for review and deployment. Since the libraries run on
our servers, we need to ensure they are secure and won't cause harm. The process of adding new libraries takes 2-4 weeks to
complete. View the list of libraries currently under review on the Issues list of the Lean GitHub repository .
Projects > LEAN Engine Versions
Projects
LEAN Engine Versions
Introduction
The latest master branch on the LEAN GitHub repository is the default engine branch that runs the backtesting, research, and
live trading nodes in QuantConnect Cloud. The latest version of LEAN is generally the safest as it includes all bug fixes.
Trading Firm or Institution tier users concerned for stability can elect to use older or custom versions of LEAN in the IDE. These
are powered by the QuantConnect/LEAN Github Branches . We use a continuous deployment process to ship custom branches
to production for trading. To create a custom version of LEAN, make a pull request to LEAN which will be reviewed by our team.
Change Branches
Follow these steps to change the LEAN engine branch that runs your backtests and live trading algorithms:
1. Open a project .
2. In the Project panel, click the LEAN Engine field and then click a branch from the drop-down menu.
4. If you want to always use the master branch, select the Always use Master Branch check box.
5. Click Select .
Changing the Lean engine branch only affects the current project. If you create a new project , the new project will use the
Before starting a pull-request to create a new branch, contact us to discuss the goals of the project.
Research
Research
The Research Environment is a Jupyter notebook -based environment where you can access our data through the QuantBook
class instead of through the QCAlgorithm class in a backtest. The environment supports both Python and C#. If you use Python,
you can import code from the code files in your project into the Research Environment to aid development.
Getting Started
Deployment
Spin up a notebook
See Also
Research
Getting Started
Introduction
The Research Environment is a Jupyter notebook -based, interactive commandline environment where you can access our data
through the QuantBook class. The environment supports both Python and C#. If you use Python, you can import code from the
code files in your project into the Research Environment to aid development.
Before you run backtests, we recommend testing your hypothesis in the Research Environment. It's easier to perform data
analysis and produce plots in the Research Environment than in a backtest. The Research Environment also supports debugging
Before backtesting or live trading with machine learning models, you may find it beneficial to train them in the Research
Environment, save them in the Object Store, and then load them from the Object Store into the backtesting and live trading
environment
In the Research Environment, you can also use the QuantConnect API to import your backtest results for further analysis.
Note: This chapter is an introduction to the Research Environment for the Algorithm Lab. For more comprehensive information
Example
The following snippet demonstrates how to use the Research Environment to plot the price and Bollinger Bands of the S&P 500
PY
# Create a QuantBook
qb = QuantBook()
# Add an asset.
symbol = qb.add_equity("SPY").symbol
Open Notebooks
Each new project you create contains a notebook file by default. Follow these steps to open the notebook:
When you open a notebook, it automatically tries to connect to the correct Jupyter server and select the correct kernel, which
can take up to one minute. If the top-right corner of the notebook displays a base (Python x.x.x) button, wait for the button to
change to Foundation-Py-Default before you run the cells. If you run cells before the notebook connects to the server and
The following describes some helpful keyboard shortcuts to speed up your research:
There is a 15 minute timeout period before the cells becomes unresponsive. If this occurs, restart the notebook to be able to run
cells again.
Stop Nodes
You need stop node permissions to stop research nodes in the cloud.
3. Click the stop button next to the research node you want to stop.
Add Notebooks
6. Press Enter .
Rename Notebooks
3. In the Explorer panel, right-click the notebook you want to rename and then click Rename .
Delete Notebooks
3. In the Explorer panel, right-click the notebook you want to delete and then click Delete Permanently .
4. Click Delete .
Learn Jupyter
Research
Deployment
Introduction
This page is an introduction to the Research Environment for the Algorithm Lab. For more comprehensive information on using
Resources
Research nodes enable you to spin up an interactive, command-line, Jupyter Research Environment . Several models of
research nodes are available. More powerful research nodes allow you to handle more data and run faster computations in your
notebooks. The following table shows the specifications of the research node models:
Processing Speed
Name Number of Cores RAM (GB) GPU
(GHz)
R1-4 1 2.4 4 0
R2-8 2 2.4 8 0
R4-12 4 2.4 12 0
R4-16-GPU 4 3 16 1/3
R8-16 8 2.4 16 0
Refer to the Pricing page to see the price of each research node model. You get one free R1-4 research node in your first
organization, but the node is replaced when you subscribe to a paid research node in the organization.
To view the status of all of your organization's nodes, see the Resources panel of the IDE. When you launch the Research
Environment, it uses the best-performing resource by default, but you can select a specific resource to use .
The CPU nodes are available on a fair usage basis. The GPU nodes can be shared with a maximum of three members. Depending
on the server load, you may use all of the GPU's processing power.
Sharing
The Research Environment does not currently support simultaneous coding between two peers. You can view the notebook of
your colleague as they edit it, but you can't both edit the notebook at the same time. To enable your team members to see your
Sharing your notebooks is helpful when publishing your findings online, getting feedback on your research process, and
explaining your methodology to others. To share a notebook with members not in your organization, run a backtest , generate a
link to share the backtest , and then give the backtest link to the other person. They will be able to clone the project and launch
Historical Data
On our platform, you can access historical data for all of the asset classes that we support. We have datasets for Equities,
Options, Futures, Crypto, Forex, CFD, Indices, and alternative data. View the Dataset Market to see all of the datasets that we
Look-Ahead Bias
Look-ahead bias occurs when an algorithm makes decisions using data that would not have yet been available. As you work in
the Research Environment, take measures to reduce look-ahead bias in your workflow. If look-ahead bias seeps into your
research, you may find profitable results on historical data, however, you will not be able to apply your findings in a live trading
An example of look-ahead bias is using the closing price to make trading decisions and filling your orders at the same closing
price. This can happen in the Research Environment because all of the data is available at the same time. This type of look-
ahead bias cannot occur when backtesting with Lean because the data is fed into your algorithm in discrete slices of time and an
order is filled using a slice that occurs after the order was placed.
A second example of look-ahead bias occurs when researchers test a model on the same dataset that was used to train the
model. In this situation, the model is trained using data that would not have been available when the model was created in
practice. A third example of look-ahead bias is when researchers select a universe to apply their trading strategy to based on
Backtesting
Backtesting is the process of simulating a trading algorithm on historical data. By running a backtest, you can measure how the
algorithm would have performed in the past. Although past performance doesn't guarantee future results, an algorithm that has
a proven track record can provide investors with more confidence when deploying to live trading than an algorithm that hasn't
performed favorably in the past. Use the QuantConnect platform to run your backtests because we have institutional-grade
datasets, an open-source backtesting engine that's constantly being improved, cloud servers to execute the backtests, and the
Getting Started
Research Guide
Backtesting 101
Deployment
Results
Debugging
Report
Engine Performance
See Also
Writing Algorithms
Optimization
Resources
Backtesting > Getting Started
Backtesting
Getting Started
Introduction
Backtesting is the process of simulating a trading algorithm on historical data. By running a backtest, you can measure how the
algorithm would have performed in the past. Although past performance doesn't guarantee future results, an algorithm that has
a proven track record can provide investors with more confidence when deploying to live trading than an algorithm that hasn't
performed favorably in the past. Use the QuantConnect platform to run your backtests because we have institutional-grade
datasets, an open-source backtesting engine that's constantly being improved, cloud servers to execute the backtests, and the
Run Backtests
To run a backtest, open a project and then click the Backtest icon. If the project successfully builds, "Received backtest
backtestName request" displays. If the backtest successfully launches, the IDE displays the backtest results page in a new tab.
If the backtest fails to launch due to coding errors, the new tab displays the error. As the backtest executes, you can refresh or
close the IDE without interfering with the backtest because it runs on our cloud servers. The backtest runs up to the start of the
1. Open the project that contains the backtests you want to view.
2. In the top-right corner of the IDE, click the Backtest Results icon.
A table containing all of the backtest results for the project is displayed. If there is a play icon to the left of the name, it's a
backtest result . If there is a fast-forward icon next to the name, it's an optimization result .
3. (Optional) In the top-right corner, select the Show field and then select one of the options from the drop-down menu to
4. (Optional) In the bottom-right corner, click the Hide Error check box to remove backtest and optimization results from the
table that had a runtime error.
5. (Optional) Use the pagination tools at the bottom to change the page.
7. Click a row in the table to open the results page of that backtest or optimization.
Rename Backtests
We give an arbitrary name (for example, "Smooth Apricot Chicken") to your backtest result files, but you can follow these steps
to rename them:
2. Hover over the backtest you want to rename and then click the pencil icon that appears.
PY
self.set_name("Backtest Name")
On-Premise Backtests
For information about on-premise backtests with Local Platform , see Getting Started .
Get Backtest Id
To get the backtest Id, see the first line of the log file . An example backtest Id is 8b16cec0c44f75188d82f9eadb310e17.
Share Backtests
The backtest results page enables you to share your backtest results. You need to make a backtest public in order to share it. To
make a backtest public, on the backtest results page, click the Share tab and then click Make Public . Once you make a backtest
public, the Share tab displays a link to the backtest report , a link to an embedded backtest result, and a script to embed the
To attach the embedded backtest result to a forum discussion, see Create Discussions or Post Comments .
After you've made your backtest results public, the results are always stored, anyone with the link can access the results, and
the results can't be made private again because someone may have already cloned your project.
Backtesting > Research Guide
Backtesting
Research Guide
Introduction
QuantConnect aims to teach and inspire our community to create high-performing algorithmic trading strategies. We measure
our success by the profits created by the community through their live trading. As such, we try to build the best quantitative
research techniques possible into the product to encourage a robust research process.
Hypothesis-Driven Research
We recommend you develop an algorithmic trading strategy based on a central hypothesis. You should develop an algorithm
hypothesis at the start of your research and spend the remaining time exploring how to test your theory. If you find yourself
deviating from your core theory or introducing code that isn't based around that hypothesis, you should stop and go back to
thesis development.
Wang et al. (2014) illustrate the danger of creating your hypothesis based on test results. In their research, they examined the
earnings yield factor in the technology sector over time. During 1998-1999, before the tech bubble burst, the factor was
unprofitable. If you saw the results and then decided to bet against the factor during 2000-2002, you would have lost a lot of
money because the factor performed extremely well during that time.
Hypothesis development is somewhat of an art and requires creativity and great observation skills. It is one of the most powerful
skills a quant can learn. We recommend that an algorithm hypothesis follow the pattern of cause and effect. Your aim should be
To search for inspiration, consider causes from your own experience, intuition, or the media. Generally, causes of financial
Human psychology
Real-world events/fundamentals
Share class stocks are the same company, so any A perfect pairs trade. Since they are the same
price divergence is irrational... company, the price will revert.
New stock addition to the S&P500 Index causes fund An increase in the price of the new asset in the
managers to buy up stock... universe from buying pressure.
Increase in sunshine-hours increases the production An increase in the supply of oranges, decreasing
of oranges... the price of Orange Juice Futures.
Allegations of fraud by the CEO causes investor faith A collapse of stock prices for the company as
in the stock to fall... people panic.
Increasing federal interest rates restrict lending from Restricted REIT leverage and lower REIT ETF
banks, raising interest rates... returns.
There are millions of potential alpha strategies to explore, each of them a candidate for an algorithm. Once you have chosen a
strategy, we recommend exploring it for no more than 8-32 hours, depending on your coding ability.
Research Panel
We launched the Research Guide in 2019 to inform you about common quantitative
research pitfalls. It displays a power gauge for the number of backtests performed, the
number of parameters used, and the time invested in the strategy. These measures can
give a ballpark estimate of the overfitting risk of the project. Generally, as a strategy
becomes more overfit on historical data, it is less likely to perform well in live trading.
These properties were selected based on the recommended best practices of the global
Restricting Backtests
According to current research, the number of backtests performed on an idea should be limited to prevent overfitting. In
theory, each backtest performed on an idea moves it one step closer to being overfitted as you are testing and selecting
for strategies written into your code instead of being based on a central thesis. For more information, see the paper Probability
of Backtest Overfitting (Bailey, Borwein, Jim Zho, & López de Prado, 2015).
QuantConnect does not restrict the number of backtests performed on a project, but we have implemented the counter as a
guide for your reference. Your coding skills are a factor in how many backtests constitute overfitting, so if you are a new
0-30: Likely Not Overfit 30-70: Possibly Overfitting 70+ Probably Overfitting
With just a handful of parameters, it is possible to create an algorithm that perfectly models historical markets. Current
research suggests keeping your parameter count to a minimum to decrease the risk of overfitting.
Parameter Overfit Reference
0-10: Likely Not Overfit 10-20: Possibly Overfitting 20+ Probably Overfitting
As you spend more time on one algorithm, research suggests you are more likely to be overfitting the strategy to the
data. It is common to become attached to an idea and spend weeks or months to perform well in a backtest. Assuming
you are a proficient coder who fully understands the QuantConnect API, we recommend no more than 16 hours of work per
experiment. In theory, within two full working days, you should be able to test a single hypothesis thoroughly.
0-8 Hours: Likely Not Overfit 8-16 Hours: Possibly Overfitting 16 Hours+ Probably Overfitting
Parameter Detection
Using parameters is almost unavoidable, but a strategy trends toward being overfitted as more parameters get added or fine-
tuned. Adding or optimizing parameters should only be done by a robust methodology such as walk-forward optimization . The
parameter detection system is a general guide to inform you of how many parameters are present in the algorithm. It looks for
criteria to warn that code is potentially a parameter. The following table shows the criteria for parameters:
Numeric Comparison Numeric operators used to compare numeric arguments: <= < > >=
Scheduled Event Inputting numeric arguments when scheduling an algorithm event to occur
Lean API Numeric arguments passed to Indicators, Consolidators, Rolling Windows, etc.
The following table shows common expressions that are not parameters:
String Numbers Numbers formatted as part of log method or debug method statements
Variable Names Any variable names that use numbers as part of the name (for example, smaIndicator200 )
Common Functions Rounding, array indexing, boolean comparison using 1/0 for True/False, etc.
Overfitting
Overfitting occurs when you fine-tune the parameters of an algorithm to fit the detail and noise of backtesting data to the extent
that it negatively impacts the performance of the algorithm on new data. The problem is that the parameters don't necessarily
apply to new data and thus negatively impact the algorithm's ability to generalize and trade well in all market conditions. The
following table shows ways that overfitting can manifest itself:
Performing many statistical tests on data and only paying attention to those that come back
Data Dredging
with significant results.
Manually changing algorithm parameters to produce better results without altering the test
Hyper-Tuning Parameters
data.
Regression, machine learning, or other statistical models with too many variables will likely
Overfit Regression Models
introduce overfitting to an algorithm.
Not changing the backtesting data set when testing the algorithm. Any improvements might
Stale Testing Data
not be able to be generalized to different datasets.
An algorithm that is dynamic and generalizes to new data is more valuable to funds and individual investors. It is more likely to
survive across different market conditions and apply to new asset classes and markets.
To reduce the chance of overfitting, organization managers can enforce all backtests must end a certain number of months
before the current date. For example, if you set a one year out-of-sample period, the researchers on your team will not be able
to use the most recent year of data in their backtests. A out-of-sample period is helpful because it leaves you a period to test
your model after your done the development stage. Follow these steps to change the backtest out-of-sample period:
Backtesting
Deployment
Introduction
Deploy a backtest to simulate your trading algorithm on our cloud servers. Since the same Lean engine is used to run backtests
and live trading algorithms, it's easy to transition from backtesting to live trading once you are satisfied with the historical
performance of your algorithm. If you find any issues with Lean, the historical data, or the website when running backtests, we'll
resolve the issue.
Nodes
Backtesting nodes enable you to run backtests. The more backtesting nodes your organization has, the more concurrent
backtests that you can run. Several models of backtesting nodes are available. Backtesting nodes that are more powerful can
run faster backtests and backtest nodes with more RAM can handle more memory-intensive operations like training machine
learning models, processing Options data, and managing large universes. The following table shows the specifications of the
Processing Speed
Name Number of Cores RAM (GB) GPU
(GHz)
B-MICRO 2 3 8 0
B2-8 2 4.9 8 0
B4-12 4 4.9 12 0
B4-16-GPU 4 3 16 1/3
B8-16 8 4.9 16 0
Refer to the Pricing page to see the price of each backtesting node model. You get one free B-MICRO backtesting node in your
first organization. This node incurs a 20-second delay when you launch backtests, but the delay is removed and the node is
replaced when upgrade your organization to a paid tier and add a new backtesting node .
To view the status of all of your organization's nodes, see the Resources panel of the IDE. When you run a backtest, it uses the
best-performing resource by default, but you can select a specific resource to use .
The CPU nodes are available on a fair usage basis while the GPU nodes can be shared with a maximum of three members.
Depending on the server load, you may use all of the GPU's processing power. GPU nodes perform best on repetitive and
highly-parallel tasks like training machine learning models. It takes time to transfer the data to the GPU for computation, so if
your algorithm doesn't train machine learning models, the extra time it takes to transfer the data can make it appear that GPU
Concurrent Backtesting
Concurrent backtesting is the process of running multiple backtests at the same time within a single organization. Concurrent
backtesting speeds up your strategy development because you don't have to wait while a single backtest finishes executing.
You need multiple backtesting nodes in your organization to run concurrent backtests. The more backtesting nodes that your
organization has, the more concurrent backtests you can execute. If you are trying to fine-tune your parameters , consider
running a parameter optimization . If you run a parameter optimization job, you can run multiple backtests concurrently without
The number of backtesting nodes that you can have in your organization depends on the tier of your organization. The following
Free 1
Quant Researcher 2
Team 10
Institution Unlimited
Logs
The amount of logs you can generate per backtest and per day depends on the tier of your organization. The following table
To check the log storage space you have remaining, log in to the Algorithm Lab and then, in the left navigation bar, click
Orders
The number of orders you can place in a single backtest depends on the tier of your organization. The following table shows the
Free 10K
Team Unlimited
Institution Unlimited
Security
Your code is stored in a database, isolated from the internet. When the code leaves the database, it is compiled and obfuscated
before being deployed to the cloud. If the cloud servers were compromised, this process makes it difficult to read your strategy.
As we've seen over recent years, there can never be any guarantee of security with online websites. However, we deploy all
modern and common security procedures. We deploy nightly software updates to keep the server up to date with the latest
security patches. We also use SSH key login to avoid reliance on passwords. Internally, we use processes to ensure only a
handful of people have access to the database and we always restrict logins to never use root credentials.
Build Projects
If the compiler finds errors during the build process, the IDE highlights the lines of code that caused the errors in red. Your
projects will automatically build after each keystroke. To manually build a project, open the project and then click the Build
icon. If the build process is unresponsive, try refreshing the page and building again. If the build process continues to be
unresponsive, check our Status page or contact us .
Run Backtests
To run a backtest, open a project and then click the Backtest icon. If the project successfully builds, "Received backtest
backtestName request" displays. If the backtest successfully launches, the IDE displays the backtest results page in a new tab.
If the backtest fails to launch due to coding errors, the new tab displays the error. As the backtest executes, you can refresh or
close the IDE without interfering with the backtest because it runs on our cloud servers. The backtest runs up to the start of the
Stop Backtests
To stop a running backtest, open the Resources panel , and then click the stop icon next to the backtest node. You can stop
nodes that you are using, but you need stop node permissions to stop nodes other members are using.
Runtime Quota
The maximum amount of time a backtest can run for is 12 hours. The runtime depends on the amount of data, the algorithm
Backtesting
Results
Introduction
The backtest results page shows your algorithm's performance. Review the results page to see how your algorithm has
performed during the backtest and to investigate how you might improve your algorithm before live trading.
The backtest results page automatically displays when you deploy a backtest . The backtest results page presents the equity
The content in the backtest results page updates as your backtest executes. You can close or refresh the window without
interrupting the backtest because the backtesting node processes on our servers. If you close the page, to open the page again,
view all of the project's backtests . Unless you explicitly make the backtest public, only you can view its results. If you delete a
backtest result or you are inactive for 12 months, we archive your backtest results.
Runtime Statistics
The banner at the top of the backtest results page displays the runtime statistics of your backtest.
Equity The total portfolio value if all of the holdings were sold at current market rates.
Fees The total quantity of fees paid for all the transactions.
Net Profit The dollar-value return across the entire trading period.
The probability that the estimated Sharpe ratio of an algorithm is greater than a benchmark
PSR
(1).
The amount of profit a portfolio would capture if it liquidated all open positions and paid the
Unrealized
fees for transacting and crossing the spread.
Volume The total value of assets traded for all of an algorithm's transactions.
Built-in Charts
The backtest results page displays a set of built-in charts to help you analyze the performance of your algorithm. The following
Chart Description
Assets Sales Volume A chart showing the proportion of total volume for each traded security.
A stacked area chart of the portfolio margin usage. For more information about this chart,
Portfolio Margin
see Portfolio Margin Plots .
A time series of an asset's price with order event annotations. These charts are available for
Asset Plot
all paid organziation tiers. For more information about these charts, see Asset Plots .
Asset Plots
Asset plots display the trade prices of an asset and the following order events you have for the asset:
Order Event Icon
View Plots
3. Click the Asset Plot icon that's next to the asset Symbol in the Orders table.
Tool Tips
When you hover over one of the order events in the table, the asset plot highlights the order event, displays the asset price at
the time of the event, and displays the tag associated with the event. Consider adding helpful tags to each order event to help
with debugging your algorithm. For example, when you cancel an order, you can add a tag that explains the reason for
cancelling it.
The resolution of the asset price time series in the plot doesn't necessarily match the resolution you set when you subscribed to
the asset in your algorithm. If you are displaying the entire price series, the series usually displays the daily closing price.
However, when you zoom in, the chart will adjust its display period and may use higher resolution data. To zoom in and out,
Click a point on the chart and drag your mouse horizontally to highlight a specific period of time in the chart.
If you have multiple order events in a single day and you zoom out on the chart so that it displays the daily closing prices, the
plot aggregates the order event icons together as the price on that day.
The plot displays fill order events at the actual fill price of your orders. The fill price is usually not equal to the asset price that
If you use quote data, your order fills at the bid or ask price.
The fill model may fill your order at the high or low price.
Custom Charts
The results page shows the custom charts that you create.
If you use SeriesType.Candle and plot enough values, the plot displays candlesticks. However, the plot method only accepts
one numerical value per time step, so you can't plot candles that represent the open, high, low, and close values of each bar in
your algorithm. The charting software automatically groups the data points you provide to create the candlesticks, so you can't
To create other types of charts, save the plot data in the Object Store and then load it into the Research Environment. In the
Research Environment, you can create other types of charts with third-party charting packages .
Supported Markers
When you create scatter plots, you can set a marker symbol. We support the following marker symbols:
Chart Quotas
Intensive charting requires hundreds of megabytes of data, which is too much to stream online or display in a web browser. The
number of series and the number of data points per series you can plot depends on your organization tier . The following table
Free 10 4,000
Team 25 16,000
If you exceed the series quota, your algorithm stops executing and the following message displays:
Exceeded maximum chart series count, new series will be ignored. Limit is currently set at <quota>.
If you exceed the data points per series quota, the following message displays:
If your plotting needs exceed the preceding quotas, create the plots in the Research Environment instead .
Demonstration
Adjust Charts
You can manipulate the charts displayed on the backtest results page.
Toggle Charts
To display and hide a chart on the backtest results page, in the Select Chart section, click the name of a chart.
To zoom in and out of a time series chart on the backtest results page, perform either of the following actions:
Click a point on the chart and drag your mouse horizontally to highlight a specific period of time in the chart.
After you zoom in on a chart, slide the horizontal bar at the bottom of the chart to adjust the time frame that displays.
Resize Charts
To resize a chart on the backtest results page, hover over the bottom-right corner of the chart. When the resize cursor appears,
hold the left mouse button and then drag to the desired size.
Move Charts
To move a chart on the backtest results page, click, hold, and drag the chart title.
Refresh Charts
Refreshing the charts on the backtest results page resets the zoom level on all the charts. If you refresh the charts while your
algorithm is executing, only the data that was seen by the Lean engine after you refreshed the charts is displayed. To refresh
the charts, in the Select Chart section, click the reset icon.
Key Statistics
The backtest results page displays many key statistics to help you analyze the performance of your algorithm.
Overall Statistics
The Overview tab on the backtest results page displays tables for Overall Statistics and Rolling Statistics. The Overall Statistics
Total Trades
Average Loss
Drawdown
Net Profit
Loss Rate
Profit-Loss Ratio
Beta
Annual Variance
Tracking Error
Total Fees
Average Win
Expectancy
Win Rate
Alpha
Information Ratio
Treynor Ratio
Some of the preceding statistics are sampled throughout the backtest to produce a time series of rolling statistics. The time
To download the data from the Overall Statistics and Rolling Statistics tables, see Download Results .
Ranking
The backtest results page displays a Ranking section that shows the PSR and rank (percentile) of your algorithm.
( )
PSR algo − PSR
σPSR
CDF
¯
where CDF is the normal cumulative distribution function and PSR algo is your algorithm's PSR. PSR and σPSR are the mean PSR
and the standard deviation of PSR values, respectively, calculated from all of the backtests that have the following attributes:
Research Guide
Reports
Backtest reports provide a summary of your algorithm's performance during the backtest period. Follow these steps to generate
one:
1. Open the backtest results page for which you want to generate a report.
2. Click the Report tab.
3. If the project doesn't have a description, enter one and then click Save .
5. If the IDE says that the report is being generated, repeat step 4.
Orders
The backtest results page displays the orders of your algorithm and you can download them to your local machine.
To see the orders that your algorithm created, open the backtest results page and then click the Orders tab. If there are more
than 10 orders, use the pagination tools at the bottom of the Orders Summary table to see all of the orders. Click on an individual
order in the Orders Summary table to reveal all of the order events , which include:
Submissions
Fills
Partial fills
Updates
Cancellations
The timestamps in the Order Summary table are based in Eastern Time (ET).
To view the orders data in CSV format, open the backtest results page, click the Orders tab, and then click Download Orders .
The content of the CSV file is the content displayed in the Orders Summary table when the table rows are collapsed. The
timestamps in the CSV file are based in Coordinated Universal Time (UTC).
To view all of the content in the Orders Summary table, see Download Results .
To programmatically analyze orders, call the read_backtest_orders method or the /backtests/orders/read endpoint.
Insights
The backtest results page displays the insights of your algorithm and you can download them to your local machine.
To see the insights your algorithm emit, open the backtest result page and then click the Insights tab. If there are more than 10
insights, use the pagination tools at the bottom of the Insights Summary table to see all of the insights. The timestamps in the
Insights Summary table are based in Eastern Time (ET).
Download JSON
To view the insights in JSON format, open the backtest result page, click the Insights tab, and then click Download Insights . The
timestamps in the CSV file are based in Coordinated Universal Time (UTC).
Logs
The backtest results page displays the logs of your backtest and you can download them to your local machine. The timestamps
of the statements in the log file are based in your algorithm time zone .
To see the log file that was created throughout a backtest, open the backtest result page and then click the Logs tab.
To filter the logs, enter a search string in the Filter logs field.
To download the log file that was created throughout a backtest, follow these steps:
Project Files
The backtest results page displays the project files used to run the backtest. To view the files, click the Code tab. By default, the
main.py file displays. To view other files in the project, click the file name and then select a different file from the drop-down
menu.
Share Results
The backtest results page enables you to share your backtest results. You need to make a backtest public in order to share it. To
make a backtest public, on the backtest results page, click the Share tab and then click Make Public . Once you make a backtest
public, the Share tab displays a link to the backtest report , a link to an embedded backtest result, and a script to embed the
To attach the embedded backtest result to a forum discussion, see Create Discussions or Post Comments .
After you've made your backtest results public, the results are always stored, anyone with the link can access the results, and
the results can't be made private again because someone may have already cloned your project.
Download Results
You can download the following information from the backtest results page:
Runtime statistics
Charts
To download the preceding information, open the backtest results page, click the Overview tab, and then click Download
Results . The timestamps in the file are based in Coordinated Universal Time (UTC).
1. Open the project that contains the backtests you want to view.
2. In the top-right corner of the IDE, click the Backtest Results icon.
A table containing all of the backtest results for the project is displayed. If there is a play icon to the left of the name, it's a
backtest result . If there is a fast-forward icon next to the name, it's an optimization result .
3. (Optional) In the top-right corner, select the Show field and then select one of the options from the drop-down menu to
filter the table by backtest or optimization results.
4. (Optional) In the bottom-right corner, click the Hide Error check box to remove backtest and optimization results from the
5. (Optional) Use the pagination tools at the bottom to change the page.
7. Click a row in the table to open the results page of that backtest or optimization.
Rename Backtests
We give an arbitrary name (for example, "Smooth Apricot Chicken") to your backtest result files, but you can follow these steps
to rename them:
1. Hover over the backtest you want to rename and then click the pencil icon that appears.
PY
self.set_name("Backtest Name")
Clone Backtests
Hover over the backtest you want to clone, and then click the clone icon that appears to clone the backtest.
Hover over the backtest you want to delete, and then click the trash can icon that appears to delete the backtest.
To reduce the chance of overfitting, organization managers can enforce all backtests must end a certain number of months
before the current date. For example, if you set a one year out-of-sample period, the researchers on your team will not be able
to use the most recent year of data in their backtests. A out-of-sample period is helpful because it leaves you a period to test
your model after your done the development stage. Follow these steps to change the backtest out-of-sample period:
Errors
If a backtest produces more than 700 MB of data, then LEAN can't upload the results and the backtest results page appears
empty.
Backtesting > Results > Portfolio Margin Plots
Results
Portfolio Margin Plots
Introduction
The portfolio margin chart is a stacked area chart where each color represents the proportion of your available margin that a
Margin plots can appear counter intuitive and hard to understand. To simplify things, this chart only draws the top 5-10 holdings
at a given point in time. It group the smaller holdings into an area called "Others".
Sample Frequency
In backtests, the chart areas are sampled once a day to produce the plot, so intraday margin usage isn't visible.
Cash vs Margin
When you trade with a margin account, orders consume your cash before borrowing anything on margin. This order of
This algorithm produces the following portfolio margin plot. When the initial trades fill, the orders consume available cash before
borrowing anything available from the margin. Consuming available cash first avoids interest charges on the margin-loan and
avoids margin calls during market downturns. This results in a relatively steady line hovering on 50% as there is no free cash to
trades. The following portfolio margin plot shows the results. This version only consumes 16% of the available margin for each
security, leaving a substantial amount of cash free. As the portfolio value grows, the fraction of the margin that this cash
represents shrinks, showing an upward trending plot as the holdings of AAPL grow in value.
Examples
The following examples provide insight into portfolio margin calculations and show the functionality of the portfolio margin
chart.
This algorithm demonstrates that when you buy a put Option contract and you long the underlying asset, it reduces the margin
used by the underlying asset. In the following image, the gray area represents the underlying Equity and the blue area
represents the put Option contract. The algorithm buys SPY on 10/07/2013, buys the put Option contract on 01/02/2014, and
This algorithm demonstrates that when you long and short two Option contracts at the same time, they combine together to
reduce your margin usage. In the following image, the blue area represents a short position in a call Option contract and the
gray area represents a long position in a call Option contract. The algorithm forms a bear call spread one leg at a time, shorting
Buying Futures
This algorithm demonstrates that Futures have a fixed, USD-denominated margin requirement. In the following image, the blue
area represents the percentage of the available margin that the Futures contract uses. The algorithm buys the contract on
10/02/2023 and holds it until the end of the backtest. As the total portfolio value decreases during the last two week in the
backtest, the amount of available margin in the portfolio decreases. However, the USD amount of margin used by the Futures
contract is constant, so the proportion of portfolio margin used by the contract increases at the same time.
Buying Forex
This algorithm demonstrates how the 50x leverage available for Forex impacts the portfolio margin chart. In the following image,
the blue area represents the percentage of the available margin that the Forex position uses. The algorithm buys 500%
exposure to the EURUSD pair on 01/02/2018 and holds it until the end of the backtest. The portfolio margin chart shows that only
10% of the available margin is used to enter the trade since 500% / 50 = 10%.
Series Color Changes
The portfolio margin plot updates daily as the backtest runs. However, the color of a specific security in the plot isn't finalized
until the end of the backtest. For instance, the following image shows an example plot during execution:
The following image shows what the plot looks like at the end of the backtest:
Series Names
The series names in the chart are the last known tickers for the respective assets (for example, SPY and XLE). Therefore, if you
trade multiple assets throughout a backtest that share the same last known ticker (for example, FB in 1998 and FB in 2014), the
Backtesting
Debugging
Introduction
The debugger is a built-in tool to help you debug coding errors while backtesting. The debugger enables you to slow down the
code execution, step through the program line-by-line, and inspect the variables to understand the internal state of the program.
Breakpoints
Breakpoints are lines in your algorithm where execution pauses. You need at least one breakpoint in your code files to start the
Add Breakpoints
Enter an expression and then press The breakpoint only pauses the
Expression
Enter . algorithm when the expression is true.
1. In the right navigation menu, click the Run and Debug icon.
2. In the Run and Debug panel, hover over the Breakpoints section and then click the Toggle Active Breakpoints icon.
Remove Breakpoints
1. In the right navigation menu, click the Run and Debug icon.
2. In the Run and Debug panel, hover over the Breakpoints section and then click the Remove All Breakpoints icon.
Launch Debugger
If the Run and Debug panel is not open, it opens when the first breakpoint is hit.
Control Debugger
After you launch the debugger, you can use the following buttons to control it:
Button Name Default Keyboard Shortcut Description
Inspect Variables
After you launch the debugger, you can inspect the state of your algorithm as it executes each line of code. You can inspect
local variables or custom expressions. The values of variables in your algorithm are formatted in the IDE to improve readability.
For example, if you inspect a variable that references a DataFrame, the debugger represents the variable value as the following:
Local Variables
The Variables section of the Run and Debug panel shows the local variables at the current breakpoint. If a variable in the panel is
an object, click it to see its members. The panel updates as the algorithm runs.
Follow these steps to update the value of a variable:
1. In the Run and Debug panel, right-click a variable and then click Set Value .
Custom Expressions
The Watch section of the Run and Debug panel shows any custom expressions you add. For example, you can add an
1. Hover over the Watch section and then click the plus icon that appears.
Backtesting
Report
Introduction
Reports provide a summary of your algorithm's performance. They outline key statistics, returns, and performance during
various market crises. You can generate a performance report after your backtest completes and download the report as a PDF.
Key Statistics
The top of the backtest report displays statistics to summarize your algorithm's performance. The following table describes the
Runtime Days The number of days in the backtest or live trading period.
The amount of excess return from the risk-free rate per unit
Information Ratio
of systematic risk.
Returns
The backtest report displays charts to show the algorithm's returns per trade, per day, per month, per year, and the cumulative
This chart displays a histogram that shows the distribution of returns per trade over the backtesting period.
Daily Returns
This chart displays the returns of each day. Blue bars represent profitable days and gray bars represent unprofitable days.
Monthly Returns
This chart displays the return of each month. We convert the original equity curve series into a monthly series and calculate the
returns of each month. Green cells represent months with a positive return and red cells represent months with a negative
return. Months that have a greater magnitude of returns are represented with darker cells. Yellow cells represent months with a
relatively small gain or loss. White rectangles represent months that are not included in the backtest period. The values in the
Annual Returns
This chart displays the return of each year. We calculate the total return within each year and represent each year with a blue
bar. The red dotted line represents the average of the annual returns.
Cumulative Returns
This chart displays the cumulative returns of your algorithm. The blue line represents your algorithm and the gray line
represents the benchmark.
Asset Allocation
This chart displays a time-weighted average of the absolute holdings value for each asset that entered your portfolio during the
backtest. When an asset has a percentage that is too small to be shown in the pie chart, it is incorporated into an "Others"
category.
Drawdown
This chart displays the peak-to-trough drawdown of your portfolio's equity throughout the backtest period. The drawdown of
each day is defined as the percentage loss since the maximum equity value before the current day. The drawdowns are
calculated based on daily data. The top 5 drawdown periods are marked in the chart with different colors.
Rolling Statistics
The backtest report displays time series for your portfolio's rolling beta and Sharpe ratio .
This chart displays the rolling portfolio beta over trailing 6 and 12 month periods. The light blue line represents the 6 month
period and the dark blue line represents the 12 month period.
month period and the dark blue line represents the 12 month period.
Exposure
The backtest report displays time series for your portfolio's overall leverage and your portfolio's long-short exposure by asset
class.
Leverage
This chart displays your algorithm's long-short exposure by asset class over time.
Crisis Events
This set of charts displays the cumulative returns of your algorithm and the benchmark during various historical periods. The
blue line represents the cumulative returns of your algorithm and the grey line represents the cumulative return of the
benchmark. The report only contains the crisis event that occurred during your algorithm's backtest period. The following table
shows the crisis events that may be included in your backtest report:
Crisis Name Start Date End Date
Parameters
This section of the report shows the name and value of all the parameters in your project.
Customize Reports
The Report / template.html file in the LEAN GitHub repository defines the stucture of the reports you generate. To override the
HTML file, add a report.html file to your project . To include some of the information and charts that are in the default report, use
the report keys in the Report / ReportKey.cs file in the LEAN GitHub repository. For example, to add the Sharpe ratio of your
To include the crisis event plots in your report, add the {{$HTML-CRISIS-PLOTS}} key and then define the structure of the
individual plots inside of <!--crisis and crisis--> . Inside of this comment, you can utilize the {{$TEXT-CRISIS-TITLE}} and
{{$PLOT-CRISIS-CONTENT}} keys. For example, the following HTML is the default format for each crisis plot:
<!--crisis
<div class="col-xs-4">
<table class="crisis-chart table compact">
<thead>
<tr>
<th style="display: block; height: 75px;">{{$TEXT-CRISIS-TITLE}}</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding:0;">
<img src="{{$PLOT-CRISIS-CONTENT}}">
</td>
</tr>
</tbody>
</table>
</div>
crisis-->
To include the algorithm parameters in your report, add the {{$PARAMETERS}} key and then define the HTML element inside of
<!--parameters and parameters--> . Inside of this comment, you can use special keys {{$KEY<parameterIndex>}} and
{{$VALUE<parameterIndex>}} , which represent the key and value of a single parameter. For example, the following HTML is
<!--parameters
<tr>
<td class = "title"> {{$KEY0}} </td><td> {{$VALUE0}} </td>
<td class = "title"> {{$KEY1}} </td><td> {{$VALUE1}} </td>
</tr>
parameters-->
In the preceding example, {{$KEY0}} is the name of the first parameter in the algorithm and {{$VALUE0}} is its value.
The Report / css / report.css file in the LEAN GitHub repository defines the style of the reports you generate. To override the
Backtesting
Engine Performance
Introduction
A set of benchmark algorithms are periodically run to test the status and speed of the Lean master branch. View the Lean
Performance Benchmark page to see the results. The chart at the top of the page shows the data points per second for each of
the benchmark algorithms. The table at the bottom of the page shows the benchmark algorithms that are run to produce the
results.
Datasets
Datasets
Datasets are a stream of data points you use in your algorithms to make trading decisions and fill orders. Our Dataset Market is a
portal where we aggregate datasets for you to use in your algorithms. Our Dataset Market includes price, fundamental, and
alternative datasets. Consider using fundamental and alternative datasets to incorporate more information in your trading
decisions. Fundamental and alternative datasets contain information that is not present in the price. Price data is commonly
researched for trading ideas, so you may find it easier to discover alpha in other types of datasets.
The Dataset Market enables you to easily load datasets into your trading algorithms for use in the cloud or locally. The datasets
come configured ready to integrate into your research and backtesting without any need for cleaning. The datasets in our
market are vetted by the QuantConnect team to be high-quality, contain actionable information, and be free of survivorship-
bias. Our Dataset Market is growing quickly. New datasets are added frequently.
Categories
Data Issues
Misconceptions
Licensing
Vendors
QuantConnect
Data Provider
Alpaca
Data Provider
IEX Cloud
Interactive Brokers
Data Provider
Polygon
Samco
Tradier
Zerodha
See Also
Dataset Market
Purchasing Datasets
Contributing Datasets
Datasets > Navigating the Market
Datasets
Navigating the Market
Introduction
Datasets are a stream of data points you use in your algorithms to make trading decisions and fill orders. Our Dataset Market is a
portal where we curate datasets available for use in your algorithms. It includes price, fundamental, and alternative datasets.
Consider using fundamental and alternative datasets to incorporate more information in your trading decisions. Fundamental
and alternative datasets contain information that is not present in the price. Price data is commonly researched for trading ideas,
The Dataset Market enables you to easily load datasets into your trading algorithms for use in the cloud or locally. The datasets
come configured ready to integrate into your research and backtesting without any need for cleaning. The datasets in our
market are vetted by the QuantConnect team to be high-quality, contain actionable information, and be free of survivorship-
bias. Our Dataset Market is growing quickly, as new datasets are added frequently.
The Dataset Market is a place where you can view, subscribe to, and download datasets. We provide an example algorithm for
each dataset that you can clone to easily get started using the new dataset. We also provide an example research notebook for
most datasets to demonstrate how to use the dataset in the Research Environment. You can always view the dataset reviews to
learn about the experience other members have had using the dataset. This page explains the layout of the Dataset Market to
help you navigate the marketplace.
The Dataset Market displays all our supported datasets. To view the page, in the top navigation bar, click Data.
Each dataset displays the name, description, coverage, start date, and price of the dataset. Coverage is the number of assets,
securities, contracts, currency pairs, or articles that are included in the dataset. To view the listing page of a dataset, click the
dataset.
You can search the market by applying filters or searching for keywords.
Click the Category: All field and then select a category from the drop-down menu to only display datasets in that category.
Filter Listings by Delivery Options
Click the Delivery Options: All field and then select an option from the drop-down menu to only display datasets with that
delivery option.
Enter keywords in the search bar to only display datasets that contain those keywords.
Homepage
The homepage of a dataset listing displays everything that you need to get started using the dataset. The following table
describes the tabs on the homepage:
Tab Description
Documentation Instructions on using the dataset in backtests and the Research Environment
Pricing The price to access the dataset in the cloud or on your local machine
Data Explorer A table to inspect the dataset files and report data issues
The following table describes the sections displayed under the About tab for most datasets:
Tab Description
Introduction High-level overview of what the dataset includes, who it's created by, and how it's created.
About the Provider Description of the data provider and a link to their website.
Getting Started The line(s) of code that you need to use the dataset in algorithms.
Data Summary A table that displays the dataset's start date, coverage, resolution, density, and timezone.
A set of widgets that display the factors in the dataset, the class members of objects that
Data Point Attributes you use when accessing the dataset, and enumeration values that you can use to customize
the dataset.
Pricing The price to access the dataset in the cloud or on your local machine.
Sidebar
The sidebar of the dataset listing provides a brief summary of the dataset. The following table describes the summary content:
Tab Description
The number of assets, securities, contracts, currency pairs, or articles that the dataset
Coverage
includes.
Documentation
The Documentation tab on a dataset listing demonstrates how to use the dataset. The documentation covers requesting the
data, accessing the data in your algorithm, and performing history requests. We provide documentation in C# and Python so
you can easily integrate the dataset into your algorithms, regardless of the programming language you use.
The Documentation tab also has a Data Point Attributes section to show the dataset's attributes. If an attribute has a custom data
type, you can click the attribute to view the attributes of the custom data type.
Factor Research
Some dataset listings have a Research tab that displays an analysis of the data point attributes in the dataset. Follow these steps
Examples
The Examples tab on a dataset listing shows how to use the dataset in a trading algorithm. We provide examples in C# and
Python for both of the classic and framework algorithm designs. Copy-paste these example algorithms to jumpstart your
strategy research. Consider adjusting the strategy to make it your own or using the parameter optimization feature to improve
the performance of the algorithms.
Licenses
The Licensing tab shows the available licenses for the dataset. Each dataset comes with its own licensing requirements,
depending on the data vendor. For more information about licensing types, see Licensing .
Reviews
The bottom of the dataset listing page shows reviews published by QuantConnect members. You can sort, filter, and write
dataset reviews.
Sort Reviews
Open a dataset listing page , click the Most Recent field, and then select a metric from the drop-down menu to sort the reviews
by that metric.
Filter Reviews
Open a dataset listing page , click the All field, and then select a number of stars from the drop-down menu to only display the
Write Reviews
3. At the bottom of the page, select a number of stars to give your review.
4. Write your review.
Datasets
Categories
Introduction
Dataset categories are a way to identify different types of datasets in our Dataset Market. We provide many price, fundamental,
and alternative datasets for you to use in your research and trading. Datasets that include factors outside of the security price
are less researched, so they may have more alpha to discover. Incorporate alternative datasets into your algorithms so that you
Geospatial
Geospatial data is data related to objects that have a position in the world.
Commerce
Financial Market
Consumer
Consumer data is data on all aspects of consumers, including online shopping behaviors, consumer demographics, and
consumer attitudes.
B2B
Business-to-business (B2B) data is data on businesses that sell goods and services to other businesses.
Transport and logistics data is data on the transportation of goods and the logistics of the transportation.
Environmental
Environmental data is data on the state of the environment, including meteorological data, biodiversity data, and pollution data.
Credit Rating
Credit rating data is data on the financial position of individuals and businesses.
Real Estate
Real estate data is data on residential and commercial real estate, including ownership data, real estate listing data, and real
estate demographic data.
Web
Legal
Legal data is data on the law, including new regulations, government website data, and litigation history.
Health Care
Healthcare data is data on patient-doctor visits, including claims data, fitness wearables data, and health record data.
Entertainment
Entertainment data is data on the media consumption preferences and behaviors of consumers.
Energy
Industry
Political
Political data is data that's collected on political activity, including election votes and political party policies.
News and events data is data that's collected from news providers regarding current events.
Datasets > Data Issues
Datasets
Data Issues
Introduction
Data issues are incorrect or missing values in a dataset. These issues are generally a result of human error or from mistakes in
the data collection process. Data issues can be reported by any QuantConnect member. When data issues are reported and
verified, our Data Team works to quickly resolve them. Thanks to the communal efforts of the QuantConnect members, the
QuantConnect data is reviewed and fixed by over 250,000 people, giving you a very high-quality source of data.
Common Issues
Data issues can occur in both historical and live data providers. Some common examples of data issues include the following:
Ticker changes
You can view a list of all the current data issues under the Data Issues tab in the community forum . Before you report a new
issue, review the list of current issues to ensure that the issue is not already reported. The number of open data issues can
sometimes be large, but our Data Team works on resolving them as quickly as possible while prioritizing the most important
ones.
When all of the QuantConnect members report the data issues that they find, we can ensure the datasets are high quality for
everyone. The easier it is for our Data Team to detect and reproduce the issues you report, the faster we can resolve them. If
you encounter an issue with live data, email us a description of the issue. If you find an issue with the historical data of a
3. Click the Backtest field and then select the backtest from the drop-down menu.
5. Click Publish .
Datasets > Misconceptions
Datasets
Misconceptions
Introduction
Some data issues are reported that aren't actually data issues. Instead, they are from a misunderstanding of how the data is
collected, timestamped, formatted, and normalized. These misunderstandings are caused by assumptions that the data should
be the same across different platforms, should have the same timezones, should be timestamped a certain way, and should be
Cross-Platform Discrepancies
You may find our data can sometimes be slightly different from the data that's displayed on other platforms. Most of the
differences occur because our data is institutional quality while a lot of the other platforms use a cheaper alternative. We use
the Consolidated Tape Association (CTA) and Unlisted Trading Privileges (UTP) tick feeds, which cover the entire US tick feed.
In contrast, most charting websites use the Better Alternative Trading System (BATS), which has very permissive display
policies but only covers about 6-7% of the total market volume . Our tick feed doesn't include over-the-counter (OTC) trades,
but the data on other platforms like Yahoo Finance include OTC trades.
Timezone Differences
Datasets all have different timezones. Most price datasets are timestamped in Eastern Time (ET). However, Future markets have
more exotic timezones, depending on where the Future contract is trading. QuantConnect allows the raw data to be in different
timezones. For US Equities, the timezone is ET. For Oanda Forex prices, the timezone is Coordinated Universal Time (UTC). In
contrast, other charting platforms may display Oanda data with ET timestamps. Oanda Forex uses UTC, but Oanda CFD uses
timezones relative to each of the CFD products that Oanda lists. QuantConnect accurately reflects all of these timezones from
the relative markets that theyʼre trading.
Misaligned Timestamps
Every piece of data has a period. Some data is near-instantaneous, like tick data. Other data has a longer period, like second,
minute, hour, and daily bars. QuantConnect delivers this data to your algorithms at the end of the period to ensure that
lookahead bias doesnʼt occur. When you look at the time property of your algorithm, the period has already ended, so it looks as
if the data is offset by one period. To compare the timestamps of our data to other data, use the time property of the current
bar. The time property of the bar is the start of the bar and the end_time property is the end of the bar. If you use Python and
request historical data, the time index in the DataFrame that's returned maps to the end_time of the respective bar. For more
information about timestamps, see Time Modeling .
Data Normalization
The data normalization mode defines how historical data is adjusted to accommodate for splits, dividends, and continuous
Future contract roll overs. When you compare the data in the Dataset Market to data that's hosted on other platforms, the data
may have different values because a different data normalization mode is being used to adjust the data. Ensure datasets are
using the same normalization mode before reporting data issues. The most common way to recognize this bug is by comparing
the two price series and seeing them significantly deviate in the past. The following data normalization modes are available:
Adjusted Prices
By default, LEAN adjusts US Equity data for splits and dividends to produce a smooth price curve. We use the entire split and
dividend history to adjust historical prices. This process ensures you get the same adjusted prices, regardless of the backtest
end date.
Backtest differences occur when you run backtests before a split or dividend occurs in live trading and then run the same
backtest after it occurs. The second time you run the backtest, the adjusted prices will be different so it can cause different
backtest results. The difference can be significant in large universes because of multiple corporate actions and the cummulative
effect of orders with a small difference.
The opening and closing price of the day is set by very specific opening and closing auction ticks. When a stock like Apple is
listed, itʼs listed on Nasdaq. The open auction tick on Nasdaq is the price thatʼs used as the official open of the day. NYSE,
BATS, and other exchanges also have opening auctions, but the only official opening price for Apple is the opening auction on
the exchange where it was listed.
We set the opening and closing prices of the first and last bars of the day to the official auction prices. This process is used for
second, minute, hour, and daily bars for the 9:30 AM and 4:30 PM Eastern Time (ET) prices. In contrast, other platforms might
The official auction prices are usually emitted 2-30 seconds after the market open and close. We do our best to use the official
opening and closing prices in the bars we build, but the delay can be so large that there isn't enough time to update the opening
and closing price of the bar before it's injected into your algorithms. For example, if you subscribe to second resolution data, we
wait until the end of the second for the opening price but most second resolution data wonʼt get the official opening price. If you
subscribe to minute resolution data, we wait until the end of the minute for the opening auction price. Most of the time, youʼll get
the actual opening auction price with minute resolution data, but there are always exceptions. Nasdaq and NYSE can have
delays in publishing the opening auction price, but we donʼt have control over those issues and we have to emit the data on time
so that you get the bar you are expecting.
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.
There is a delay in when new live data is available for backtesting. It's normally available after 24-48 hours. If you need to
closely monitor new data, use live paper trading .
Datasets > Licensing
Datasets
Licensing
Introduction
You can license datasets in the Dataset Market to use in the cloud for live trading and research or to download locally. We have
contracts with the data providers in the Dataset Market that define the costs of each license. All of the datasets can be used in
QuantConnect Cloud. There are some free licenses, but we can't freely redistribute most of the datasets.
Free
We strive to make as many datasets available for free to use in the cloud and to download locally as possible. We also list
proprietary datasets that are available for license using our cloud or download paid licensing. Most price data is free for use in
the cloud.
Cloud
If you have a Cloud license for a dataset, you can access the dataset for research, backtests, and live trading in the Algorithm
Lab. The cost of the license is added to your monthly bill, which you can pay with your organization's credit card or
QuantConnect Credit balance. With one Cloud license for a dataset, all of the members in your organization can access the
dataset in the cloud.
You need an organization above the Free tier to purchase cloud access to datasets.
2. Open the listing page of a dataset for which you want to gain cloud access.
3. On the dataset listing page, click the Pricing tab.
4. In the Datasets Subscriptions section, next to the name of the dataset you want to remove, click Added .
5. Click Proceed to Checkout .
Download
If you have a Download license, you can store datasets on your local machine. This download is for the licensed organization's
internal LEAN use only and cannot be redistributed or converted in any format. If you study the data and produce some charts,
you may share images of the charts online if the original data can't be to reconstructed from the image. The cost of the license
depends on the dataset and it's calculated on a per-file or per-day basis. For more information about downloading datasets, see
Downloading Data . If you bulk download datasets, you can download historical data packages or daily updates. In most cases,
you need both.
Datasets > Vendors
Datasets
Vendors
Introduction
We welcome submissions of new datasets by data companies. Review our submission process to learn how to get your dataset
listed on QuantConnect.
Submission Criteria
Datasets must meet the following criteria to be considered for the Datasets Market:
A well-defined dataset with a clear and static vision for the data to minimize churn or changes.
Robust ticker and security links to ensure the tickers are tracked well through time. ISIN, FIGI, or point-in-time tickers are
supported.
Consistent delivery schedule with data delivered on time and in time for trading.
Consistent data format with notifications and lead time on data format updates.
If the dataset is alternative data, in addition to the criteria above, the dataset must practice the Alternative Investment Standards
defined by the non-profit Investment Data Standards Organization (IDSO). The Alternative Investment Standards outline the
rules and best practices for collecting and distributing alternative datasets. For example, the IDSO Web Crawling Best Practices
publication states that “a data collector should assess a website according to the terms of its robots.txtˮ.
Review Process
The dataset review process is in place to ensure that your dataset matches the submission criteria. The review process can take
several weeks. If your dataset is accepted, we'll begin integrating it into the Datasets Market. If your dataset is rejected, we'll
provide feedback to help you get the dataset accepted.
Contributing Datasets
We encourage you to integrate your own datasets. To integrate your dataset, see the Contributing Datasets tutorial. The
Follow these steps to give a free trial of your dataset to a QuantConnect organization:
3. On the Datasets page, click the dataset that you want to give as a trial.
4. In the right sidebar of the dataset listing, click Dashboard .
8. If the email address you entered owns mulitple organizations, in the Select target organization window, select an
organization from the drop-down menu and then click OK .
9. Click OK .
If you want to discuss integrating your dataset into the Datasets Market, contact us . We look forward to working with you so
that we can provide QuantConnect members with access to more high-quality datasets.
Datasets > QuantConnect
Datasets
QuantConnect
The QuantConnect data provider provides a stream of trades and quotes to your trading algorithm during live execution. Live
data enables you to make real-time trades and update the value of the securities in your portfolio.
When you deploy a live algorithm, you can use the QuantConnect data provider, a third-party data provider, or both. If you use
multiple data providers, the order you select them in defines their order of precedence in Lean. For example, if you set
QuantConnect as the first provider and Polygon as the second provider, Lean only uses the Polygon data provider for securities
that aren't available from the QuantConnect data provider. This configuration makes it possible to use our data provider for
Equity universe selection and then place Options trades on the securities in the universe.
US Equities
Crypto
Crypto Futures
CFD
Forex
Futures
Future Options
Alternative Data
See Also
Dataset Market
Live Trading
Datasets > QuantConnect > US Equities
QuantConnect
US Equities
Introduction
The QuantConnect data provider provides a stream of US Equity trades and quotes to your trading algorithm during live
execution. Live data enables you to make real-time trades and update the value of the securities in your portfolio.
The QuantConnect data provider also provides a live stream of corporate actions (US Equity Security Master), daily updates on
company fundamentals (US Fundamentals), and the number of shares that are available for short sellers to borrow (US Equities
Short Availability).
Sourcing
The QuantConnect data provider consolidates US Equity market data across all of the exchanges. Over-the-Counter (OTC)
trades are excluded. The data is powered by the Securities Information Processor (SIP), so it has 100% market coverage. In
contrast, free platforms that display data feeds like the Better Alternative Trading System (BATS) only have about 6-7% market
coverage .
We provide live splits, dividends, and corporate actions for US companies. We deliver them to your algorithm before the trading
day starts.
Universe Selection
The QuantConnect data provider enables you to create a dynamic universe of US Equities.
Fundamental Universe
The live data for fundamental universe selection arrives at 6/7 AM Eastern Time (ET), so fundamental universe selection runs for
live algorithms between 7 and 8 AM ET. This timing allows you to place trades before the market opens. Don't schedule
anything for midnight because the universe selection data isn't ready yet.
PY
The QuantConnect data provider enables you to create a universe of securities to match the constituents of an ETF. For more
information about ETF universes, see ETF Constituents Selection .
PY
# Request an async universe of stocks that match the ETF constituents of SPY
self.universe_settings.asynchronous = True
spy = self.add_equity("SPY").symbol
self.add_universe(self.universe.etf(spy, self.universe_settings, self._etf_constituents_filter))
Bar Building
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.
The opening and closing price of the day is set by very specific opening and closing auction ticks. When a stock like Apple is
listed, itʼs listed on Nasdaq. The open auction tick on Nasdaq is the price thatʼs used as the official open of the day. NYSE,
BATS, and other exchanges also have opening auctions, but the only official opening price for Apple is the opening auction on
the exchange where it was listed.
We set the opening and closing prices of the first and last bars of the day to the official auction prices. This process is used for
second, minute, hour, and daily bars for the 9:30 AM and 4:30 PM Eastern Time (ET) prices. In contrast, other platforms might
not be using the correct opening and closing prices.
The official auction prices are usually emitted 2-30 seconds after the market open and close. We do our best to use the official
opening and closing prices in the bars we build, but the delay can be so large that there isn't enough time to update the opening
and closing price of the bar before it's injected into your algorithms. For example, if you subscribe to second resolution data, we
wait until the end of the second for the opening price but most second resolution data wonʼt get the official opening price. If you
subscribe to minute resolution data, we wait until the end of the minute for the opening auction price. Most of the time, youʼll get
the actual opening auction price with minute resolution data, but there are always exceptions. Nasdaq and NYSE can have
delays in publishing the opening auction price, but we donʼt have control over those issues and we have to emit the data on time
so that you get the bar you are expecting.
Excluded Ticks
The bar-building process can exclude ticks. If a tick is excluded, its volume is aggregated in the bar but its price is not
aggregated in the bar. Ticks are excluded if any of the following statements are true:
The tick is from the FINRA exchange and meets our price and volume thresholds.
The trade has none of the following included TradeConditionFlags and at least one of the following excluded
TradeConditionFlags :
TradeConditionFlags Status Description
QuoteConditionFlags :
Specification .
Suspicious Ticks
Tick price data is raw and unfiltered, so it can contain a lot of noise. If a tick is not tradable, we flag it as suspicious. This
process makes the bars a more realistic representation of what you could execute in live trading. If you use tick data, avoid
using suspicious ticks in your algorithms as informative data points. We recommend only using tick data if you understand the
risks and are able to perform your own tick filtering. Ticks are flagged as suspicious in the following situations:
The tick occurs below the best bid or above the best ask
This image shows a tick that occurred above the best ask price of a security. The green line represents the best ask of the
security, the blue line represents the best bid of the security, and the red dots represent trade ticks. The ticks between the
best bid and ask occur from filling hidden orders. The tick that occurred above the best ask price is flagged as suspicious.
Delivery
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
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.
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Minute 1 year
Second 2 months
Tick 1 month
Pricing
QuantConnect
Crypto
Introduction
The QuantConnect data provider provides a stream of Crypto trades and quotes to your trading algorithm during live execution.
Live data enables you to make real-time trades and update the value of the securities in your portfolio.
Sourcing
The QuantConnect data provider uses WebSockets to gather Crypto market data from the following sources:
Bybit
Coinbase
Kraken
Universe Selection
The QuantConnect data provider enables you to create a dynamic universe of Crypto securities. The live data for Crypto
universe selection arrives at 4 PM Coordinated Universal Time (UTC), so universe selection runs for live algorithms between 4
PM and 4:30 PM. Don't schedule anything for midnight because the universe selection data isn't ready yet.
PY
To view an example for each Crypto market, see the Universe Selection section of the Crypto market in the Dataset Market .
Bar Building
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.
Delivery
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
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.
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Minute 1 year
Second 2 months
Tick 1 month
Pricing
QuantConnect
Crypto Futures
Introduction
The QuantConnect data provider provides a stream of Crypto Futures trades and quotes to your trading algorithm during live
execution. Live data enables you to make real-time trades and update the value of the securities in your portfolio.
Sourcing
The QuantConnect data provider uses WebSockets to gather Crypto Futures market data from Binance.
Bar Building
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.
Delivery
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
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,
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Minute 1 year
Second 2 months
Tick 1 month
Pricing
The QuantConnect data provider serves Crypto Futures data for free.
Datasets > QuantConnect > CFD
QuantConnect
CFD
Introduction
The QuantConnect data provider provides a stream of CFD trades and quotes to your trading algorithm during live execution.
Live data enables you to make real-time trades and update the value of the securities in your portfolio.
Sourcing
The QuantConnect data provider consolidates CFD market data from OANDA.
Bar Building
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.
Delivery
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
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,
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Minute 1 year
Second 2 months
Tick 1 month
Pricing
The QuantConnect data provider serves CFD data for free.
Datasets > QuantConnect > Forex
QuantConnect
Forex
Introduction
The QuantConnect data provider provides a stream of Forex pair trades and quotes to your trading algorithm during live
execution. Live data enables you to make real-time trades and update the value of the securities in your portfolio.
Sourcing
The QuantConnect data provider consolidates Forex market data from OANDA.
Bar Building
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.
Delivery
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
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.
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Minute 1 year
Second 2 months
Tick 1 month
Pricing
The QuantConnect data provider serves Forex data for free.
Datasets > QuantConnect > Futures
QuantConnect
Futures
Introduction
The QuantConnect data provider provides a stream of Futures trades, quotes, and open interest to your trading algorithm during
live execution. Live data enables you to make real-time trades and update the value of the securities in your portfolio.
Sourcing
The QuantConnect data provider consolidates Futures market data across the following markets:
CBOT
CME
COMEX
ICE
NYMEX
The data provider doesn't include the CFE market. For Futures.Indices.VIX , use a combination of the QuantConnect and IB
data provider. For more details about this option, see Hybrid Data Provider .
Bar Building
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.
Delivery
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
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.
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Resolution Available History
Minute 1 year
Second 2 months
Tick 1 month
Pricing
QuantConnect
Future Options
Introduction
The QuantConnect data provider provides a stream of Futures Options trades, quotes, and open interest to your trading
algorithm during live execution. Live data enables you to make real-time trades and update the value of the securities in your
portfolio.
Sourcing
The QuantConnect data provider consolidates Future Options market data across the following markets:
CBOT
CME
COMEX
NYMEX
Bar Building
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.
Delivery
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
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.
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Resolution Available History
Minute 1 year
Second 2 months
Tick 1 month
Pricing
The QuantConnect data provider serves Future Options data for free.
Datasets > QuantConnect > Alternative Data
QuantConnect
Alternative Data
Introduction
The QuantConnect data provider can stream live alternative data into your algorithms to help you make informed trading
decisions.
Sourcing
The QuantConnect data provider sources alternative data directly from data vendors . To view all of the integrated data vendors,
see the Dataset Market .
Delivery
The delivery schedule of alternative data depends on the specific dataset you're using. We inject the data into your algorithms
when the vendor provides the data. For most alternative datasets, the data is updated on a daily or hourly basis. Some datasets,
like the Tiingo News Feed or Benzinga News Feed , include a live stream. In these cases, we deliver the data as a live stream to
your algorithm.
Most live trading algorithms run on co-located servers racked in Equinix. Co-location reduces several factors that can interfere
with your algorithm, including downtime from internet outages, equipment repairs, and natural disasters.
Live data takes time to travel from the source to your algorithm. The latency of the alternative data depends on the specific
dataset you're using.
Historical Data
When you request historical data or run warm-up , the amount of historical data you can access depends on the resolution of
your data subscriptions. The following table shows the amount of trailing historical data you can access for each data
resolution:
Minute 1 year
Second 2 months
Tick 1 month
Pricing
Datasets
Alpaca
Introduction
Alpaca was founded by Yoshi Yokokawa and Hitoshi Harada in 2015 as a database and machine learning company. In 2018,
Alpaca Securities LLC (Alpaca Securities) became a registered US broker-dealer with the Financial Industry Regulatory Authority
( FINRA ) with the mission to "open financial services to everyone on the planet". In 2022, Alpaca Crypto LLC (Alpaca Crypto)
became a registered Money Services Business (MSB) with the Financial Crimes Enforcement Network ( FinCEN ). Alpaca
provides access to trading Equities, Options, and Crypto for clients in over 30 countries. Alpaca also delivers custody, clearing,
execution, and billing on behalf of registered advisors.
The Alpaca data feeds are streams of Equity, Equity Option and Crypto prices directly from Alpaca. If you use this data feed and
Sourcing
The Alpaca data feed comes directly from Alpaca. For more information about the data source, see the Alpaca data
documentation .
If you use the Alpaca data provider, Alpaca only provides the security price data. We provide the following auxiliary datasets
from the Dataset Market:
Universe Selection
PY
self.universe_settings.asynchronous = True
self.add_universe(self.fundamental_universe_selection)
The Alpaca data provider can stream data for up to 30 assets by default. If your algorithm adds more than the your quota, LEAN
logs an error message from Alpaca. To increase the quota, purchase a unlimited market data plan from Alpaca.
Bar Building
The data feed is a stream of asset prices collected by WebSockets and distributed to algorithms on the platform.
Alternative Data
Third-party data providers support most alternative datasets, except data that streams real-time intraday data. Streaming
datasets, like the Tiingo News Feed and Benzinga News Feed , require the QuantConnect data provider.
When you deploy a live algorithm with the Alpaca brokerage , you can use a third-party data provider, the Alpaca data provider,
or both. If you use multiple data providers, the order you select them in defines their order of precedence in Lean. For example,
if you set QC as the first provider and Alpaca as the second provider, Lean only uses the Alpaca data provider for securities that
aren't available from the QC data provider. This configuration makes it possible to use our data provider for Equity universe
selection and then place Options trades on the securities in the universe.
Pricing
The Alpaca data feed is free for Alpaca subscription accounts. The free data feed has a quota of 30 assets and 200 API calls per
minute. Alpaca offers unlimited market data plans. To view the latest prices, see the Data page on the Alpaca website.
Datasets > IEX Cloud
Datasets
IEX Cloud
Introduction
Instead of using the live data from your brokerage, you can use data from IEX Cloud. To use IEX Cloud, you need an account
subscribed to one or more data bundles . You also must select either the Launch, Grow, or Enterprise subscription tier; this
dictates your maximum requests per second. If you don't have an account, register today and get your API key . Pricing
information can be found here .
Upon registration, your account will automatically start a 7-day free trial. This trial has access to all API endpoints and a rate limit
of 5 requests per second. If you have any questions regarding IEX Cloud's API service, please contact them here:
[email protected] .
To view the implementation of the IEX Cloud integration, see the Lean.DataSource.IEX repository .
QuantConnect Cloud currently only supported streaming IEX Cloud data during live trading. To download IEX Cloud for
backtesting, research, and optimizations, use the CLI .
Supported Datasets
The IEX Cloud data provider serves asset price data directly from IEX Cloud. Our integration supports US Equity securities.
To supplement the asset price data from IEX Cloud, we provide the following auxiliary datasets from the Dataset Market:
For more information about the IEX Cloud data source, see the IEX Cloud documentation .
Universe Selection
When you trade live on QuantConnect Cloud with the IEX Cloud data provider, QuantConnect provides the universe selection
data.
Alternative Data
The alternative datasets in QuantConnect Cloud works seamlessly with the data from IEX Cloud.
Research
The IEX Cloud data provider is not currently supported for research in QuantConnect Cloud.
Backtesting
The IEX Cloud data provider is not currently supported for backtesting in QuantConnect Cloud.
Optimization
The IEX Cloud data provider is not currently supported for optimizations in QuantConnect Cloud.
Live Trading
You must have an available live trading node for each live trading algorithm you deploy.
Follow these steps to deploy a live trading algorithm that uses the IEX Cloud data provider:
For more information about the required information for each brokerage, see the Deploy Live Algorithms section of your
brokerage documentation .
8. Click the Select Price Plan... field and then click your price plan from the drop-down menu.
9. Click Save .
10. (Optional) If your brokerage supports exisiting cash and position holdings , add them.
11. (Optional) Set up notifications .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
When you deploy a live algorithm , you can add multiple data provider. If you use multiple data providers, the order you select
them in defines their order of precedence in Lean. For example, if you set IEX Cloud as the first provider and IB as the second
provider, Lean only uses the IB data provider for securities that aren't available from the IEX Cloud data provider. This
configuration makes it possible to use IEX Cloud data provider for Equity universe selection and then place Options trades on
the securities in the universe.
Pricing
To view the prices of the IEX Cloud API packages, contact their support team .
Datasets > Interactive Brokers
Datasets
Interactive Brokers
Introduction
Interactive Brokers (IB) was founded by Thomas Peterffy in 1993 with the goal to "create technology to provide liquidity on
better terms. Compete on price, speed, size, diversity of global products and advanced trading tools". IB provides access to
trading Equities, ETFs, Options, Futures, Future Options, Forex, CFDs, Gold, Warrants, Bonds, and Mutual Funds for clients in
over 200 countries and territories with no minimum deposit. IB also provides paper trading, a trading platform, and educational
services.
The Interactive Brokers (IB) data provider streams live asset prices from IB. If you use this data provider and request historical
Sourcing
The IB data provider sources data directly from IB. For more information about the data source, see the Trader Workstation API
documentation .
If you use the IB data provider, IB only provides the security price data. We provide the following auxiliary datasets from the
Dataset Market:
Universe Selection
PY
self.universe_settings.asynchronous = True
self.add_universe(self.fundamental_universe_selection)
The universe selection data comes from our Dataset Market, not the TWS market scanners . Universe selection with the IB data
provider occurs around 6-7 AM Eastern Time (ET) on Tuesday to Friday and at 2 AM ET on Sunday. Universe selection data isn't
available when the IB servers are closed. To check the IB server status, see the Current System Status page on the IB website.
The IB data provider can stream data for up to 100 assets by default, but IB may let you stream more than 100 assets based on
your commissions and equity value. For more information about quotas from IB, see the Market Data Pricing Overview page on
the IB website. If your algorithm adds more than the your quota, LEAN logs an error message from IB. To increase the quota,
Bar Building
The data is a summarized snapshot of the trades and quotes at roughly 300 milliseconds per snapshot.
Alternative Data
Third-party data providers support most alternative datasets, except data that streams real-time intraday data. Streaming
datasets, like the Tiingo News Feed and Benzinga News Feed , require the QuantConnect data provider. The hybrid
When you deploy a live algorithm with the IB brokerage , you can use a third-party data provider, the IB data provider, or both. If
you use multiple data providers, the order you select them in defines their order of precedence in Lean. For example, if you set
QC as the first provider and IB as the second provider, Lean only uses the IB data provider for securities that aren't available
from the QC data provider. This configuration makes it possible to use our data provider for Equity universe selection and then
place Options trades on the securities in the universe. If you use a third-party data provider, the assets that you subscribe to
Historical Data
If you get historical data from IB through a history request or a warm-up period , the historical data has the following
characteristics:
The following quotas are in place for tick and second resolution historical data:
In the preceding quotas, TradeBar and QuoteBar data count as separate requests. For example, if you request TradeBar and
QuoteBar data for SPY, it counts as two requests.
For more information about historical data from IB, see Historical Data Limitations in the IB documentation.
Pricing
To use IB data in your algorithms, subscribe to IB market data . We support all of the IB data subscriptions that are related to the
securities and markets we support . Members usually subscribe to the following IB market data:
To see the latest prices, check the Market Data Pricing Overview page on the IB website. IB can take up to 24 hours to process
subscription requests. So after you subscribe to data, you need to wait 24 hours before you can use it in your algorithms. When
you subscribe to data, IB only assigns your data subscription to one of your accounts. If you want to assign the subscription to a
different account, for example, a paper trading account instead of a live trading account, then contact IB.
Datasets > Polygon
Datasets
Polygon
Introduction
Polygon was founded by Quinton Pike in 2017 with the goal to "break down the barriers that have traditionally limited access to
high-quality financial data for all". Polygon provides institutional-grade Equity, Option, Index, Forex, and Crypto data for
business and educational purposes.
The Polygon data provider streams live asset prices from Polygon. Instead of using the data from QuantConnect or your
brokerage, you can use data from Polygon if you're deploying a live algorithm and have an API key. To get an API key, see the
API Keys page on the Polygon website If you use this data provider and request historical data, the historical data comes from
Polygon.
To view the implementation of the Polygon integration, see the Lean.DataSource.Polygon repository .
QuantConnect Cloud currently only supported streaming Polygon data during live trading. To download Polygon for backtesting,
Supported Datasets
The Polygon data provider serves asset price data directly from Polygon. Our integration supports securities from the following
asset classes:
US Equity
US Equity Options
US Indices
US Index Options
To supplement the asset price data from Polygon, we provide the following auxiliary datasets from the Dataset Market:
For more information about the Polygon data source, see the Polygon API documentation .
Universe Selection
When you trade live on QuantConnect Cloud with the Polygon data provider, QuantConnect provides the universe selection
data.
Alternative Data
The alternative datasets in QuantConnect Cloud works seamlessly with the data from Polygon.
Research
The Polygon data provider is not currently supported for research in QuantConnect Cloud.
Backtesting
The Polygon data provider is not currently supported for backtesting in QuantConnect Cloud.
Optimization
The Polygon data provider is not currently supported for optimizations in QuantConnect Cloud.
Live Trading
You must have an available live trading node for each live trading algorithm you deploy.
Follow these steps to deploy a live trading algorithm that uses the Polygon data provider:
3. On the Deploy Live page, click the Brokerage field and then click your brokerage from the drop-down menu.
4. Enter the required brokerage authentication information.
For more information about the required information for each brokerage, see the Deploy Live Algorithms section of your
brokerage documentation .
6. Click the Data Provider 1 field and then click Polygon from the drop-down menu.
7. Enter your Polygon API Key.
8. Click Save .
9. (Optional) If your brokerage supports exisiting cash and position holdings , add them.
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
When you deploy a live algorithm , you can add multiple data provider. If you use multiple data providers, the order you select
them in defines their order of precedence in Lean. For example, if you set QuantConnect as the first provider and Polygon as the
second provider, Lean only uses the Polygon data provider for securities that aren't available from the QuantConnect data
provider. This configuration makes it possible to use QuantConnect data provider for Equity universe selection and use Polygon
Pricing
To view the prices of the Polygon API packages, see the Simple Pricing page on the Polygon website.
Datasets > Samco
Datasets
Samco
Introduction
Samco was founded by Jimeet Modi in 2015 with a mission of providing retail investors access to sophisticated financial
technology that can assist retail investors in creating wealth at a low cost. Samco provides access to India Equities for clients in
India with no minimum balance. Samco also provides stock ratings, mutual funds, and a mini-portfolio investment platform.
The Samco data provider streams live asset prices from Samco. If you use this data provider and request historical data, the
Sourcing
The Samco data provider sources data directly from Samco. For more information about the data source, see the StockNote API
documentation .
If you use the Samco data provider, Samco only provides the security price data. We provide the following auxiliary datasets
Universe Selection
Bar Building
The Samco data provider consolidates prices and quotes across all of the Indian exchanges. For a complete list of exchange
and securities, see the ScripMaster file from the StockNote API documentation.
Alternative Data
Third-party data providers support most alternative datasets, except data that streams real-time intraday data. Streaming
datasets, like the Tiingo News Feed and Benzinga News Feed , require the QuantConnect data provider.
Pricing
The Samco data provider is free. To access it, you just need an active Samco account.
Datasets > TradeStation
Datasets
TradeStation
Introduction
TradeStation was founded by brothers William (Bill) and Rafael (Ralph) Cruz in 1982 as Omega Research, Inc. In 2001, the
company converted itself from a trading software company to an online securities brokerage and renamed itself "TradeStation"
with the mission to "create the ultimate trading experience". TradeStation provides access to trading Equities, Equity Options,
and Futures for clients in over 150 markets, 34 countries, and 27 currencies. TradeStation also delivers custody, clearing,
execution, and billing on behalf of registered advisors.
The TradeStation data feeds are streams of Equity, Equity Option, and Futures prices directly from TradeStation. If you use this
data feed and request historical data, the historical data comes from TradeStation.
Sourcing
The TradeStation data feed comes directly from TradeStation. For more information about the data source, see the Market Data
If you use the TradeStation data provider, TradeStation only provides the security price data. We provide the following auxiliary
datasets from the Dataset Market:
Universe Selection
PY
self.universe_settings.asynchronous = True
self.add_universe(self.fundamental_universe_selection)
Bar Building
The data feed is a stream of asset prices collected by WebSockets and distributed to algorithms on the platform.
Alternative Data
Third-party data providers support most alternative datasets, except data that streams real-time intraday data. Streaming
datasets, like the Tiingo News Feed and Benzinga News Feed , require the QuantConnect data provider.
When you deploy a live algorithm with the TradeStation brokerage , you can use a third-party data provider, the TradeStation
data provider, or both. If you use multiple data providers, the order you select them in defines their order of precedence in Lean.
For example, if you set QC as the first provider and TradeStation as the second provider, Lean only uses the TradeStation data
provider for securities that aren't available from the QC data provider. This configuration makes it possible to use our data
provider for Equity universe selection and then place Options trades on the securities in the universe.
Historical Data
If you get historical data from TradeStation through a history request or a warm-up period , you can't request tick or second
resolution data.
Pricing
To view the latest prices, see the Data page on the TradeStation website.
Datasets > Tradier
Datasets
Tradier
Introduction
Tradier was founded by Dan Raju, Peter Laptewicz, Jason Barry, Jeyashree Chidambaram, and Steve Agalloco in 2012 with the
goal to "deliver a choice of low-cost, high-value brokerage services to traders". Tradier provides access to trading Equities and
Options for clients in over 250 countries and territories with no minimum deposit for cash accounts . Tradier also delivers
The Tradier data feeds are streams of Equity and Option prices directly from Tradier. If you use this data feed and request
historical data, the historical data comes from Tradier. If you deploy to the demo environment, Tradier doesn't offer streaming
market data due to exchange restrictions related to delayed data, so you must use our data feed.
Sourcing
The Tradier data feed comes directly from Tradier. For more information about the data source, see the Tradier API
documentation .
If you use the Tradier data feed, Tradier only provides the security price data. We provide the following auxiliary datasets from
the Dataset Market:
Universe Selection
PY
self.universe_settings.asynchronous = True
self.add_universe(self.fundamental_universe_selection)
Bar Building
The data feed is a stream of asset prices collected by WebSockets and distributed to algorithms on the platform.
Alternative Data
Third-party data providers support most alternative datasets, except data that streams real-time intraday data. Streaming
datasets, like the Tiingo News Feed and Benzinga News Feed , require the QuantConnect data provider.
When you deploy a live algorithm with the Tradier brokerage , you can use a third-party data provider, the Tradier data provider,
or both. If you use multiple data providers, the order you select them in defines their order of precedence in Lean. For example,
if you set QC as the first provider and Tradier as the second provider, Lean only uses the Tradier data provider for securities
that aren't available from the QC data provider. This configuration makes it possible to use our data provider for Equity universe
selection and then place Options trades on the securities in the universe.
Pricing
The Tradier data feed is free for Tradier subscription accounts. If you have a free Tradier account, you may have to pay
inactivity and maintenance fees. If you have less than 2, 000intotalaccountvalueandlessthan2executedtradesin1year, theinactivityfeeis
50. If you have less than 2 executed trades per month, the international account monthly maintenance fee is $20. To view the
latest prices, see the Pricing page on the Tradier website.
Datasets > Zerodha
Datasets
Zerodha
Introduction
Zerodha was founded by Nithin Kamath in 2010 with the goal to break all barriers that traders and investors face in India in terms
of cost, support, and technology. Zerodha provides access to India Equities for clients in India with no minimum balance
required. Zerodha also provides a mutual fund investment platform and an interactive portfolio dashboard.
The Zerodha data feed streams live asset prices from Zerodha. If you use this data feed and request historical data, the
Sourcing
The Zerodha data feed comes directly from Zerodha. For more information about the data source, see the Kite Connect API
documentation .
If you use the Zerodha data feed, Zerodha only provides the security price data. We provide the following auxiliary datasets
Universe Selection
Bar Building
The data feed consolidates prices and quotes across all of the Indian exchanges.
Alternative Data
Third-party data providers support most alternative datasets, except data that streams real-time intraday data. Streaming
datasets, like the Tiingo News Feed and Benzinga News Feed , require the QuantConnect data provider.
Pricing
The Zerodha data feed costs ₹2000/month for retail users. To view the latest prices, see the What are the charges for KITE
APIs? page on the Zerodha website.
Live Trading
Live Trading
A live algorithm is an algorithm that trades in real-time with real market data. QuantConnect enables you to run your algorithms
in live mode with real-time market data. Deploy your algorithms using QuantConnect because our infrastructure is battle-tested.
We have successfully hosted more than 200,000 live algorithms and have had more than $15B in volume traded on our servers
since 2015. The algorithms that our members create are run on co-located servers and the trading infrastructure is maintained
at all times by our team of engineers. It's common for members to achieve 6-months of uptime with no interruptions.
Getting Started
Brokerages
Deployment
Notifications
Results
Algorithm Control
Reconciliation
Risks
See Also
Adding Notifications
Set Up Paper Trading
Live Trading > Getting Started
Live Trading
Getting Started
Introduction
A live algorithm is an algorithm that trades in real-time with real market data. QuantConnect enables you to run your algorithms
in live mode with real-time market data. Deploy your algorithms using QuantConnect because our infrastructure is battle-tested.
We have successfully hosted more than 200,000 live algorithms and have had more than $22B in volume traded on our servers
since 2015. The algorithms that our members create are run on co-located servers and the trading infrastructure is maintained
at all times by our team of engineers. It's common for members to achieve 6-months of uptime with no interruptions.
The following video demonstrates how to deploy live paper trading algorithms:
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click Paper Trading from the drop-down menu.
4. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
5. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
6. (Optional) Follow these steps to start the algorithm with existing cash holdings ( see video ):
3. Enter the currency ticker (for example, USD or BTC) and a quantity.
7. (Optional) Follow these steps to start the algorithm with existing position holdings ( see video ):
1. In the Algorithm Holdings State section, click Show .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
runtime statistics, your cashbook holdings, and your position holdings.
To deploy a live algorithm with a different brokerage, see the Deploy Live Algorithms section of the brokerage integration
documentation .
Stop Live Algorithms
The live trading results page has a Stop button to immediately stop your algorithm from executing. When you stop a live
algorithm, your portfolio holdings are retained. Stop your algorithm if you want to perform any of the following actions:
Place manual orders through your brokerage account instead of the web IDE
Furthermore, if you receive new securities in your portfolio because of a reverse merger, you also need to stop and redeploy the
algorithm.
LEAN actively terminates live algorithms when it detects interference outside of the algorithm's control to avoid conflicting race
conditions between the owner of the account and the algorithm, so avoid manipulating your brokerage account and placing
manual orders on your brokerage account while your algorithm is running. If you need to adjust your brokerage account
holdings, stop the algorithm, manually place your trades, and then redeploy the algorithm.
2. Click Stop .
3. Click Stop again.
The live results page has a Liquidate button that acts as a "kill switch" to sell all of your portfolio holdings. If your algorithm has a
bug in it that caused it to purchase a lot of securities that you didn't want, this button let's you easily liquidate your portfolio
instead of placing many manual trades. When you click the Liquidate button, if the market is open for an asset you hold, the
algorithm liquidates it with market orders. If the market is not open, the algorithm places market on open orders. After the
algorithm submits the liquidation orders, it stops executing.
For information about on-premise live trading with Local Platform , see Getting Started .
Get Deployment Id
To get the live deployment Id, open the log file and enter "Launching analysis for" into the search bar. The log file shows all of
the live deployment Ids for the project. An example deployment Id is L-6bf91128391608d0728ff90b81bfca41. If you have
deployed the project multiple times, use the most recent deployment Id in the log file.
Automate Deployments
If you have multiple deployments, use a notebook in the Research Enviroment to programmatically deploy, stop or liquidate
algorithms.
Live Trading > Brokerages
Live Trading
Brokerages
Brokerages supply a connection to the exchanges so that you can automate orders using LEAN.
Alpaca
Binance
Bitfinex
Crypto
ByBit
Coinbase
Crypto
Interactive Brokers
US Equities, Equity Options, Forex, Futures, Future Options, Index, Index Options, & CFD
Kraken
Crypto
Oanda
Samco
India Equities
TD Ameritrade
US Equities
TradeStation
Tradier
Trading Technologies
Futures
Wolverine
US Equities
Zerodha
India Equities
Bloomberg EMSX
FIX Connections
Unsupported Brokerages
See Also
Adding Notifications
Set Up Paper Trading
Live Trading > Brokerages > QuantConnect Paper Trading
Brokerages
QuantConnect Paper Trading
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
QuantConnect Paper Trading lets you run live, real-time data into your algorithm but execute trades using fictional capital.
Instead of your orders being routed to an exchange when you're paper trading, your order fills are simulated. Use paper trading
to test your algorithm without risking real money and to ensure your backtest wasn't overfit before deploying with real money.
You can use the paper trading brokerage without needing to sign up for a real brokerage account. If you don't set a brokerage
model in your algorithm with the set_brokerage_model method, the paper trading brokerage uses the DefaultBrokerageModel
to simulate trades.
To view the implementation of the QuantConnect Paper Trading brokerage, see PaperBrokerage.cs in the LEAN GitHub
repository. To view the implementation of the backtesting brokerage, see BacktestingBrokerage.cs in the LEAN GitHub
repository.
Account Types
The QuantConnect Paper Trading brokerage supports cash and margin accounts. To set the account type in an algorithm, see
the paper trading brokerage model documentation .
If you pass a different BrokerageName to the set_brokerage_model method, the new brokerage model defines the account types
Asset Classes
The QuantConnect Paper Trading brokerage supports the following asset classes:
US Equities
Crypto
Forex
CFD
Futures
Future Options
If you set the brokerage model to a model other than the DefaultBrokerageModel , the new brokerage model defines the asset
classes you can trade.
Data Feeds
We can only provide paper trading on the assets for which we have a live data provider .
Orders
The following sections describe how the DefaultBrokerageModel handles orders. If you set the brokerage model to a different
model, the new brokerage model defines how orders are handled.
Order Types
The following table describes the available order types for each asset class that the DefaultBrokerageModel supports:
Crypto Futures
Order Type US Equity Crypto Forex CFD Futures
Futures Options
Market
Limit
Limit if
touched
Stop
market
Stop limit
Market on
open
Market on
close
Combo
market
Combo limit
Combo leg
limit
Exercise
Option
Time In Force
DAY
good_til_canceled
good_til_date
Updates
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Fees
The following table shows the fees that the DefaultBrokerageModel charges for each of the supported asset classes:
Crypto $0
Forex $0
CFDs $0
Futures $1.85/contract
If you set the brokerage model to a model other than the DefaultBrokerageModel , the new brokerage model defines the order
fees.
To see the fee models that the DefaultBrokerageModel uses, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you set the
brokerage model to a different model, the new brokerage model defines how margin is modeled. If you have more than $25,000
in your brokerage account, you can use the PatternDayTradingMarginModel to make use of the 4x intraday leverage and 2x
Slippage
Orders through the DefaultBrokerageModel do not experience slippage in backtests or paper trading. For more information
about the slippage model the DefaultBrokerageModel uses, see Slippage .
Fills
The DefaultBrokerageModel fills market orders immediately and completely. When available, bid and ask spread will be used
Settlements
Brokerage Models
The QuantConnect Paper Trading brokerage uses the DefaultBrokerageModel by default, but you can use any of the brokerage
models .
PY
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click Paper Trading from the drop-down menu.
4. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
5. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
6. (Optional) Follow these steps to start the algorithm with existing cash holdings ( see video ):
3. Enter the currency ticker (for example, USD or BTC) and a quantity.
7. (Optional) Follow these steps to start the algorithm with existing position holdings ( see video ):
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
runtime statistics, your cashbook holdings, and your position holdings.
Live Trading > Brokerages > Alpaca
Brokerages
Alpaca
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Alpaca was founded by Yoshi Yokokawa and Hitoshi Harada in 2015 as a database and machine learning company. In 2018,
Alpaca Securities LLC (Alpaca Securities) became a registered US broker-dealer with the Financial Industry Regulatory Authority
( FINRA ) with the mission to "open financial services to everyone on the planet". In 2022, Alpaca Crypto LLC (Alpaca Crypto)
became a registered Money Services Business (MSB) with the Financial Crimes Enforcement Network ( FinCEN ). Alpaca
provides access to trading Equities, Options, and Crypto for clients in over 30 countries. Alpaca also delivers custody, clearing,
To view the implementation of the Alpaca brokerage integration, see the Lean.Brokerages.Alpaca repository .
Account Types
Alpaca supports cash and margin accounts. To set the account type in an algorithm, see the Alpaca brokerage model
documentation .
Create an Account
Follow the account creation wizard on the Alpaca website to create an Alpaca account.
You will need API credentials to deploy live algorithms with your brokerage account. After you have an account, open the
Dashboard page, click the button in the top left to select your real money trading account, and then click Generate New Keys .
Store your API Key and Secret somewhere safe.
Paper Trading
Alpaca supports paper trading. When you create an Alpaca account, your account is a paper trading account by default. To get
your paper trading API credentials, open the Dashboard page, click the button in the top left to select your paper trading
account, and then click Generate New Keys . For more information about their paper trading environment, see their rules and
assumptions documentation.
Asset Classes
US Equities
Equity Options
Crypto
You may not be able to trade all assets with Alpaca. For example, if you live in the EU, you can't trade US ETFs. Check with your
local regulators to know which assets you are allowed to trade. You may need to adjust settings in your brokerage account to
live trade some assets.
Data Providers
You might need to purchase a Alpaca market data subscription for your trading. For more information about live data providers,
see Datasets .
Orders
We model the Alpaca API by supporting several order types, order properties, and order updates. When you deploy live
Order Types
The following table describes the available order types for each asset class that our Alpaca integration supports:
Market
Limit
Stop market
Stop limit
Trailing stop
Market on Open
Market on Close
Time In Force
DAY
GOOD_TIL_CANCELED
good_til_date
Updates
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Fees
The Alpaca trading for Equity and Equity Options is commission-free. To view the Alpaca trading fees for Crypto, see the Crypto
Fees page on the Alpaca website. To view how we model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you have more than
$25,000 in your brokerage account, you can use the PatternDayTradingMarginModel to make use of the 4x intraday leverage
and 2x overnight leverage available on most brokerages from the PDT rule .
Slippage
Orders through Alpaca do not experience slippage in backtests. In live trading, your orders may experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
Note the following security and stability aspects of our Alpaca integration.
Account Credentials
When you deploy live algorithms with Alpaca, we don't save your brokerage account credentials.
API Outages
We call the Alpaca API to place live trades. Sometimes the API may be down. Check the Alpaca status page to see if the API is
currently working.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click Alpaca from the drop-down menu.
4. Click on the Environment field and then click one of the environments.
Environment Description
8. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
In most cases, we suggest using the QuantConnect data provider , the Alpaca data provider , or both. The order you set
If you add the Alpaca data provider, enter your API key and secret. To get your API key and secret, see Account Types .
Your account details are not saved on QuantConnect.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Binance
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Binance was founded by Changpeng Zhao in 2017 with the goal to "increase the freedom of money globally". Binance provides
access to trading Crypto through spot markets and perpetual Futures. They serve clients with no minimum deposit when
depositing Crypto. Binance also provides an NFT marketplace, a mining pool, and services to deposit Crypto coins in liquidity
pools to earn rewards.
To view the implementation of the Binance brokerage integration, see the Lean.Brokerages.Binance repository .
Account Types
Binance supports cash and margin accounts for spot trades, but only supports margin accounts for Futures trades. Binance US
only supports cash accounts. To set the account type in an algorithm, see the Binance brokerage model documentation .
Create an Account
Follow the account creation wizard on the Binance.com or Binance.us website to create a Binance account.
You will need API credentials to deploy live algorithms with your brokerage account. After you open your account, create API
credentials and store them somewhere safe. As you create credentials, make the following configurations:
Select the Restrict access to trusted IPs only check box and then enter our IP address, 146.59.85.21.
If you are going to trade Crypto Futures, select the Enable Futures check box.
Paper Trading
Binance supports paper trading through the Binance Spot Test Network. You don't need a Binance account to create API
credentials for the Spot Test Network.
Follow these steps to set up paper trading with the Binance Spot Test Network:
1. Log in to the Binance Spot Test Network with your GitHub credentials.
2. In the API Keys section, click Generate HMAC_SHA256 Key .
Paper trading Binance Crypto Futures or with Binance US isn't currently available.
Sub-Accounts
Our Binance and Binance US integrations don't support trading with sub-accounts. You must use your main account.
Asset Classes
Data Providers
The QuantConnect data provider provides Crypto data during live trading.
Orders
We model the Binance and Binance US APIs by supporting several order types, supporting order properties, and not supporting
order updates. When you deploy live algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our Binance and Binance US integrations
support:
Market
Limit
Stop limit
Order Properties
We model custom order properties from the Binance and Binance US APIs. The following table describes the members of the
A TimeInForce instruction
to apply to the order. The
following instructions are
supported:
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
Updates
We model the Binance and Binance US APIs by not supporting order updates, but you can cancel an existing order and then
create a new order with the desired arguments. For more information about this workaround, see the Workaround for
Brokerages That Donʼt Support Updates .
Fees
To view the Binance or Binance US trading fees, see the Trading Fees page on the Binance.com website or the Fee Structure
page on the Binance.us website. To view how we model their fees, see Fees . The Binance Spot Test Network does not charge
order fees.
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you trade Crypto
Perpetual Futures, we model the margin cost and payments of your Crypto Future holdings by directly adjusting your portfolio
cash. For more information about Futures margin interest modeling, see the Binance Futures Model .
Slippage
Orders through Binance and Binance US do not experience slippage in backtests. In live trading, your orders may experience
slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
To view how we model Binance and Binance US order fills, see Fills .
Settlements
To view how we model settlement for Binance and Binance US trades, see Settlement .
When you deploy live algorithms with Binance or Binance US, we don't save your brokerage account credentials.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
The following algorithm demonstrates the functionality of the Binance and Binance US brokerages:
Binance
Charts Statistics Code Clone Algorithm
Binance US
Virtual Pairs
All fiat and Crypto currencies are individual assets. When you buy a pair like BTCUSD, you trade USD for BTC. In this case, LEAN
removes some USD from your portfolio cashbook and adds some BTC. The virtual pair BTCUSD represents your position in that
trade, but the virtual pair doesn't actually exist. It simply represents an open trade. When you deploy a live algorithm, LEAN
populates your cashbook with the quantity of each currency, but it can't get your position of each virtual pair.
You must have an available live trading node for each live trading algorithm you deploy.
Follow these steps to deploy a live algorithm:
3. On the Deploy Live page, click the Brokerage field and then click Binance Exchange from the drop-down menu.
4. Enter your API key and secret.
To generate your API credentials, see Account Types . Your account details are not saved on QuantConnect.
5. Click on the Environment field and then click one of the environments.
Environment Description
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
8. If your brokerage account has existing cash holdings, follow these steps ( see video ):
3. Enter the currency ticker (for example, USD or CAD) and a quantity.
9. If your brokerage account has existing position holdings, follow these steps ( see video ):
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Bitfinex
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Bitfinex was founded by Giancarlo Devasini and Raphael Nicolle in 2012 with the goal to "give our users the ultimate
cryptocurrency trading experience". Bitfinex provides access to trading Crypto for clients outside prohibited jurisdictions with
no minimum deposit to set up an account. If you fund your account with fiat currency, they enforce a 10,000 minimum for USD,
EUR, and GBP. However, if you fund your account with Crypto, they do not enforce a minimum deposit. Bitfinex also provides
Crypto staking, a mobile app, and an unrealized profit leaderboard for the traders on the platform. Bitfinex has always been at
the forefront of technological innovation in digital asset trading.
To view the implementation of the Bitfinex brokerage integration, see the Lean.Brokerages.Bitfinex repository .
Account Types
Bitfinex supports cash and margin accounts. To set the account type in an algorithm, see the Bitfinex brokerage model
documentation .
Use AccountType.Cash to connect to your Exchange wallet or AccountType.Margin to connect to your Margin wallet. You can
not connect to your Funding or Capital Raise wallet. If you provide the wrong AccountType to the set_brokerage_model method,
you may connect to an empty wallet, causing Lean to throw a warning. If you have a currency in your wallet that ends with "F0",
Create an Account
Follow the account creation wizard on the Bitfinex website to create a Bitfinex account.
You will need API credentials to deploy live algorithms. After you have an account, create API credentials and store them
somewhere safe.
Paper Trading
Bitfinex supports paper trading with only the TESTBTCTESTUSD and TESTBTCTESTUSDT securities. Follow these steps to
paper trade with Bitfinex:
1. Create a paper trading sub-account and refill the paper balance For instructions, see Paper Trading at Bitfinex on the
Bitfinex website.
2. Create an API key for your sub-account. For instructions, see How to create and revoke a Bitfinex API Key on the Bitfinex
website.
3. Use AccountType.Cash in your algorithms.
To paper trade securities other than TESTBTCTESTUSD and TESTBTCTESTUSDT, follow these steps to simulate paper trading
1. In the initialize method of your algorithm, set the Bitfinex brokerage model and your account type .
2. Deploy your algorithm with the QuantConnect Paper Trading brokerage .
Asset Classes
Data Providers
The QuantConnect data provider provides Crypto data during live trading.
Orders
We model the Bitfinex API by supporting several order types, order properties, and order updates. When you deploy live
Order Types
The following table describes the available order types for each asset class that our Bitfinex integration supports:
Market
Limit
Limit if touched
Stop market
Stop limit
Market on open
Market on close
Order Properties
We model custom order properties from the Bitfinex API. The following table describes the members of the
BitfinexOrderProperties object that you can set to customize order execution:
Property Data Type Description Default Value
A TimeInForce instruction
to apply to the order. The
following instructions are
supported:
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
Updates
Fees
To view the Bitfinex trading fees, see the Fees Schedule page on the Bitfinex website. To view how we model their fees, see
Fees .
To use the Bitfinex brokerage in a live algorithm, the following table shows the fee settings you need on your Account > Fees
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements.
Slippage
Orders through Bitfinex do not experience slippage in backtests. In paper trading and live trading, your orders may experience
slippage.
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
Note the following security and stability aspects of our Bitfinex integration.
Account Credentials
When you deploy live algorithms with Bitfinex, we don't save your brokerage account credentials.
API Outages
We call the Bitfinex API to place live trades. Sometimes the API may be down. Check the Bitfinex status page to see if the API is
currently working.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
All fiat and Crypto currencies are individual assets. When you buy a pair like BTCUSD, you trade USD for BTC. In this case, LEAN
removes some USD from your portfolio cashbook and adds some BTC. The virtual pair BTCUSD represents your position in that
trade, but the virtual pair doesn't actually exist. It simply represents an open trade. When you deploy a live algorithm, LEAN
populates your cashbook with the quantity of each currency, but it can't get your position of each virtual pair.
You must have an available live trading node for each live trading algorithm you deploy.
If you are deploying a paper trading algorithm without the QuantConnect Paper Trading brokerage, include the following
lines of code in the initialize method of your algorithm:
PY
self.set_account_currency('TESTUSD') # or 'TESTUSDT'
self.set_brokerage_model(BrokerageName.BITFINEX, AccountType.CASH)
self.set_benchmark(lambda x: 0) # or the Symbol of the TESTBTCTESTUSD/TESTBTCTESTUSDT securities
To generate your API credentials, see Account Types . Your account details are not saved on QuantConnect.
5. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
6. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
7. (Optional) Set up notifications .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
9. Click Deploy .
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
ByBit
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Bybit was co-founded by Ben Zhou in March 2018 with the goal to offer a professional platform where Crypto traders can find an
ultra-fast matching engine, excellent customer service, and multilingual community support. Bybit provides access to trading
Crypto and Crypto Futures for clients outside of excluded jurisdictions with low minimum deposits to set up an account. For
more information about Crypto and fiat deposits , see the Bybit documentation. Bybit also provides Crypto staking, initial DEX
To view the implementation of the Bybit brokerage integration, see the Lean.Brokerages.Bybit repository .
Account Types
Bybit supports cash and margin accounts. To set the account type in an algorithm, see the Bybit brokerage model
documentation .
Create an Account
Follow the How to Register an Account tutorial on the Bybit website to create a Bybit account.
You will need API credentials to deploy live algorithms. After you have an account, create API credentials and store them
146.59.85.21.
Select the Unified Trading check box.
Order
Positions
Trade
Paper Trading
Our integration doesn't support paper trading through the Bybit Demo Trading environment, but you can follow these steps to
simulate it:
1. In the initialize method of your algorithm, set the Bybit brokerage model.
2. Deploy your algorithm with the QuantConnect Paper Trading brokerage .
Asset Classes
Our Bybit integration supports trading Crypto and Crypto Futures .
Data Providers
The QuantConnect data provider provides Crypto data during live trading.
Orders
We model the Bybit API by supporting several order types, order properties, and order updates. When you deploy live
Order Types
The following table describes the available order types for each asset class that our Bybit integration supports:
Market
Limit
Stop market
Stop limit
Order Properties
We model custom order properties from the Bybit API. The following table describes the members of the BybitBrokerageModel
object that you can set to customize order execution:
Property Data Type Description Default Value
A TimeInForce instruction
to apply to the order. The
following instructions are
supported:
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
Updates
We model the Bybit API by supporting order updates for Crypto Future assets that have one of the following order states :
OrderStatus.NEW
OrderStatus.PARTIALLY_FILLED
OrderStatus.SUBMITTED
OrderStatus.FILLED
In cases where you can't update an order, you can cancel the existing order and then create a new order with the desired
arguments. For more information about this workaround, see the Workaround for Brokerages That Donʼt Support Updates .
Fees
To view the Bybit trading fees, see the Trading Fees Schedule page on the Bybit website. To view how we model their fees, see
Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements.
Slippage
Orders through Bybit do not experience slippage in backtests. In paper trading and live trading, your orders may experience
slippage.
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
When you deploy live algorithms with Bybit, we don't save your brokerage account credentials.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
Virtual Pairs
All fiat and Crypto currencies are individual assets. When you buy a pair like BTCUSD, you trade USD for BTC. In this case, LEAN
removes some USD from your portfolio cashbook and adds some BTC. The virtual pair BTCUSD represents your position in that
trade, but the virtual pair doesn't actually exist. It simply represents an open trade. When you deploy a live algorithm, LEAN
populates your cashbook with the quantity of each currency, but it can't get your position of each virtual pair.
3. On the Deploy Live page, click the Brokerage field and then click Bybit Exchange from the drop-down menu.
4. Enter your API key and secret.
To generate your API credentials, see Account Types . Your account details are not saved on QuantConnect.
5. Click the VIP Level field and then click your level from the drop-down menu.
For more information about VIP levels, see FAQ — Bybit VIP Program on the Bybit website.
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
8. If your brokerage account has existing position holdings, follow these steps ( see video ):
1. In the Algorithm Holdings State section, click Show .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
runtime statistics, your cashbook holdings, and your position holdings.
Troubleshooting
The following table describes errors you may see when deploying to Bybit:
If you need further support, open a new support ticker and add the live deployment with the error.
Live Trading > Brokerages > Coinbase
Brokerages
Coinbase
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Coinbase was founded by Brian Armstrong and Fred Ehrsam in 2012 with the goal to "increase economic freedom in the world".
Coinbase provides access to trading Crypto for clients in over 100 countries with no minimum deposit. Coinbase also provides a
self-hosted Crypto wallet, a Visa debit rewards card, and Bitcoin collateral-backed lines of credit.
To view the implementation of the Coinbase brokerage integration, see the Lean.Brokerages.Coinbase repository .
Account Types
Coinbase supports cash accounts. To set the account type in an algorithm, see the Coinbase brokerage model documentation .
Create an Account
Follow the Create a Coinbase account tutorial on the Coinbase website to create an account.
You will need API credentials to deploy live algorithms. After you have an account, see Getting Started with Advanced Trade
APIs in the Coinbase documentation to create API credentials. As you create the credentials, enable the View (read-only)
permission check box, enable the Trade (execute trades on your behalf) permission check box, and whilelist our IP address
(146.59.85.21). The following text is an example of the JSON file that contains your credentials:
organizations/2c7dhs-a3a3-4acf-aa0c-f68584f34c37/apiKeys/41090ffa-asd2-8080-815f-afaf63747e35
-----BEGIN EC PRIVATE KEY-----
\nMHcCAQEEIPcJGfXYEdLQi0iFj1xvGfPwuRNoebbwuKS4xL2NrlGWpoAoGCCqGSM49\nAwEHoUQDQgAEclN+asd/EhJ3UjOWkHmP/iqGBv5NkNJ75bUq\nVgxS4aU3/dj
----END EC PRIVATE KEY-----\n
organizations/2c7dhs-a3a3-4acf-aa0c-f68584f34c37/apiKeys/41090ffa-asd2-8080-815f-afaf63747e35
The API private key for Cloud Platform and Local Platform use is
MHcCAQEEIPcJGfXYEdLQi0iFj1xvGfPwuRNoebbwuKS4xL2NrlGWpoAoGCCqGSM49 AwEHoUQDQgAEclN+asd/EhJ3UjOWkHmP/iqGBv5NkNJ75bUq
VgxS4aU3/djHiIuSf27QasdOFIDGJLmOn7YiQ==
Note that for the Cloud Platform and Local Platform, you need to follow these steps to adjust the API private key:
For more information about Coinbase Advanced Trade APIs, see Getting Started .
Paper Trading
The Coinbase brokerage doesn't support paper trading, but you can follow these steps to simulate it:
1. In the initialize method of your algorithm, set the Coinbase brokerage model and your account type .
2. Deploy your algorithm with the QuantConnect Paper Trading brokerage .
Asset Classes
Data Providers
The QuantConnect data provider provides Crypto data during live trading.
Orders
We model the Coinbase API by supporting several order types, supporting order properties, and not supporting order updates.
When you deploy live algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our Coinbase integration supports:
Market
Limit
Stop market
Stop limit
Order Properties
We model custom order properties from the Coinbase API. The following table describes the members of the
CoinbaseOrderProperties object that you can set to customize order execution:
Property Data Type Description Default Value
A TimeInForce instruction
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce to apply to the order. The
NCELED
TimeInForce is supported.
Updates
We model the Coinbase API by not supporting order updates, but you can cancel an existing order and then create a new order
with the desired arguments. For more information about this workaround, see the Workaround for Brokerages That Donʼt
Support Updates .
Fees
To view the Coinbase trading fees, see the What are the fees on Coinbase? page on the Coinbase website. To view how we
model their fees, see Fees .
Margin
Slippage
Orders through Coinbase do not experience slippage in backtests. In paper trading and live trading, your orders may experience
slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
Note the following security and stability aspects of our Coinbase integration.
Account Credentials
When you deploy live algorithms with Coinbase, we don't save your brokerage account credentials.
API Outages
We call the Coinbase API to place live trades. Sometimes the API may be down. Check the Coinbase status page to see if the
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
Virtual Pairs
All fiat and Crypto currencies are individual assets. When you buy a pair like BTCUSD, you trade USD for BTC. In this case, LEAN
removes some USD from your portfolio cashbook and adds some BTC. The virtual pair BTCUSD represents your position in that
trade, but the virtual pair doesn't actually exist. It simply represents an open trade. When you deploy a live algorithm, LEAN
populates your cashbook with the quantity of each currency, but it can't get your position of each virtual pair.
You must have an available live trading node for each live trading algorithm you deploy.
To generate your API credentials, see the Create an Account section in the Account Types documentation. Your account
details are not saved on QuantConnect.
5. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
6. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
7. If your brokerage account has existing position holdings, follow these steps ( see video ):
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Interactive Brokers
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Interactive Brokers (IB) was founded by Thomas Peterffy in 1993 with the goal to "create technology to provide liquidity on
better terms. Compete on price, speed, size, diversity of global products and advanced trading tools". IB provides access to
trading Equities, ETFs, Options, Futures, Future Options, Forex, CFDs, Gold, Warrants, Bonds, and Mutual Funds for clients in
over 200 countries and territories with no minimum deposit. IB also provides paper trading, a trading platform, and educational
services.
To view the implementation of the IB brokerage integration, see the Lean.Brokerages.InteractiveBrokers repository .
Account Types
The IB API does not support the IBKR LITE plan. You need an IBKR PRO plan. Individual and Financial Advisor (FA) accounts are
available.
Individual Accounts
IB supports cash and margin accounts. To set the account type in an algorithm, see the IB brokerage model documentation .
FA Accounts
IB supports FA accounts for Trading Firm and Institution organizations. FA accounts enable certified professionals to use a
single trading algorithm to manage several client accounts. If your account code starts with F, FA, or I, then you have an FA
account. For more information about FA accounts, see Financial Advisors .
Create an Account
You need to open an IBKR Pro account to deploy algorithms with IB. The IB API does not support IBKR Lite accounts. To create
an IB account, see the Open an Account page on the IB website.
You need to activate IBKR Mobile Authentication (IB Key) to deploy live algorithms with your brokerage account. After you open
your account, follow the installation and activation instructions on the IB website.
Paper Trading
IB supports paper trading. Follow the Opening a Paper Trading Account page in the IB documentation to set up your paper
trading account.
If you want to use IB market data and trade with your paper trading account, follow these steps:
5. Click Save .
The IB paper trading environment simulates most aspects of a production Trader Workstation account, but you may encounter
some differences due to its construction as a simulator with no execution or clearing abilities.
LEAN doesn't support IB accounts in the Insured Bank Deposit Sweep Program because when LEAN reads your account
balances, it includes cash that's in the FDIC Sweep Account Cash, which isn't tradable. For example, if your account has
150KUSDofcash, only100K may be available to trade if $50K is in FDIC Sweep Account Cash.
Asset Classes
US Equities
Equity Options
Forex
Futures
Future Options
Indices
Index Options
CFD
You may not be able to trade all assets with IB. For example, if you live in the EU, you can't trade US ETFs. You can trade the
CFD equivalent . Check with your local regulators to know which assets you are allowed to trade. You may need to adjust
Data Providers
You might need to purchase an IB market data subscription for your trading. For more information about live data providers, see
Datasets .
Orders
We model the IB API by supporting several order types, order properties, and order updates. When you deploy live algorithms,
Order Types
The following table describes the order types that our IB integration supports: supports. For specific details about each order
The following table describes the available order types for each asset class that IB supports:
Equity Futures Index
Order Type US Equity Forex Futures CFD
Options Options Options
Market
Limit
Limit if
touched
Stop
market
Stopl imit
Trailing
stop
Market on
open
Market on
close
Combo
market
Combo limit
Combo leg
limit
Not
Exercise supported
Option for cash-
settled
Options
Order Properties
We model custom order properties from the IB API. The following table describes the members of the
InteractiveBrokersOrderProperties object that you can set to customize order execution. The table does not include the
A TimeInForce instruction
to apply to the order. The
following instructions are
supported:
TimeInForce.GOOD_TIL_CA
time_in_force
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
Updates
Fractional Trading
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Fill Time
Brokerage Liquidations
When IB liquidates part of your position, you receive an order event that contains the Brokerage Liquidation message.
Fees
To view the IB trading fees, see the Commissions page on the IB website. To view how we model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you have more than
$25,000 in your brokerage account, you can use the PatternDayTradingMarginModel to make use of the 4x intraday leverage
and 2x overnight leverage available on most brokerages from the PDT rule .
Slippage
Orders through IB do not experience slippage in backtests. In paper trading and live trading, your orders may experience
slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
Account Credentials
When you deploy live algorithms with IB, we don't save your brokerage account credentials.
API Outages
We call the IB API to place live trades. Sometimes the API may be down. Check the IB status page to see if the API is currently
working.
Connections
By default, IB only supports one connection at a time to your account. If you interfere with your brokerage account while an
algorithm is connected to it, the algorithm may stop executing. If you deploy a live running algorithm with your IB account and
want to open Trader Workstation (TWS) with the same IB account, create a second user on your IB account and log in to TWS
with the new user credentials. To run more than one algorithm with IB, open an IB subaccount for each additional algorithm.
If you can't log in to TWS with your credentials, contact IB. If you can log in to TWS but can't log in to the deployment wizard,
SMS 2FA
Our IB integration doesn't support Two-Factor Authentication (2FA) via SMS or the Online Security Code Card. Use the IB Key
System Resets
You'll receive a notification on your IB Key device every Sunday to re-authenticate the connection between IB and your live
algorithm. When you deploy your algorithm , you can select a time on Sunday to receive the notification. If you don't re-
authenticate before the timeout period, your algorithm quits executing. Ensure your IB Key device has sufficient battery for the
time you expect to receive the notification. If you don't receive a notification, see I am not receiving IBKR Mobile notifications on
the IB website.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click Interactive Brokers from the drop-down menu.
4. Enter your IB user name, ID, and password.
if ($localPlatform) { include(DOCS_RESOURCES."/brokerages/interactive-brokers/paper-trading-data-feeds.html"); } ?>
5. In the Weekly Restart UTC field, enter the Coordinated Universal Time (UTC) time of when you want to receive notifications
on Sundays to re-authenticate your account connection.
For example, 4 PM UTC is equivalent to 11 AM Eastern Standard Time, 12 PM Eastern Daylight Time, 8 AM Pacific Standard
Time, and 9 AM Pacific Daylight Time. To convert from UTC to a different time zone, see the UTC Time Zone Converter on
the UTC Time website.
If your IB account has 2FA enabled, you receive a notification on your IB Key device every Sunday to re-authenticate the
connection between IB and your live algorithm. If you don't re-authenticate before the timeout period, your algorithm quits
executing.
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
In most cases, we suggest using both the QC and IB data providers .
If you use IB data provider and trade with a paper trading account, you need to share the market data subscription with
your paper trading account. For instructions on sharing market data subscription, see Account Types .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
runtime statistics, your cashbook holdings, and your position holdings.
Troubleshooting
The following table describes errors you may see when deploying to IB:
Error Message(s) Possible Cause and Fix
To view the description of less common errors, see Error Codes in the TWS API Documentation. If you need further support,
open a new support ticker and add the live deployment with the error.
Live Trading > Brokerages > Kraken
Brokerages
Kraken
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Kraken was founded by Jesse Powell in 2011 with the goal to "accelerate the adoption of cryptocurrency so that you and the
rest of the world can achieve financial freedom and inclusion". Kraken provides access to trading Crypto through spot and
Futures markets for clients with a minimum deposit of around 0 − 150 USD for currency and Crypto deposits . Kraken also
provides staking services, educational content, and a developer grant program.
To view the implementation of the Kraken brokerage integration, see the Lean.Brokerages.Kraken repository .
Account Types
Kraken supports cash and margin accounts. To set the account type in an algorithm, see the Kraken brokerage model
documentation .
Create an Account
Follow the account creation wizard on the Kraken website to create a Kraken account.
You will need API credentials to deploy live algorithms with your brokerage account. After you open your account, create API
credentials and store them somewhere safe.
Paper Trading
The Kraken brokerage doesn't support paper trading, but you can follow these steps to simulate it:
1. In the initialize method of your algorithm, set the Kraken brokerage model and your account type .
Asset Classes
Data Providers
The QuantConnect data provider provides Crypto data during live trading.
Orders
We model the Kraken API by supporting several order types, supporting order properties, and not supporting order updates.
When you deploy live algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our Kraken integration supports:
Order Type Crypto
Market
Limit
Limit if touched
Stop market
Stop limit
Order Properties
We model custom order properties from the Kraken API. The following table describes the members of the
KrakenOrderProperties object that you can set to customize order execution:
Property Data Type Description Default Value
A TimeInForce instruction
to apply to the order. The
following instructions are
supported:
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
Updates
We model the Kraken API by not supporting order updates, but you can cancel an existing order and then create a new order
with the desired arguments. For more information about this workaround, see the Workaround for Brokerages That Donʼt
Support Updates .
Fees
To view the Kraken trading fees, see the Fee Schedule page on the Kraken website. To view how we model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements.
Slippage
Orders through Kraken do not experience slippage in backtests. In live trading, your orders may experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
Note the following security and stability aspects of our Kraken integration.
Account Credentials
When you deploy live algorithms with Kraken, we don't save your brokerage account credentials.
API Outages
We call the Kraken API to place live trades. Sometimes the API may be down. Check the Kraken status page to see if the API is
currently working.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
Virtual Pairs
All fiat and Crypto currencies are individual assets. When you buy a pair like BTCUSD, you trade USD for BTC. In this case, LEAN
removes some USD from your portfolio cashbook and adds some BTC. The virtual pair BTCUSD represents your position in that
trade, but the virtual pair doesn't actually exist. It simply represents an open trade. When you deploy a live algorithm, LEAN
populates your cashbook with the quantity of each currency, but it can't get your position of each virtual pair.
You must have an available live trading node for each live trading algorithm you deploy.
Gather your API credentials from the API Management Settings page on the Kraken website. Your account details are not
saved on QuantConnect.
5. Click the Verification Tier field and then click your verification tier from the drop-down menu.
For more information about verification tiers, see Verification levels explained on the Kraken website.
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
10. Click Deploy .
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Oanda
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Oanda was founded by Dr. Michael Stumm and Dr. Richard Olsen in 1995 with the goal to "transform all aspects of how the
world interacts with currencies, whether that be trading or utilizing currency data and information". Oanda provides access to
trading Forex and CFDs for clients in over 240 countries and territories with no minimum deposit . Oanda also provides demo
accounts, advanced charting tools, and educational content
To view the implementation of the Oanda brokerage integration, see the Lean.Brokerages.OANDA repository .
Account Types
Oanda supports margin accounts. To set the account type in an algorithm, see the Oanda brokerage model documentation .
Create an Account
Follow the How to open an account page on the Oanda website to open an Oanda account.
You will need your account number and access token to deploy live algorithms. To get your account number, open the Account
Statement page on the Oanda website. Your account number is formatted as ###-###-######-### . To get your access token,
open the Manage API Access on the Oanda website.
Important note for European Union residents: On March 17th, 2023, OANDA Europe Markets Ltd. ("OEML") closed operations
and transferred accounts to OANDA TMS Brokers S.A. ("OANDA TMS") 1 . OANDA TWS does not offer REST API endpoints for
live trading. EU residents can trade with OANDA if they can open an account with another member of the OANDA Group, for
example, US citizens.
Paper Trading
Oanda supports paper trading. Follow these steps to set up an Oanda paper trading account:
Your access token displays. Store it somewhere safe. You need your access token to deploy an algorithm with your paper
trading account.
7. On the My Funds page, in the Account Summary section, note your v20 Account Number.
You need your v20 Account Number to deploy an algorithm with your paper trading account.
Asset Classes
Data Providers
The QuantConnect data provider providers Forex and CFD trading data during live trading.
Orders
We model the Oanda API by supporting several order types, a TimeInForce order instruction, and order updates. When you
deploy live algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our Oanda integration supports:
Market
Limit
Stop market
Time In Force
Updates
Fees
To view the Oanda trading fees, see the Our Charges and Fees page on the Oanda website. To view how we model their fees,
see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements.
Slippage
Orders through Oanda do not experience slippage in backtests. In paper trading and live trading, your orders may experience
slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
Note the following security and stability aspects of our Oanda integration.
Account Credentials
When you deploy live algorithms with Oanda, we don't save your brokerage account credentials.
API Outages
We call the Oanda API to place live trades. Sometimes the API may be down. Check the Oanda status page to see if the API is
currently working.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
5. Click the Environment field and then click one of the environments.
Environment Description
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
8. (Optional) Set up notifications .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Samco
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Samco was founded by Jimeet Modi in 2015 with a mission of providing retail investors access to sophisticated financial
technology that can assist retail investors in creating wealth at a low cost. Samco provides access to India Equities for clients in
India with no minimum balance. Samco also provides stock ratings, mutual funds, and a mini-portfolio investment platform.
To view the implementation of the Samco brokerage integration, see the Lean.Brokerages.Samco repository .
Account Types
Samco supports cash and margin accounts. To set the account type in an algorithm, see the Samco brokerage model
documentation .
Samco only supports trading in Indian Rupees, so set the account currency of your algorithm to INR.
Create an Account
Follow the account creation wizard on the Samco website to create a Samco account.
Paper Trading
Asset Classes
Indian Equities
Data Providers
The Samco data provider provides India Equities data during live trading.
Orders
We model the Samco API by supporting several order types, supporting order properties, and order updates. When you deploy
live algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our Samco integration supports:
Order Type India Equity
Market
Limit
Stop market
Order Properties
We model custom order properties from the Samco API. The following table describes the members of the
IndiaOrderProperties object that you can set to customize order execution:
Exchange.BSE
A product_type instruction
to apply to the order. The
IndiaOrderProperties.In
product_type str
diaProductType
enumeration has the
following members:
A TimeInForce instruction
to apply to the order. The
following instructions are
available:
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
Updates
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Fees
To view the Samco trading fees, see the Regulatory and Exchanges Charges page on the Samco website. To view how we
model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements.
Slippage
Orders through Samco do not experience slippage in backtests. In live trading, your orders may experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
When you deploy live algorithms with Samco, we don't save your brokerage account credentials.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click Samco from the drop-down menu.
4. Enter your client ID, password, and date of birth.
5. Click the Product Type field and then click one of the following options from the drop-down menu:
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. In the Data Provider section, click Show and then change the QuantConnect data provider to the Samco data provider.
8. (Optional) Set up notifications .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
runtime statistics, your cashbook holdings, and your position holdings.
Live Trading > Brokerages > TD Ameritrade
Brokerages
TD Ameritrade
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
TD Ameritrade was founded by Joe Ricketts in 1971 with the goal to make "smart investors smarter through award-winning
trading technology, education, and service". TD Ameritrade provides access to trading Equities, Options, Futures, Forex, Crypto,
and other assets for clients with no minimum deposit . TD Ameritrade also provides a collateral lending program, education
To view the implementation of the TD Ameritrade brokerage integration, see the Lean.Brokerages.TDAmeritrade repository .
Account Types
TD Ameritrade supports cash and margin accounts. To set the account type in an algorithm, see the TD Ameritrade brokerage
model documentation .
Create an Account
Follow the account creation wizard on the TD Ameritrade website to create a TD Ameritrade account.
You will need API credentials to deploy live algorithms with your brokerage account. You can't create new API credentials due to
If you have the API key, follow these steps to retrieve the access token:
%40AMER.OAUTHAP&response_type=code&redirect_uri=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Flocalhost.
2. On the Secure Log-In page, log in with a TD Ameritrade client account.
3. Click Allow .
4. Get the access token from the page URL (for example, http://localhost/?code= this-blob-is-your-access-code ).
In this tutorial, the access token is decoded. QuantConnect's implementation requires the encoded access token (see this-
blob-is-your-access-code above).
Paper Trading
The TD Ameritrade API doesn't support paper trading, but you can follow these steps to simulate it:
1. In the initialize method of your algorithm, set the TD Ameritrade brokerage model and your account type .
2. Deploy your algorithm with the QuantConnect Paper Trading brokerage .
Asset Classes
You may not be able to trade all assets with TD Ameritrade. For example, if you live in the EU, you can't trade US ETFs. Check
with your local regulators to know which assets you are allowed to trade. You may need to adjust settings in your brokerage
account to live trade some assets.
Data Providers
The QuantConnect data provider provides US Equity data during live trading.
Orders
We model the TD Ameritrade API by supporting several order types, the TimeInForce order property, and order updates. When
you deploy live algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our TD Ameritrade integration supports:
Market
Limit
Stop market
Stop limit
Time In Force
DAY
GOOD_TIL_CANCELED
good_til_date
Updates
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Fees
To view the TD Ameritrade trading fees, see the Pricing page on the TD Ameritrade website. To view how we model their fees,
see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you have more than
$25,000 in your brokerage account, you can use the PatternDayTradingMarginModel to make use of the 4x intraday leverage
and 2x overnight leverage available on most brokerages from the PDT rule .
Slippage
Orders through TD Ameritrade do not experience slippage in backtests. In paper trading and live trading, your orders may
experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
When you deploy live algorithms with TD Ameritrade, we don't save your brokerage account credentials.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click TD Ameritrade from the drop-down menu.
4. Enter your TD Ameritrade account ID, key, and token.
To get your account credentials, see Account Types . Your account details are not saved on QuantConnect.
5. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
6. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
9. Click Deploy .
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
runtime statistics, your cashbook holdings, and your position holdings.
Live Trading > Brokerages > TradeStation
Brokerages
TradeStation
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
TradeStation was founded by brothers William (Bill) and Rafael (Ralph) Cruz in 1982 as Omega Research, Inc. In 2001, the
company converted itself from a trading software company to an online securities brokerage and renamed itself "TradeStation"
with the mission to "create the ultimate trading experience". TradeStation provides access to trading Equities, Equity Options,
and Futures for clients in over 150 markets, 34 countries, and 27 currencies. TradeStation also delivers custody, clearing,
To view the implementation of the TradeStation brokerage integration, see the Lean.Brokerages.TradeStation repository .
Account Types
TradeStation supports cash and margin accounts. To set the account type in an algorithm, see the TradeStation brokerage
model documentation .
To create a TradeStation account, follow the account creation wizard on the TradeStation website.
Asset Classes
US Equities
Equity Options
Futures
You may not be able to trade all assets with TradeStation. For example, if you live in the EU, you can't trade US ETFs. Check
with your local regulators to know which assets you are allowed to trade. You may need to adjust settings in your brokerage
Data Providers
You might need to purchase a TradeStation market data subscription for your trading. For more information about live data
providers, see Datasets .
Orders
We model the TradeStation API by supporting several order types, order properties, and order updates. When you deploy live
Order Types
The following table describes the available order types for each asset class that our TradeStation integration supports:
Order Type Equity Equity Options Futures
Market
Limit
Stop market
Stop limit
Market on Open
Market on Close
Combo market
Combo limit
Time In Force
DAY
GOOD_TIL_CANCELED
good_til_date
Updates
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Fees
To view the TradeStation trading fees, see the Pricing page on the TradeStation website. To view how we model their fees, see
Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you have more than
$25,000 in your brokerage account, you can use the PatternDayTradingMarginModel to make use of the 4x intraday leverage
and 2x overnight leverage available on most brokerages from the PDT rule .
Slippage
Orders through TradeStation do not experience slippage in backtests. In live trading, your orders may experience slippage.
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
When you deploy live algorithms with TradeStation, we don't save your brokerage account credentials.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click TradeStation from the drop-down menu.
4. Click on the Environment field and then click one of the environments.
Environment Description
authorization.
7. Click on the Select Account Id field and then click on one of your accounts.
8. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
9. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
In most cases, we suggest using the QuantConnect data provider , the TradeStation data provider , or both. The order you
set them in the deployment wizard defines their order of precedence in Lean.
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Tradier
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Tradier was founded by Dan Raju, Peter Laptewicz, Jason Barry, Jeyashree Chidambaram, and Steve Agalloco in 2012 with the
goal to "deliver a choice of low-cost, high-value brokerage services to traders". Tradier provides access to trading Equities and
Options for clients in over 250 countries and territories with no minimum deposit for cash accounts . Tradier also delivers
To view the implementation of the Tradier brokerage integration, see the Lean.Brokerages.Tradier repository .
Account Types
Tradier supports cash and margin accounts. To set the account type in an algorithm, see the Tradier brokerage model
documentation .
Create an Account
Follow the account creation wizard on the Tradier website to create a Tradier account.
You will need your account ID and access token to deploy live algorithms. After you have an account, get your account ID and
token from the Settings > API Access page on the Tradier website. Your account ID is the alpha-numeric code in a drop-down
field on the page.
Paper Trading
Account activity is unavailable since this information is populated from Tradier's clearing firm.
Streaming Tradier market data is unavailable due to exchange restrictions related to delayed data.
To get your paper trading account number and access token, open the API Access page on the Tradier website and then scroll
down to the Sandbox Account Access (Paper Trading) section.
If you trade Equities, you can use the QuantConnect data provider to get real-time data. If you trade Options, you must use
delayed data from the Tradier data provider . If you trade Equities and Options, use both data providers. However, if you trade
with the demo environment, Tradier doesn't offer streaming market data due to exchange restrictions related to delayed data,
Asset Classes
You may not be able to trade all assets with Tradier. For example, if you live in the EU, you can't trade US ETFs. Check with your
local regulators to know which assets you are allowed to trade. You may need to adjust settings in your brokerage account to
live trade some assets.
Data Providers
You might need to purchase a Tradier market data subscription for your trading. For more information about live data providers,
see Datasets .
Orders
We model the Tradier API by supporting several order types and the TimeInForce order property. Tradier partially supports
order updates, but does not support trading during extended market hours. When you deploy live algorithms, you can place
manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our Tradier integration supports:
Market
Limit
Stop market
Stop limit
Time In Force
DAY
Updates
We model the Tradier API by supporting most order updates . To update the quantity of an order, cancel the order and then
submit a new order with the desired quantity. For more information about this workaround, see the Workaround for Brokerages
Tradier doesn't support extended market hours trading. If you place an order outside of regular trading hours, the order will be
Automatic Cancellations
If you have open orders for a security when it performs a reverse split, Tradier automatically cancels your orders.
Errors
To view the order-related error codes from Tradier, see Error Responses in their documentation.
Fees
To view the Tradier trading fees, see the Pricing page on the Tradier website. To view how we model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you have more than
$25,000 in your brokerage account, you can use the PatternDayTradingMarginModel to make use of the 4x intraday leverage
and 2x overnight leverage available on most brokerages from the PDT rule .
Slippage
Orders through Tradier do not experience slippage in backtests. In live trading, your orders may experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
Note the following security and stability aspects of our Tradier integration.
Account Credentials
When you deploy live algorithms with Tradier, we don't save your brokerage account credentials.
API Outages
We call the Tradier API to place live trades. Sometimes the API may be down. Check the Tradier status page to see if the API is
currently working.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
3. On the Deploy Live page, click the Brokerage field and then click Tradier from the drop-down menu.
4. Enter your Tradier account Id and token.
To get your account ID and token, see the Create an Account section in the Account Types documentation. Your account
5. Click the Environment field and then click one of the environments from the drop-down menu.
Environment Description
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
In most cases, we suggest using the QuantConnect data provider , the Tradier data provider , or both. The order you set
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Trading Technologies
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Trading Technologies (TT) was founded by Gary Kemp in 1994 with the goal to create professional trading software,
infrastructure, and data solutions for a wide variety of users. TT provides access to trading Futures, Options, and Crypto. TT
also provides a charting platform, infrastructure services, and risk management tools. TT is not actually a brokerage. The firm is
Account Types
The TradingTechnologiesBrokerageModel does not have specific modeling for fees and slippage because TT is an order router
and can execute on many exchanges and brokerages. To set the brokerage model and account type in an algorithm, see the TT
brokerage model documentation . In live trading, TT reports the total fees of your orders after each order fill. Pass a different
BrokerageName to set_brokerage_model to backtest your algorithm with fee and slippage modeling. The brokerage model you
set should support the asset classes and orders in your algorithm.
Create an Account
Paper Trading
Trading Technologies provides a separate User Acceptance Testing (UAT) Certification environment at uat.trade.tt . The TT
UAT environment connects to actual exchange certification environments for both market data and order routing.
To create a UAT account, follow the UAT account creation wizard on the TT website.
After you create your TT account, see Create TT Users to create your live deployment credentials.
Asset Classes
Data Providers
The QuantConnect data provider provides Futures data during live trading.
Orders
We model the TT API by supporting several order types, the TimeInForce order property, and order updates. When you deploy
live algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our TT integration supports:
Market
Limit
Stop market
Stop limit
If you are buying (selling) with a stop_market_order or a stop_limit_order , the stop price of the order must be greater
Time In Force
We model the TT API by supporting the DAY and GOOD_TIL_CANCELED TimeInForce order properties.
Updates
Fees
To view the TT trading fees, see the Pricing page on the TT website. To view how we model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements.
Slippage
Orders through TT do not experience slippage in backtests. In live trading, your orders may experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Account Credentials
When you deploy live algorithms with TT, we don't save your brokerage account credentials.
API Outages
We call the TT API to place live trades. Sometimes the API may be down. Check the TT status page to see if the API is currently
working.
Deposits and Withdrawals
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
Create TT Users
Follow these steps to create your TT user name, account name, remote comp id, session password, app key, and app secret:
Part 1: Sign in
On the TT website, sign in to your TT account or your TT UAT account . If you don't have an account, see Account Types to
create one.
3. In the New User window, click the radio button that corresponds to user's employment status in your company and then
click Continue .
4. On the New User page, fill in the form with information about the new user.
The name that you put in the Username field is the username you will need when deploying live algorithms with LEAN.
In the Status section, click the Trade Mode field and then click TT Pro from the drop-down menu.
In the Advanced Settings section, select the Can create TT Rest API Key and Can create TT.NET SDK Client Side key check
boxes.
5. Click Create .
6. On the Setup page, click the new user in the table and then click Send Invitation .
1. On the Setup page, click the new user in the table and then click the App Keys tab.
2. In the App Keys section, click New .
3. In the Create New Application Key window, enter an application key name (for example, qb_alex_app_key ), select TT REST
API for application key type and then click Create .
4. Click Copy Secret to Clipboard and save it somewhere safe, like a text editor.
The text you copy contains the App Key and App Secret separated by a colon. For example, a79b17df-b249-45a1-9d12-
d5bbd2964626:424cc666-42aa-4125-a48e-13f630afd5a1.
5. Click OK .
Click Create .
On the Account page, click the new account in the table and then click the Users tab.
3. On the New FIX Sessions page, fill in the form with the following information:
Set the FIX Session Name to something representative (for example, QC).
In the FIX Type field, select FIX Order Routing .
This Id is the remote comp id you will use when deploying live algorithms with LEAN.
The session password you set in this form is the password you will use when deploying live algorithms with LEAN.
Select the Send unsolicited order and fill message check box.
Click Create .
On the FIX Sessions page, click the new FIX session in the table and then click the Users tab.
In the Users section, click +Add .
In the Select Users window, click the new user and then click Select .
Click Save Changes .
tabs.
You must have an available live trading node for each live trading algorithm you deploy.
4. Enter your TT user name, account name, remote comp id, session password, app key, and app secret.
Our TT integration routes orders via the TT FIX 4.4 Connection. Contact your TT representative to set the exchange where
you would like your orders sent. Your account details are not saved on QuantConnect.
Our integration fetches your positions using the REST endpoint, so the app key and app secret are your REST App
credentials.
5. Click the Environment field and then click one of the environments from the drop-down menu.
6. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
7. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
8. If your brokerage account has existing cash holdings, follow these steps ( see video ):
1. In the Algorithm Cash State section, click Show .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
runtime statistics, your cashbook holdings, and your position holdings.
Live Trading > Brokerages > Wolverine
Brokerages
Wolverine
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Wolverine Execution Services is a diversified financial institution specializing in proprietary trading, asset management, order
execution services, and technology solutions. They are recognized as a market leader in derivatives valuation, trading, and
value-added order execution across global Equity, Options, and Futures markets. Their focus on innovation, achievement, and
integrity serves the interests of their clients and colleagues. Wolverine Execution Services is headquartered in Chicago, with
branch offices in New York, San Francisco, and London. They serve funds that have at least $5M assets under management.
To view the implementation of the Wolverine Execution Services brokerage integration, see the Lean.Brokerages.Wolverine
repository .
Account Types
Wolverine Execution Services supports cash and margin accounts. To set the account type in an algorithm, see the Wolverine
brokerage model documentation .
Create an Account
To create a Wolverine Execution Services account, contact their staff through the TradeWex website.
Paper Trading
Wolverine Execution Services doesn't support paper trading, but you can follow these steps to simulate it:
1. In the initialize method of your algorithm, set the Wolverine brokerage model and your account type .
2. Deploy your algorithm with the QuantConnect Paper Trading brokerage .
Asset Classes
You may not be able to trade all assets with Wolverine. For example, if you live in the EU, you can't trade US ETFs. Check with
your local regulators to know which assets you are allowed to trade. You may need to adjust settings in your brokerage account
Data Providers
The QuantConnect data provider provides US Equities data during live trading.
Orders
We model the Wolverine Execution Services API by supporting order types, but not order updates or extended market hours
trading. When you deploy live algorithms, you can place manual orders through the IDE.
Order Types
Our Wolverine Execution Services integration supports market orders .
Updates
We model the Wolverine Execution Services API by not supporting order updates.
Wolverine Execution Services doesn't support extended market hours trading. If you place an order outside of regular trading
Order Properties
We model custom order properties from the Wolverine API. The following table describes the members of the
Property Description
time_in_force TimeInForce
exchange Exchange
exchange_post_fix str
Fees
Wolverine Execution Services charge $0.005 per share you trade. To view how we model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. If you have more than
$25,000 in your brokerage account, you can use the PatternDayTradingMarginModel to make use of the 4x intraday leverage
and 2x overnight leverage available on most brokerages from the PDT rule .
Slippage
Orders through Wolverine Execution Services do not experience slippage in backtests. In live trading, your orders may
experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
To view how we model Wolverine Execution Services order fills, see Fills .
Settlements
When you deploy live algorithms with Wolverine Execution Services, we don't save your brokerage account credentials.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
The following algorithm demonstrates the functionality of the Wolverine Execution Services brokerage:
You must have an available live trading node for each live trading algorithm you deploy.
Follow these steps to deploy a live algorithm:
3. On the Deploy Live page, click the Brokerage field and then click Wolverine Execution Services from the drop-down menu.
4. Enter your Wolverine Execution Services credentials.
5. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
6. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
7. If your brokerage account has existing cash holdings, follow these steps ( see video ):
3. Enter the currency ticker (for example, USD or CAD) and a quantity.
8. If your brokerage account has existing position holdings, follow these steps ( see video ):
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Zerodha
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
Zerodha was founded by Nithin Kamath in 2010 with the goal to break all barriers that traders and investors face in India in terms
of cost, support, and technology. Zerodha provides access to India Equities for clients in India with no minimum balance
required. Zerodha also provides a mutual fund investment platform and an interactive portfolio dashboard.
To view the implementation of the Zerodha brokerage integration, see the Lean.Brokerages.Zerodha repository .
Account Types
Zerodha supports cash and margin accounts. To set the account type in an algorithm, see the Zerodha brokerage model
documentation .
Zerodha only supports trading Indian Rupees, so set the account currency of your algorithm to INR.
Create an Account
To create a Zerodha account, follow the account creation wizard on the Zerodha website.
You will need API credentials to deploy live algorithms with your brokerage account. After you open your Zerodha account,
For the Redirect URL field, if you don't have a redirect URL, use https://zerodha.com.
4. Click Create .
webbrowser.open(kite.login_url())
request_token = input("Enter your request_token: ")
api_secret = input("Enter your API secret: ")
Input the data that the script requests. When the script opens your redirect URL page, log in and then copy the request
token that's in the URL parameters.
When the script prints your access token. Copy and save it somewhere safe.
Paper Trading
Asset Classes
Data Providers
The Zerodha data provider provides India Equities data during live trading.
Orders
We model the Zerodha API by supporting several order types, order properties, and order updates. When you deploy live
algorithms, you can place manual orders through the IDE.
Order Types
The following table describes the available order types for each asset class that our Zerodha integration supports:
Market
Limit
Stop market
Stop limit
Order Properties
We model custom order properties from the Zerodha API. The following table describes the members of the
Exchange.BSE
A product_type instruction
to apply to the order. The
IndiaOrderProperties.In
product_type str
diaProductType
enumeration has the
following members:
A TimeInForce instruction
to apply to the order. The
following instructions are
available:
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
Updates
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Fees
To view the Zerodha trading fees, see the Charges page on the Zerodha website. To view how we model their fees, see Fees .
Margin
We model buying power and margin calls to ensure your algorithm stays within the margin requirements. The amount of margin
available depends on the Equity and product type. To check the amount of margin available for each asset, see the Margin
Calculator on the Zerodha website.
Slippage
Orders through Zerodha do not experience slippage in backtests. In live trading, your orders may experience slippage.
Fills
We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the
quantity available at the top of the order book, your orders are filled according to what is available in the order book.
Settlements
When you deploy live algorithms with Zerodha, we don't save your brokerage account credentials.
You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account.
We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time
(ET).
Demo Algorithm
You must have an available live trading node for each live trading algorithm you deploy.
5. Click the Product Type field and then click one of the following options from the drop-down menu:
6. Click the Trading Segment field and then click one of the following options from the drop-down menu:
For trading Equities on the National Stock Exchange of India (NSE) or the Bombay Stock
EQUITY
Exchange (BSE)
COMMODITY For trading commodities on the Multi Commodity Exchange of India (MCX)
7. Click the History Subscription field and then click Yes or No from the drop-down menu.
Use this field to declare whether you have a history API subscription on your Kite Connect account.
8. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
9. In the Data Provider section, click Show and then change the QuantConnect data provider to the Zerodha data provider.
10. (Optional) Set up notifications .
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
Bloomberg EMSX
Introduction
QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more
than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.
QuantConnect can integrate with the Bloomberg™ Server API (SAPI) or Desktop API (DAPI) in different cloud environments. This
integration allows research, backtesting, opitimization, and live trading through the Bloomberg APIs. Terminal Link is in no way
affiliated with or endorsed by Bloomberg™; it is simply an add-on. Add Terminal link to your organization to access the 1,300+
prime brokerages in the Bloomberg Execution Management System network.
QuantConnect Cloud only supports routing trades to the Bloomberg™ Server API. In this environment, you can route orders to
any of the prime brokerages that Bloomberg supports and you get to leverage the data, server management, and data
management from QuantConnect, giving you the best of both worlds. To use Terminal Link, you need to be a member of an
Account Types
Terminal Link supports order routing via the Bloomberg™ EMSX network. It's a margin account that's similiar to a FIX API, where
you set the buying power in the wizard when you're deploying to a professional prime brokerage account.
Data Providers
To use the Bloomberg™ EMSX network and SAPI on QuantConnect, you must use the QuantConnect data provider .
Asset Classes
Equities
Equity Options
Futures
Index Options
Orders
Order Types
The following table describes the available order types for each asset class that Terminal Link supports:
Order Type Equity Equity Options Futures Index Options
Market
Limit
Stop market
Stop limit
Order Properties
We model custom order properties from the Bloomberg EMSX API. The following table describes the members of the
TerminalLinkOrderProperties object that you can set to customize order execution:
A TimeInForce instruction
to apply to the order. The
following instructions are
supported:
TimeInForce.GOOD_TIL_CA
time_in_force TimeInForce
DAY NCELED
GOOD_TIL_CANCELED
good_til_date
An OrderPosition object
that specifies the position
side in the order direction
(buy-to-open, sell-to-close,
etc.) instead of the default
position_side OrderPosition/NoneType
(buy, sell). This member
has precedence over
automatic_position_side
s
.
For more information about the format that the Bloomberg EMSX API expects, see Create Order and Route Extended Request in
the EMSX API documentation and the createOrderAndRouteWithStrat documentation on the MathWorks website.
Monitor Fills
Terminal Link allows you to monitor orders as they fill through order events .
Updates
Terminal Link doesn't support order updates , but you can cancel an existing order and then create a new order with the desired
arguments. For more information about this workaround, see the Workaround for Brokerages That Donʼt Support Updates .
Cancellations
Handling Splits
If you're using raw data normalization and you have active orders with a limit, stop, or trigger price in the market for a US Equity
when a stock split occurs, the following properties of your orders automatically adjust to reflect the stock split:
Quantity
Limit price
Stop price
Trigger price
Brokerage-Side Orders
By default, your algorithm doesn't record orders that you submit to your account by third-parties instead of through LEAN. To
Fees
Orders filled with Terminal Link are subject to the fees of the Bloomberg™ Execution Management System and your prime
brokerage destination. To view how we model their fees, see Fees .
Margin
Set your cash and holdings state in the wizard when you deploy to the Bloomberg™ EMSX environment. We use these states to
model buying power and margin calls to ensure your algorithm stays within the margin requirements.
Fills
In live trading, LEAN routes your orders to the exchange or prime brokerage you select. The order fills and then routes back to
you.
To view how we model Bloomberg™ Execution Management System order fills, see Fills .
Compliance
Bloomberg™ is not affiliated with QuantConnect, nor does it endorse Terminal Link. A Bloomberg™ SAPI permission and EMSX
permission is required to use this brokerage connection, along with a Trading Firm or Institutional subscription on
QuantConnect.
All users of the integration must hold a Bloomberg License to be defined as an "Entitled User".
The Bloomberg SAPI will only be used for order routing and no data is permitted. The Bloomberg SAPI cannot be used for
black-box trading.
The following table shows the activities each of the Bloomberg technologies support:
Server API
Set Up SAPI
The following few sections explain how to download the Bloomberg™ Server API (SAPI), install it on a cloud server, and add
firewall rules so it can connect to QuantConnect Cloud.
Download SAPI
5. On the EMSX API page, under the Server API Process section, click Link .
6. On the Server API Software Install page, click the correct download icons.
7. Click System Requirements .
Install the SAPI
For more information about this step, see How to install serverapi.exe in the EMSX API Programmers Guide. At the end of
the installion, you get a registration key.
1. Contact Bloomberg Support and ask them to enable the Server Side EMSX API.
2. Ask Bloomberg Support for your unique user identifier (UUID).
Save it somewhere safe. You will need it when you deploy live algorithms.
3. Contact the EMSX brokerage you plan to use and give them your UUID.
1. Click Start .
2. Enter Windows Defender Firewall with Advanced Security and then press Enter .
6. In the Windows Defender Firewall with Advanced Security window, double-click the serverapi row.
7. In the serverapi window, click the Scope tab.
8. In the Remote IP address section, add the QuantConnect Cloud IP address, 207.182.16.137.
9. Click OK .
10. Add the QuantConnect Cloud IP address to the other row in the table that has the serverapi name.
You need to set up the Bloomberg SAPI before you can deploy cloud algorithms with Terminal Link.
You must have an available live trading node for each live trading algorithm you deploy.
4. Click the Connection Type field and then click SAPI from the drop-down menu.
5. In the Server Auth Id field, enter your unique user identifier (UUID).
The UUID is a unique integer identifier that's assigned to each Bloomberg Anywhere user. If you don't know your UUID,
contact Bloomberg.
7. In the Server Port field, enter the port where SAPI is listening.
8. In the Server Host field, enter the public IP address of the SAPI AWS server.
9. In the EMSX Account field, enter the account to which LEAN should route orders.
10. In the EMSX Team field, enter the team account to receive events of your team's orders.
The default value is empty, which means LEAN disregards these notifications.
11. In the OpenFIGI Api Key field, enter your API key.
12. Click the Environment field and then click one of the options from the drop-down menu.
13. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
14. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
15. If your brokerage account has existing cash holdings, follow these steps ( see video ):
3. Enter the currency ticker (for example, USD or CAD) and a quantity.
16. If your brokerage account has existing position holdings, follow these steps ( see video ):
By enabling automatic restarts , the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error.
This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.
The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your
brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the
Brokerages
FIX Connections
Introduction
The Financial Information eXchange (FIX) is the standard electronic communications protocol for front-office messaging. The
FIX community includes about 300 firms, including major investment banks.
Supported Connections
Brokerages
Unsupported Brokerages
Introduction
New brokerages can be added if the brokerage has an API that is popular, stable, and officially supported by the brokerage. To
add a new brokerage to the platform, contact us .
Live Trading > Deployment
Live Trading
Deployment
Introduction
Deploy your trading algorithms live to receive real-time market data and submit orders on our co-located servers. As your
algorithms run, you can view their performance in the Algorithm Lab. Since the algorithms run in QuantConnect Cloud, you can
close the IDE without interrupting the execution of your algorithms. Deploying your algorithms to live trading through
QuantConnect is cheaper than purchasing server space, setting up data feeds, and maintaining the software on your own. To
deploy your algorithms on QuantConnect, you just need to follow the Deploy Live Algorithms section in the guide of your
brokerage .
Resources
Live trading nodes enable you to deploy live algorithms to our professionally-managed, co-located servers. You need a live
trading node for each algorithm that you deploy to our co-located servers. Several models of live trading nodes are available.
More powerful live trading nodes allow you to run algorithms with larger universes and give you more time for machine learning
training . Each security subscription requires about 5MB of RAM. The following table shows the specifications of the live trading
node models:
Processing Speed
Name Number of Cores RAM (GB) GPU
(GHz)
L1-1 1 2.6 1 0
L1-2 1 2.6 2 0
L2-4 2 2.6 4 0
Refer to the Pricing page to see the price of each live trading node model.
To view the status of all of your organization's nodes, see the Resources panel of the IDE. When you deploy an algorithm, it uses
the best-performing resource by default, but you can select a specific resource to use .
The CPU nodes are available on a fair usage basis while the GPU nodes can be shared with a maximum of two members.
Depending on the server load, you may use all of the GPU's processing power. GPU nodes perform best on repetitive and
highly-parallel tasks like training machine learning models. It takes time to transfer the data to the GPU for computation, so if
your algorithm doesn't train machine learning models, the extra time it takes to transfer the data can make it appear that GPU
nodes run slower than CPU nodes.
Node Quotas
You need a live trading node for each simultaneous algorithm that you deploy. We do not support sub algorithms or sharing a
server with multiple algorithms. The tier of your organization determines the number of live trading nodes the organization can
have. The following number of live trading nodes are available for each tier:
Tier Node Quota
Free 0
Quant Researcher 2
Team 10
Institution Unlimited
To deploy multiple algorithms using a single brokerage, create sub-accounts in your brokerage account so that each algorithm
Ram Allocations
Members often use 8-32GB of RAM in backtesting and are concerned that their algorithms will not work in live trading since live
trading nodes have 512MB to 4GB of RAM. Backtesting nodes have more RAM because data is injected into your algorithm
roughly 100,000x faster during backtests than live trading. You use more RAM in backtesting because many data objects are
cached to achieve such fast speed. In live trading, 512MB to 4GB of RAM is sufficient for almost all use cases.
Wizard
Use the deployment wizard in the Algorithm Lab to deploy your algorithms to live trading . The deployment wizard lets you
select a brokerage, enter your brokerage credentials, select a data provider, select a live trading node, set up notifications, and
configure automatic algorithm restarts.
Most of the brokerages automatically load your cash holdings, position holdings, and submitted orders so that you can view
your portfolio state on the live results page . For brokerages that don't automatically load your holdings, you can enter your
cash and position holdings in the deployment wizard.
Unsupported Assets
If you have unsupported assets in your brokerage account when you deploy, Lean can't calculate the portfolio value correctly,
so margin calculations are wrong. To avoid issues, if your account has unsupported assets, Lean automatically exits on
deployment. For a list of supported assets, see the asset class dataset listing .
Automatic Restarts
Automatic restarts use best efforts to restart your algorithm if it fails due to a runtime error or an API disconnection. Automatic
restarts reduce the risk of your algorithm missing a trade during periods of downtime. If you enable automatic restarts when you
deploy your algorithm and your algorithm fails, your algorithm will try five times to restart. After five unsuccessful restarts, your
algorithm won't attempt to restart again. To prevent restarts due to coding bugs, algorithms only automatically restart if they
have been running for at least five minutes.
Security
Your code is stored in a database, isolated from the internet. When the code leaves the database, it is compiled and obfuscated
before being deployed to the cloud. If the cloud servers were compromised, this process makes it difficult to read your strategy.
As we've seen over recent years, there can never be any guarantee of security with online websites. However, we deploy all
modern and common security procedures. We deploy nightly software updates to keep the server up to date with the latest
security patches. We also use SSH key login to avoid reliance on passwords. Internally, we use processes to ensure only a
handful of people have access to the database and we always restrict logins to never use root credentials.
Automate Deployments
If you have multiple deployments, use a notebook in the Research Enviroment to programmatically deploy, stop or liquidate
algorithms.
Live Trading > Notifications
Live Trading
Notifications
Introduction
Set up some live trading notifications so that you are notified of market events and your algorithm's performance. We support
email, SMS, webhooks, and Telegram notifications. If you set up notifications in the deployment wizard, we will notify you when
your algorithm places orders or emits insights. To be notified at other moments in your algorithm, create notifications in your
code files with the NotificationManager . Lean ignores notifications during backtests. To view the number of notification you
can send for free, see the Live Trading Notification Quotas .
Email notifications can include up to 10KB of text content in the message body. These notifications can be slow since they go
through your email provider. If you don't receive an email notification that you're expecting, check your junk folders.
1. On the Deploy Live page, enable at least one of the notification types.
2. Click Email .
5. Click Add .
To add more email notifications, click Add Notification and then continue from step 2.
SMS
SMS notifications are the only type of notification that you don't need an internet connection to receive. They can include up to
1. On the Deploy Live page, enable at least one of the notification types.
2. Click SMS .
To add more SMS notifications, click Add Notification and then continue from step 2.
Telegram
1. On the Deploy Live page, enable at least one of the notification types.
To create a bot, chat with @BotFather and follow its instructions. If you want to use our bot, the username is
@quantconnect_notifications_bot.
Your group Id is in the URL when you open your group chat in the Telegram web interface. For example, the group Id of
web.telegram.org/z/#-503016366 is -503016366.
6. If you are not using our notification bot, enter the token of your bot.
7. Click Add .
To add more Telegram notifications, click Add Notification and then continue from step 2.
Webhooks
Webhook notifications are an HTTP-POST request to a URL you provide. The request is sent with a timeout of 300s. You can
process these notifications on your web server however you want. For instance, you can inject the content of the notifications
into your server's database or use it to create other notifications on your own server.
2. Click Webhook .
3. Enter a URL.
4. If you want to add header information, click Add Header and then enter a key and value.
5. Click Add .
To add more webhook notifications, click Add Notification and then continue from step 2.
Quotas
The number of email, Telegram, or webhook notifications you can send in each live algorithm for free depends on the tier of
your organization. The following table shows the hourly quotas:
Free N/A
Quant Researcher 20
Team 60
Institution 3,600
If you exceed the hourly quota, each additional email, Telegram, or webhook notification costs 1 QuantConnect Credit (QCC).
Each SMS notification you send to a US or Canadian phone number costs 1 QCC. Each SMS notification you send to an
international phone number costs 10 QCC.
Terms of Use
Live Trading
Results
Introduction
The live results page shows your algorithm's live trading performance. Review the results page to see how your algorithm has
The live results page automatically displays when you deploy a live algorithm . The page presents the algorithm's equity curve,
holdings, trades, logs, server statistics, and much more information.
The content in the live results page updates as your algorithm executes. You can close or refresh the window without
interrupting the algorithm because the live trading node processes on our servers. If you close the page, you can view all of
your live projects to open the page again.
Runtime Statistics
The banner at the top of the live results page displays the performance statistics of your algorithm.
Equity The total portfolio value if all of the holdings were sold at current market rates.
Fees The total quantity of fees paid for all the transactions.
Net Profit The dollar-value return across the entire trading period.
The probability that the estimated Sharpe ratio of an algorithm is greater than a benchmark
PSR
(1).
The amount of profit a portfolio would capture if it liquidated all open positions and paid the
Unrealized
fees for transacting and crossing the spread.
Volume The total value of assets traded for all of an algorithm's transactions.
If you stop and redeploy a live algorithm, the runtime statistics are reset.
Built-in Charts
The live results page displays the equity curve of your algorithm so that you can analyze its performance in real-time.
The following table describes the series in the Strategy Equity chart:
Series Description
Out of Sample Backtest The backtest equity curve of your algorithm during the live trading period.
Points in time when you deployed your algorithm, stopped your algorithm, and when your
Meta
algorithm encountered a runtime error.
The following table describes the other charts displayed on the page:
Chart Description
Assets Sales Volume A chart showing the proportion of total volume for each traded security.
A stacked area chart of the portfolio margin usage. For more information about this chart,
Portfolio Margin
see Portfolio Margin Plots .
A time series of an asset's price with order event annotations. For more information about
Asset Plot
these charts, see Asset Plots .
Asset Plots
Asset plots display the trade prices of an asset and the following order events you have for the asset:
View Plots
Tool Tips
When you hover over one of the order events in the table, the asset plot highlights the order event, displays the asset price at
the time of the event, and displays the tag associated with the event. Consider adding helpful tags to each order event to help
with debugging your algorithm. For example, when you cancel an order, you can add a tag that explains the reason for
cancelling it.
The resolution of the asset price time series in the plot doesn't necessarily match the resolution you set when you subscribed to
the asset in your algorithm. If you are displaying the entire price series, the series usually displays the daily closing price.
However, when you zoom in, the chart will adjust its display period and may use higher resolution data. To zoom in and out,
perform either of the following actions:
If you have multiple order events in a single day and you zoom out on the chart so that it displays the daily closing prices, the
plot aggregates the order event icons together as the price on that day.
The plot displays fill order events at the actual fill price of your orders. The fill price is usually not equal to the asset price that
displays because of the following reasons:
The fill model may fill your order at the high or low price.
Custom Charts
The results page shows the custom charts that you create.
If you use SeriesType.Candle and plot enough values, the plot displays candlesticks. However, the plot method only accepts
one numerical value per time step, so you can't plot candles that represent the open, high, low, and close values of each bar in
your algorithm. The charting software automatically groups the data points you provide to create the candlesticks, so you can't
control the period of time that each candlestick represents.
To create other types of charts, save the plot data in the Object Store and then load it into the Research Environment. In the
Research Environment, you can create other types of charts with third-party charting packages .
Supported Markers
When you create scatter plots, you can set a marker symbol. We support the following marker symbols:
Chart Sampling
Charts are sampled every one and ten minutes. If you create 1-minute resolution custom charts, the IDE charting will downgrade
the granularity and display the 10-minutes sampling after a certain amount of samples.
Demonstration
Adjust Charts
You can manipulate the charts displayed on the live results page.
Toggle Charts
To display and hide a chart on the live results page, in the Select Chart section, click the name of a chart.
Toggle Chart Series
To display and hide a series on a chart on the live results page, click the name of a series at the top of a chart.
To zoom in and out of a time series chart on the live results page, perform either of the following actions:
After you zoom in on a chart, slide the horizontal bar at the bottom of the chart to adjust the time frame that displays.
Resize Charts
To resize a chart on the live results page, hover over the bottom-right corner of the chart. When the resize cursor appears, hold
the left mouse button and then drag to the desired size.
Move Charts
To move a chart on the live results page, click, hold, and drag the chart title.
Refresh Charts
Refreshing the charts on the live results page resets the zoom level on all the charts. If you refresh the charts while your
algorithm is executing, only the data that was seen by the Lean engine after you refreshed the charts is displayed. To refresh
the charts, in the Select Chart section, click the reset icon.
Holdings
The Holdings tab on the live results page displays your positions and cash.
The following table describes the properties that display for each of your positions:
Property Description
Average Price The average price that you paid for the position.
Market Value The value of your position if sold with market orders.
Unrealized The unrealized profit of your position, including fees and spread costs.
The values in the positions section update as new data points are injected into your algorithm. The cash section displays the
quantity of each currency in your algorithm's CashBook . View the Holdings tab to see your holdings, add security subscriptions ,
and place manual orders . To view all of your current holdings and active data subscriptions, enable the Show All Portfolio check
box.
Orders
The live results page displays the orders of your algorithm and you can download them to your local machine.
To see the orders that your algorithm created, open the live results page and then click the Orders tab. If there are more than 10
orders, use the pagination tools at the bottom of the Orders Summary table to see all of the orders. Click on an individual order
in the Orders Summary table to reveal all of the order events , which include:
Submissions
Fills
Partial fills
Updates
Cancellations
The timestamps in the Order Summary table are based in Eastern Time (ET).
To view the orders data in CSV format, open the live results page, click the Orders tab, and then click Download Orders . The
content of the CSV file is the content displayed in the Orders Summary table when the table rows are collapsed. The timestamps
To programmatically analyze orders, call the read_live_orders method or the /live/orders/read endpoint.
Insights
The live results page displays the insights of your algorithm and you can download them to your local machine.
To see the insights your algorithm emit, open the live result page and then click the Insights tab. If there are more than 10
insights, use the pagination tools at the bottom of the Insights Summary table to see all of the insights. The timestamps in the
To view the insights in JSON format, open the live result page, click the Insights tab, and then click Download Insights . The
timestamps in the CSV file are based in Coordinated Universal Time (UTC).
Logs
The Logs tab on the live results page displays all of the logging statements and status messages your algorithm creates. Their
timestamps in the log file are in Coordinated Universal Time (UTC). The status messages include all of the points in time when
your algorithm deployed, encountered an error, sent an order, or quit executing. It's good practice to add logs in live algorithms
because then you can see what is happening while it executes. If you stop and redeploy your algorithm, the logs are retained.
You can view the log file on the live results page or download them to your local machine.
To see the log file your algorithm has created, open the live results page and then click the Logs tab.
To filter the logs, enter a search string in the Filter logs field.
To download the log file, open the live result page, click the Logs tab, and then click Download Logs .
Project Files
The live results page displays the project files used to deploy the algorithm. To view the files, click the Code tab. By default, the
main.py file displays. To view other files in the project, click the file name and then select a different file from the drop-down
menu.
To create a new project with the project files used to deploy the algorithm, click Clone Algorithm .
view the page, log in to the Algorithm Lab and then, in the left navigation bar, click Strategy Explorer .
Errors
If your live algorithm throws a runtime error, it stops executing and we send you an email. If you enabled automatic restarts
when you deployed your algorithm, your algorithm will try five times to restart.
Live Trading > Algorithm Control
Live Trading
Algorithm Control
Introduction
The algorithm control features on the live results page let you adjust your algorithm while it is executing live so that you can
perform actions that are not written in the project files. The control features let you intervene in the execution of your algorithm
and make adjustments. For instance, you can create security subscriptions, place trades, stop the algorithm, and update the
algorithm.
The live results page enables you to manually create security subscriptions for your algorithm instead of calling the
Add securityType methods in your code files. If you add security subscriptions to your algorithm, you can place manual trades
through the IDE without having to edit and redeploy the algorithm. Follow these steps to add security subscriptions:
3. Enter the symbol, security type, resolution, leverage, and market of the security you want to add.
4. If you want the data for the security to be filled-forward, check the Fill Forward check box.
5. If you want to subscribe to extended market hours for the security, check the Extended Market Hours check box.
The live results page lets you manually place orders instead of calling the automated methods in your project files. You can use
any order type that is supported by the brokerage that you used when deploying the algorithm. To view the supported order
types of your brokerage, see the Orders section of your brokerage model . Some example situations where it may be helpful to
place manual orders instead of stopping and redeploying the algorithm include the following:
Your brokerage account had holdings in it before you deployed your algorithm
Your algorithm had bugs in it that caused it to purchase the wrong security
You want to add a hedge to your portfolio without adjusting the algorithm code
2. In the Holdings tab, if the security you want to trade isn't listed, click Show All Portfolio .
3. If the security you want to trade still isn't listed, subscribe to the security .
Liquidate Positions
The live results page has a Liquidate button that acts as a "kill switch" to sell all of your portfolio holdings. If your algorithm has a
bug in it that caused it to purchase a lot of securities that you didn't want, this button let's you easily liquidate your portfolio
instead of placing many manual trades. When you click the Liquidate button, if the market is open for an asset you hold, the
algorithm liquidates it with market orders. If the market is not open, the algorithm places market on open orders. After the
The live trading results page has a Stop button to immediately stop your algorithm from executing. When you stop a live
algorithm, your portfolio holdings are retained. Stop your algorithm if you want to perform any of the following actions:
Place manual orders through your brokerage account instead of the web IDE
Furthermore, if you receive new securities in your portfolio because of a reverse merger, you also need to stop and redeploy the
algorithm.
LEAN actively terminates live algorithms when it detects interference outside of the algorithm's control to avoid conflicting race
conditions between the owner of the account and the algorithm, so avoid manipulating your brokerage account and placing
manual orders on your brokerage account while your algorithm is running. If you need to adjust your brokerage account
holdings, stop the algorithm, manually place your trades, and then redeploy the algorithm.
If you need to adjust your algorithm's project files or parameter values , stop your algorithm, make your changes, and then
redeploy your algorithm. You can't adjust your algorithm's code or parameter values while your algorithm executes. When you
stop and redeploy a live algorithm, your project's live equity curve is retained between the deployments. To erase the equity
curve history, clone the project and then redeploy the cloned version of the project.
To update parameters in live mode, add a Schedule Event that downloads a remote file and uses its contents to update the
parameter values.
PY
def initialize(self):
self.parameters = { }
if self.live_mode:
def download_parameters():
content = self.download(url_to_remote_file)
# Convert content to self.parameters
self.schedule.on(self.date_rules.every_day(), self.time_rules.every(timedelta(minutes=1)),
download_parameters)
Live Trading > Reconciliation
Live Trading
Reconciliation
Introduction
Algorithms usually perform differently between backtesting and live trading over the same time period. Backtests are
simulations where we model reality as close as possible, but the modeling isn't always perfect. To measure the performance
differences, we run an out-of-sample (OSS) backtest in parallel to all of your live trading deployments. The live results page
displays the live equity curve and the OOS backtest equity curve of your algorithms.
If your algorithm is perfectly reconciled, it has an exact overlap between its live and OOS backtest equity curves. Deviations
mean that the performance of your algorithm has differed between the two execution modes. Several factors can contribute to
the deviations.
The data that your algorithm uses can cause differences between backtesting and live trading performance.
Look-Ahead Bias
The Time Frontier minimizes the risk of look-ahead bias in backtests, but it does not completely eliminate the risk of look-ahead
bias. For instance, if you use a custom dataset that contains look-ahead bias, your algorithm's live and backtest equity curves
may deviate. To avoid look-ahead bias with custom datasets, set a period on your custom data points so that your algorithm
In backtests, we inject data into your algorithm at predictable times, according to the data resolution. In live trading, we inject
data into your algorithm when new data is available. Therefore, if your algorithm has a condition with a specific time (i.e. time is
9:30:15), the condition may work in backtests but it will always fail in live trading since live data has microsecond precision. To
avoid issues, either use a time range in your condition (i.e. 9:30:10 < time < 9:30:20), use a rounded time, or use a Scheduled
Event.
Custom data is often timestamped to midnight, but the data point may not be available in reality until several days after that
point. If your custom dataset is prone to this delay, your backtest may not fetch the same data at the same time or frequency
that your live trading algorithm receives the data, leading to deviations between backtesting and live trading. To avoid issues,
ensure the timestamps of your custom dataset are the times when the data points would be available in reality.
In backtesting, LEAN and custom data are perfectly synchonized. In live trading, daily and hourly data from a custom data
source are not because of the frequency that LEAN checks the data source depends on the resolution argument. The
following table shows the polling frequency of each resolution:
Backtests use adjusted price data by default. Therefore, if you don't change the data normalization mode , the indicators in your
backtests are updated with adjusted price data. In contrast, if a split or dividend occurs in live trading, your indicators will
temporarily contain price data from before the corporate event and price data from after the corporate event. If this occurs, your
indicators will produce different signals in your backtests compared to your live trading deployment. To avoid issues, reset and
In backtesting, we collect ticks into slices that span 1 millisecond before injecting them into your algorithm. In live trading, we
collect ticks into slices that span up to 70 milliseconds before injecting them into your algorithm. This difference in slice sizes
can cause deviations between your algorithm's live and OOS backtest equity curves. To avoid issues, ensure your strategy logic
The modeling that your algorithm uses can cause differences between backtesting and live trading performance.
We provide brokerage models to model fees, slippage, and order fills in backtests. However, these model predictions may not
always match the fees that your live algorithm incurs, leading to deviations between backtesting and live trading. You can adjust
the reality models that your algorithm uses to more accurately reflect the specific assets that you're trading. For more
information about reality models, see Reality Modeling .
Market Impact
We don't currently model market impact. So, if you are trading large orders, your fill prices can be better during backtesting than
live trading, causing deviations between backtesting and live trading. To avoid issues, implement a custom fill model in your
Fills
In backtests, orders fill immediately. In live trading, they are sent to your brokerage and take about half a second to execute. If
you fill an order in a backtest with stale data, deviations between backtesting and live trading can occur because the order is
filled at a price that is likely different from the real market price. Stale order fills commonly occur in backtests when you create a
Scheduled Event with an incompatible data resolution. For instance, if you subscribe to hourly data, place a Scheduled Event for
11:15 AM, and fill an order during the Scheduled Event, the order will fill at a stale price because the data between 11:00 AM and
11:15 AM is missing. To avoid stale fills, only place orders when your algorithm receives price data.
In live trading, your brokerage provides the fill price of your orders. Since the backtesting brokerage models do not know the
price at which live orders are filled, the fill price of backtest orders is based on the best price available in the current backtesting
data. Similarly, limit orders can fill at different prices between backtesting and live trading. In backtesting, limit orders fill as soon
as the limit price is hit. In live trading, your brokerage may fill the same limit order at a different price or fail to fill the order,
depending on the position of your order in their order book.
Borrowing Costs
We do not currently simulate the cost of borrowing shorts in backtests. Therefore, if your algorithm takes short positions,
deviations can occur between backtesting and live trading. We are working on adding the functionality to model borrowing fees.
The brokerage that your algorithm uses can cause differences between backtesting and live trading performance.
If you trade a small portfolio, it's difficult to achieve accurate portfolio allocations because shares are usually sold in whole
numbers. For instance, you likely can't allocate exactly 10% of your portfolio to a security. You can use fractional shares to
achieve accurate portfolio allocations, but not all brokerages support fractional shares. To get the closest results when
backtesting and live trading over the same period, ensure both algorithms have the same starting cash balance.
If you don't start your backtest and live deployment on the same date with the same holdings, deviations can occur between
backtesting and live trading. To avoid issues, ensure your backtest parameters are the same as your live deployment.
If you stop and redeploy your live trading algorithm, it needs to restart in a stateful way or else deviations can occur between
backtesting and live trading. To avoid issues, redeploy your algorithm in a stateful way using the set_warm_up and history
methods. Furthermore, use the Object Store to save state information between your live trading deployments.
If you deploy your algorithm to live trading with a brokerage account that has existing holdings, your live trading equity curve
reflects your existing positions, but the backtesting curve won't. Therefore, if you have existing positions in your brokerage
account when you deploy your algorithm to live trading, deviations will occur between backtesting and live trading. To avoid
issues, deploy your algorithm to live trading using a separate brokerage account or subaccount that does not have existing
positions.
Brokerage Limitations
We provide brokerage models that support specific order types and model your buying power. In backtesting, we simulate your
orders with the brokerage model you select. In live trading, we send your orders to your brokerage for execution. If the
brokerage model that you use in backtesting is not the same brokerage that you use in live trading, deviations may occur
between backtesting and live trading. The deviations can occur if your live brokerage doesn't support the order types that you
use or if the backtesting brokerage models your buying power with a different methodology than the real brokerage. To avoid
brokerage model issues, set the brokerage model in your backtest to the same brokerage that you use in live trading.
Live Trading > Risks
Live Trading
Risks
Introduction
There are risks associated with deploying your algorithms to live trading. Strategy, portfolio, market, counterparty, operational,
and error risks can cause you to lose capital. Some of these risks can be out of your control, but there are ways that you can
mitigate them.
Strategy
Strategy risk is the risk that results from designing a strategy based on a statistical model. If you ignore the underlying
assumptions of the statistical model, you are exposed to strategy risk. Even if you test that the model assumptions are held, if
the market environment changes, the new environment may violate the underlying assumptions of the model after you have
deployed it to live trading. Additionally, your strategy development process may be prone to overfitting, survivorship bias, or
look-ahead bias , which increases your exposure to strategy risk. To address strategy risk, use rolling parameters when training
your statistical models and perform the required statistical tests before training such models.
Portfolio
Portfolio risk is the risk associated with your portfolio as a whole. For instance, you're exposed to portfolio risk if you allocate
too much of your portfolio to a particular factor, the capacity of your trading strategies reduces, or the correlation of the
strategies in your portfolio increases. To address portfolio risk, diversify your portfolio among multiple factors, monitor the
rolling capacity of your trading strategies, and frequently check the correlation of your trading strategies.
Market
Market risk, also known as systematic risk, is the risk that the value of your portfolio will decrease due to the value of the entire
market decreasing. Market risk is caused by changes in interest rates, changes in currency exchange rates, geopolitical events,
natural disasters, wars, terrorist attacks, and economic recessions. Additionally, central bank announcements and changes to
monetary policy can increase overall market volatility and market risk. To address market risk, you can increase diversification,
reduce your portfolio beta , hedge your positions with put Options, or hedge against volatility with volatility index securities.
Counterparty
Counterparty risk is the risk that a counterparty with which you engage won't pay an obligation that they have made with you.
Most commonly, counterparty risk is associated with the risk that your brokerage goes out of business without returning the
trading capital that you have in your brokerage account. Brokerages can go bankrupt just like any other business. To address
counterparty risk, diversify your portfolio across multiple brokers that have a strong reputation. If you allocate your capital
across multiple brokers and one of them goes out of business, you won't lose all of your trading capital.
Operational
Operational risks are the risks within your fund that relate to business operations, such as business risks, regulatory risks,
trading infrastructure risks, and the risks of employees committing fraud or quitting. Operational risks are a result of the nature
of a trading business, having employees, and regulatory changes. To address operational risks, stay up to date on potential
regulatory changes, only hire employees that have signed contracts that protect your firm, use open-source trading
infrastructure that's maintained by experts (Lean), and use co-located servers so that you don't need to tend to hardware
failures and internet outages.
Error
Error risk is the risk associated with errors occurring in your strategy logic or trading infrastructure. Error risks occur because
bugs naturally arise in trading algorithms and the underlying engine that the algorithms use to execute. The Lean trading engine
has been under constant development for over 10 years, but there are always more improvements that can be implemented. To
address error risk, backtest your trading algorithm before deploying it live to test if it has coding errors, stay up to date on the
Lean GitHub Issues , and have close access to your email at all times. If your trading algorithm fails, we notify you through email.
You can also enable automatic restarts when you deploy algorithms.
Optimization
Optimization
Parameter optimization is the process of finding the optimal algorithm parameters to maximize or minimize an objective
function. For instance, you can optimize your indicator parameters to maximize the Sharpe ratio that your algorithm achieves
over a backtest. Optimization can help you adjust your strategy to achieve better backtesting performance, but be wary of
overfitting. If you select parameter values that model the past too closely, your algorithm may not be robust enough to perform
well using out-of-sample data.
Getting Started
Parameters
Objectives
Strategies
Deployment
Results
See Also
Running Optimizations
Reviewing Results
Optimization > Getting Started
Optimization
Getting Started
Introduction
Parameter optimization is the process of finding the optimal algorithm parameters to maximize or minimize an objective
function. For instance, you can optimize your indicator parameters to maximize the Sharpe ratio that your algorithm achieves
over a backtest. Optimization can help you adjust your strategy to achieve better backtesting performance, but be wary of
overfitting. If you select parameter values that model the past too closely, your algorithm may not be robust enough to perform
well using out-of-sample data.
1. Open the project that contains the parameters you want to optimize.
The parameter name must match a parameter name in the Project panel.
You can optimize a maximum of three parameters. To optimize more parameters, run local optimizations with the CLI .
2. Click the target field and then select a target from the drop-down menu.
3. Click the operation field and then an operation from the drop-down menu.
4. Enter a constraint value.
8. In the Estimated Number and Cost of Backtests section, click an optimization node and then select a maximum number of
nodes to use.
9. In the Strategy & Target section, click the Choose Optimization Strategy field and then select a strategy from the drop-
down menu.
10. Click the Select Target field and then select a target from the drop-down menu.
The target (also known as objective) is the performance metric the optimizer uses to compare the backtest performance of
different parameter values.
11. Click Maximize or Minimize to maximize or minimize the optimization target, respectively.
The optimization results page displays. As the optimization job runs, you can close or refresh the window without
interrupting the job because the nodes are processing on our servers.
To abort a running optimization job, in the Status panel, click Abort and then click Yes .
The optimization results page displays a Backtests table that includes all of the backtests that ran during the optimization job.
The table lists the parameter values of the backtests in the optimization job and their resulting values for the objectives.
To open the backtest result page of one of the backtests in the optimization job, click a backtest in the table.
2. Click the name of the column to which you want the filter to be applied.
3. If the column you selected is numerical, click the operation field and then select one of the operations from the drop-down
menu.
Follow these steps to hide and show columns in the Backtests table:
2. Select the columns you want to include in the Backtests table and deselect the columns you want to exclude.
In the Backtests table, click one of the column names to sort the table by that column.
1. Open the project that contains the optimization results you want to view.
2. At the top of the IDE, click the Results icon.
A table containing all of the backtest and optimization results for the project is displayed. If there is a play icon to the left of
the name, it's a backtest result . If there is a fast-forward icon next to the name, it's an optimization result .
3. (Optional) In the top-right corner, select the Show field and then select one of the options from the drop-down menu to
5. (Optional) Use the pagination tools at the bottom to change the page.
6. (Optional) Click a column name to sort the table by that column.
7. Click a row in the table to open the results page of that backtest or optimization.
Rename Optimizations
We give an arbitrary name (for example, "Smooth Apricot Chicken") to your optimization result files, but you can follow these
1. Hover over the optimization you want to rename and then click the pencil icon that appears.
Delete Optimizations
Hover over the optimization you want to delete and then click the trash can icon that appears to delete the optimization result.
On-Premise Optimizations
For information about on-premise optimizations with Local Platform , see Getting Started .
Get Optimization Id
To get the optimization Id, open the optimization result page and then scroll down to the table that shows the individual backtest
results . The optimization Id is at the top of the table. An example optimization Id is O-696d861d6dbbed45a8442659bd24e59f.
Optimization > Parameters
Optimization
Parameters
Introduction
Parameters are project variables that your algorithm uses to define the value of internal variables like indicator arguments or the
Parameters are stored outside of your algorithm code, but we inject the values of the parameters into your algorithm when you
launch an optimization job . The optimizer adjusts the value of your project parameters across a range and step size that you
define to minimize or maximize an objective function. To optimize some parameters, add some parameters to your project and
Set Parameters
Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. Add parameters
to your projects to remove hard-coded values from your code files and to perform parameter optimizations. You can add
parameters, set default parameter values, and remove parameters from your projects.
Add Parameters
To get the parameter values into your algorithm, see Get Parameters .
Follow these steps to set the default value of an algorithm parameter in a project:
3. Enter a default value for the parameter and then click Save .
The Project panel displays the default parameter value next to the parameter name.
Delete Parameters
2. In the Project panel, hover over the algorithm parameter and then click the trash can icon that appears.
3. Remove the GetParameter calls that were associated with the parameter from your code files.
Get Parameters
To get the parameter values from the Project panel into your algorithm, see Get Parameters .
Number of Parameters
The cloud optimizer can optimize up to three parameters. There are several reasons for this quota. First, the optimizer only
supports the grid search strategy , which is very inefficient. This strategy tests every permutation of parameter values, so the
number of backtests that the optimization job must run explodes as you add more parameters. Second, the parameter charts
that display the optimization results are limited to three dimensions. Third, if you optimize with many variables, it increases the
To optimize more than three parameters, run local optimizations with the CLI .
Optimization > Objectives
Optimization
Objectives
Introduction
An optimization objective is the performance metric that's used to compare the backtest performance of different parameter
values. The optimizer currently supports the compound annual growth rate (CAGR), drawdown, Sharpe ratio, and Probabilistic
Sharpe ratio (PSR) as optimization objectives. When the optimization job finishes, the results page displays the value of the
CAGR
CAGR is the yearly return that would be required to generate the return over the backtest period. CAGR is calculated as
e 1
s y
( ) −1
where s is starting equity, e is ending equity, and y is the number of years in the backtest period. The benefit of using CAGR as
the objective is that it maximizes the return of your algorithm over the entire backtest. The drawback of using CAGR is that it
may cause your algorithm to have more volatile returns, which increases the difficulty of keeping your algorithm deployed in live
mode.
Drawdown
Drawdown is the largest peak to trough decline in your algorithm's equity curve. Drawdown is calculated as
vtmin
≥s
vs
1 − max
second highlighted period, the equity curve dropped from 112,848 to 99,576 (11.8%). Since 11.8% > 11.4%, the max drawdown of
The benefit of using drawdown as the objective is that it's psychologically easier to keep an algorithm deployed in live mode if
the algorithm doesn't experience large drawdowns. The drawback of using drawdown is that it may limit the potential returns of
your algorithm.
Sharpe
The Sharpe ratio measures the excess returns relative to a benchmark, divided by the standard deviation of those returns. The
E[R p − R b]
σp
where R p is the returns of your portfolio, R b is the returns of the benchmark, and σp is the standard deviation of your algorithm's
excess returns. By default, Lean uses a 0% risk-free rate, so R b = 0. The benefit of using the Sharpe ratio as the objective is that
it maximizes returns while minimizing the return volatility. It's usually psychologically easier to keep a live algorithm deployed if
it has minimal swings in equity than if it has large swings in equity. The drawback of using the Sharpe ratio is that it may limit
PSR
The PSR is the probability that the estimated Sharpe ratio of your algorithm is greater than the Sharpe ratio of the benchmark.
PSR is calculated as
^
(SR − SR ∗ )√ n − 1
( √
)
γ̂ − 1
^ 4 ^ 2
( )
4
^ 1 − γ̂ SR +
3
SR
P SR > SR ∗ = CDF
^
where SR ∗ is the Sharpe ratio of the benchmark, SR is the Sharpe ratio of your algorithm, n is the number of trading days, γ̂3 is
the skewness of your algorithm's returns, γ̂4 is the kurtosis of your algorithm's returns, and CDF is the normal cumulative
distribution function. The benefit of using the PSR as the objective is that it maximizes the probability of your algorithm's Sharpe
ratio outperforming the benchmark Sharpe ratio. The drawback of using the PSR is that, like the Sharpe ratio objective,
optimizing the PSR may limit your potential returns in favor of a less volatile equity curve.
Constraints
Constraints filter out backtests from your optimization results that do not conform to your desired range of statistical results.
Constraints consist of a target, operator, and a numerical value. For instance, you can add a constraint that the optimization
backtests must have a Sharpe ratio >= 1 to be included in the optimization results. Constraints are optional, but you can use
Optimization
Strategies
Introduction
Optimization strategies control how the optimizer adjusts parameters for each new backtest that's run in the optimization job.
Grid search is the only strategy currently available, but you can contribute new optimization strategies.
Grid Search
Grid search is the most complete but the most expensive strategy because it takes a brute force approach and tests all the
combinations of parameter values. If you are optimizing one parameter, the grid search strategy selects the values of the
parameters based on the starting value, ending value, and step size that you provide. If you optimize two parameters, the grid
search strategy searches the Cartesian product of possible values for each parameter. The following animation shows the
In the preceding animation, grid search tests all of the parameter combinations. The axes represent the possible values of each
parameter. Gray squares represent backtests in the optimization queue, orange squares represent successful backtests, and
black squares represent failed backtests. In this example, several squares are colored at the same time because the
When backtests fail during optimization, it is usually because the selected parameter values cause a divide-by-zero error or an
index out-of-range exception.
The benefit of the grid search strategy is that it is the most comprehensive optimization strategy. The drawback of the strategy
You can contribute any optimization strategy that is popular in the literature and is not already implemented. To view the
optimization strategies that are already implemented, see our GitHub repository . If you contribute a strategy, you'll receive
some QuantConnect Credit , you'll be shown as a contributor to Lean on your GitHub profile, and your work will be used in the
To contribute optimization strategies, submit a pull request to the Lean GitHub repository . In your pull request, provide an
explanation of the strategy and some relevant resources so that we can add the strategy to our documentation. For an example
implementation, see the GridSearchOptimizationStrategy .
Optimization > Deployment
Optimization
Deployment
Introduction
Deploy optimization jobs for your trading algorithms to optimize your algorithm parameters for the objective that you specify.
The optimizer runs concurrent backtests to optimize your algorithm parameter using up to 24 nodes. As the optimization runs,
Resources
The optimization nodes that backtest your algorithm are not the backtesting nodes in your organization. The optimization nodes
are a cluster of nodes that exclusively run optimization jobs. The optimization can concurrently run multiple backtests if you use
multiple nodes, but the maximum number of nodes you can use depends on the node type. The following table describes the
node types:
Relatively simple
O2-8 strategies with less 2 8 6
than 100 assets
Complex strategies
O8-16 8 16 4
and machine learning
The following table shows the training quotas of the optimization node types:
O2-8 30 5
O4-12 60 10
O8-16 90 15
Cost
You can rent optimization nodes on a time basis. The deployment wizard estimates the total cost of your optimization job based
on the results of the last successful backtest of your algorithm, the number of parameters , and the optimization strategy .
Therefore, you must run a backtest of your algorithm before the deployment wizard can estimate the cost of the optimization
job. The final cost that you pay can vary from the estimate. For instance, if your backtest used parameters that were favorable
for speedy execution, the estimate can be lower than the final cost.
You can use multiple nodes to speed up the optimization job without the job costing more because you use each node for a
shorter period of time. However, there is a spin-up time of roughly 15 seconds on each backtest, so it can sometimes cost more
to use many nodes when you factor in the spin-up time. You pay for optimizations with your organization's QuantConnect Credit
balance. If you have your own hardware, you can run local optimizations with your own data and hardware.
1. Open the project that contains the parameters you want to optimize.
The parameter name must match a parameter name in the Project panel.
You can optimize a maximum of three parameters. To optimize more parameters, run local optimizations with the CLI .
2. Click the target field and then select a target from the drop-down menu.
3. Click the operation field and then an operation from the drop-down menu.
4. Enter a constraint value.
8. In the Estimated Number and Cost of Backtests section, click an optimization node and then select a maximum number of
nodes to use.
9. In the Strategy & Target section, click the Choose Optimization Strategy field and then select a strategy from the drop-
down menu.
10. Click the Select Target field and then select a target from the drop-down menu.
The target (also known as objective) is the performance metric the optimizer uses to compare the backtest performance of
different parameter values.
11. Click Maximize or Minimize to maximize or minimize the optimization target, respectively.
The optimization results page displays. As the optimization job runs, you can close or refresh the window without
interrupting the job because the nodes are processing on our servers.
To abort a running optimization job, in the Status panel, click Abort and then click Yes .
Optimization > Results
Optimization
Results
Introduction
The optimization results page shows your algorithm's performance with the various parameter values. Review the results page
to see how your algorithm has performed during the backtests and to investigate how you might improve your algorithm before
live trading.
The optimization results page automatically displays when you launch an optimization job . The page presents the algorithm's
equity curves, parameters, target values, server statistics, and much more information.
The content in the optimization results page updates as your optimization job executes. You can close or refresh the window
without interrupting the job because the optimization nodes process on our servers. If you close the page, you can view all of
The banner at the top of the optimization results page displays the performance statistics of the optimization job.
The banner updates in real-time as the optimization job progresses on our servers. The following table describes the runtime
statistics:
Statistic Description
Average Length The average amount of time to complete one of the backtests
Consumed The amount of QuantConnect Credit that was used to perform the optimization
Equity Curves
The optimization results page displays a Strategy Equities chart so that you can analyze the equity curves of the individual
backtests in the optimization job.
The equity curves of the backtests update in real-time as the optimization job runs. View the Strategy Equities chart to see how
the parameter values affect the equity of your algorithm, to see how sensitive the returns are to the range of parameters
selected by the optimizer, and to take a closer look at specific times in the backtest history.
Parameter Charts
The optimization results page displays parameter charts to show the relationship between the parameter value(s) selected by
the optimizer and the value of several objectives. If your optimization job has one parameter, the result page displays a scatter
plot for each objective. If your optimization job has two parameters, the result page displays a heat map for each objective.
If your optimization job has three parameters, the result page displays a 3-dimensional plot for each objective. To analyze the
results of 3-dimensional plots, you can rotate them and apply cuttoff values. To get the objective value for a combination of
Parameter Stability
Zones in the heatmap where the color of adjacent cells are relatively consistent represent areas where the objectives are stable.
In these areas, the value of the objectives is not significantly influenced by the parameter values. The following image shows
the parameter chart of an optimization job. The highlighted area identifies combinations of parameter values that stabilize the
objective function.
Supported Objectives
Alpha
Annual Standard Deviation
Annual Variance
Average Loss
Average Win
Beta
Drawdown
Estimated Strategy Capacity
Expectancy
Information Ratio
Loss Rate
Net Profit
Profit-Loss Ratio
Sharpe Ratio
Total Fees
Total Trades
Tracking Error
Treynor Ratio
Win Rate
Follow these steps to add a parameter chart to the optimization results page:
3. Click the Parameter 1 field and then select a parameter from the drop-down menu.
4. If there are multiple parameters in the optimization, click the Parameter 2 field and then select a parameter from the drop-
down menu.
5. If there are three parameters in the optimization, click the Parameter 3 field and then select a parameter from the drop-
down menu.
The optimization results page displays a Backtests table that includes all of the backtests that ran during the optimization job.
The table lists the parameter values of the backtests in the optimization job and their resulting values for the objectives.
To open the backtest result page of one of the backtests in the optimization job, click a backtest in the table.
To download the table, right-click one of the rows, and then click Export > CSV Export .
2. Click the name of the column to which you want the filter to be applied.
3. If the column you selected is numerical, click the operation field and then select one of the operations from the drop-down
menu.
Follow these steps to hide and show columns in the Backtests table:
2. Select the columns you want to include in the Backtests table and deselect the columns you want to exclude.
In the Backtests table, click one of the column names to sort the table by that column.
Server Stats
The optimization results page displays a Server Statistics section to show the status of the nodes running the optimization job.
Property Description
CPU The total CPU usage and the CPU usage of each node
RAM The total RAM usage of the RAM usage of each node
HOST The node model and the number of nodes used to run the optimization
Uptime The length of time that the optimization job has ran
View the Server Statistics section to see the amount of CPU power and RAM the optimization job demands. If your algorithm is
demanding a lot of resources, use more powerful nodes on the next optimization job or improve the efficiency of your algorithm.
Errors
Error Description
If a backtest in your optimization job throws a runtime error, the backtest will not complete
Runtime Errors
but you will still be charged.
If a backtest in your optimization job produces more than 700MB of data, then Lean can't
Data Overload
upload the results and the optimization job appears to never be complete.
1. Open the project that contains the optimization results you want to view.
2. At the top of the IDE, click the Results icon.
A table containing all of the backtest and optimization results for the project is displayed. If there is a play icon to the left of
the name, it's a backtest result . If there is a fast-forward icon next to the name, it's an optimization result .
3. (Optional) In the top-right corner, select the Show field and then select one of the options from the drop-down menu to
filter the table by backtest or optimization results.
4. (Optional) In the bottom-right corner, click the Hide Error check box to remove backtest and optimization results from the
5. (Optional) Use the pagination tools at the bottom to change the page.
6. (Optional) Click a column name to sort the table by that column.
7. Click a row in the table to open the results page of that backtest or optimization.
Rename Optimizations
We give an arbitrary name (for example, "Smooth Apricot Chicken") to your optimization result files, but you can follow these
1. Hover over the optimization you want to rename and then click the pencil icon that appears.
Delete Optimizations
Hover over the optimization you want to delete and then click the trash can icon that appears to delete the optimization result.
Object Store
Object Store
Introduction
The Object Store is an organization-specific key-value storage location to save and retrieve data in QuantConnect's cache.
Similar to a dictionary or hash table, a key-value store is a storage system that saves and retrieves objects by using keys. A key
is a unique string that is associated with a single record in the key-value store and a value is an object being stored. Some
Transporting data between the backtesting environment and the research environment.
Training machine learning models in the research environment before deploying them to live trading.
The Object Store is shared across the entire organization. Using the same key, you can access data across all projects in an
organization.
View Storage
The Object Store page shows all the data your organization has in the Object Store. To view the page, log in to the Algorithm Lab
and then, in the left navigation bar, click Organization > Object Store .
To view the metadata of a file (including it's path, size, and a content preview), click one of the files in the table.
Upload Files
2. Navigate to the directory in the Object Store where you want to upload files.
3. Click Upload .
4. Drag and drop the files you want to upload.
Alternatively, you can add data to the Object Store in an algorithm or notebook .
Download Files
Permissioned Institutional clients can build derivative data such as machine learning models and download it from the Object
Follow these steps to download files and directories from the Object Store:
2. Navigate to the directory in the Object Store where you want to download files and directories.
4. Click Download .
5. Wait while QuantConnect processes the request.
Storage Sizes
All organizations get 50 MB of free storage in the Object Store. Paid organizations can subscribe to more storage space. The
following table shows the cost of the supported storage sizes:
0.05 0
2 10
5 20
10 50
50 100
Delete Storage
2. Navigate to the directory in the Object Store where you want to delete files.
3. Click the check box next to the files you want to delete.
4. Click Actions and then click Delete from the drop-down menu.
5. Click OK .
You need storage billing permissions and a paid organization to edit the size of the organization's Object Store.
Follow these steps to edit the amount of storage available in your organization's Object Store:
3. On the Resources page, scroll down to the Storage Resources and then click Add Object Store Capacity .
4. On the Pricing page, select a storage plan.
When you deploy a live algorithm, you can access the data within minutes of modifying the Object Store. Ensure your algorithm
is able to handle a changing dataset.
The live environment's access to the Object Store is much slower than in research and backtesting. Limit the individual objects
Usage by Project
The Resources page shows the total storage used in your organization and the storage used by individual projects so that you
can easily manage your storage space. To view the page, log in to the Algorithm Lab and then, in the left navigation bar, click
Community
The QuantConnect community consists of over 250,000 quants and investors with diverse backgrounds. Our platform supports
several channels of communication so that our members can discuss with the core team, other community members, and third-
party contractors. Our community members are a great source for assistance when creating trading algorithms, but we
recommend all users complete our base training material before requesting assistance from other members.
Code of Conduct
Forum
Discord
Profile
Quant League
Academic Grants
Integration Partners
Affiliates
See Also
Community
Code of Conduct
Introduction
The QuantConnect community consists of 250,000 quants and investors with diverse backgrounds. Our platform supports
several channels of communication so that our members can discuss with the core team, other community members, and third-
party contractors. Our community members are a great source for assistance when creating trading algorithms, but we
recommend all users complete our base training material before requesting assistance from other members.
Our community forum was created to be a hub for sharing quality quantitative science insights, discussions on quantitative
philosophies, and solving problems. Our goal is to embrace new ways of thinking while keeping a friendly, welcoming
environment where people feel comfortable amongst their peers. Our community's exceptional and diverse range of opinions
and experiences make us a unique platform. Coming together with mutual respect and courtesy can unite us in growing together
as quants.
We ask that our users adhere to the community code of conduct to ensure QuantConnect remains a safe, healthy environment
Expectations
If you're here to get help, make it as easy as possible for others to help you. Follow our guidelines and remember that our
Be clear and constructive when giving feedback, and be open when receiving it. Edits, comments, and suggestions are healthy
If you're here to help others, be patient and welcoming. Learning how to participate in our community can be hard. Offer support
Be inclusive and respectful. Avoid sarcasm and be careful with jokes — tone is hard to decipher online. Prefer gender-neutral
language when uncertain. If a situation makes it hard to be friendly, stop participating and move on.
Unfriendly Friendly
"I think googling this might provide you with more helpful
"Google is free!"
information."
"Obviously that's wrong because..." "I think I can help you with this! Try this..."
"Can you speak English?" "I think you're trying to say ____. Is that correct?"
"Your strategy will never work because ___." "Here are some suggestions for your strategy..."
Policies
We want our forum to be a place of general respect for one another. Keep interactions constructive, but friendly and
lighthearted. Remember — we're all here to help one another and keep our community strong.
Due Diligence
We have hundreds of quants posting their questions. Your question is important, but make sure to check a few places before
posting. We've worked hard on providing comprehensive documentation and bootcamp tutorials — make sure to check there
first. Next, try Googling the concept to see if you can get another perspective before posting. Furthermore, our Debugger is a
great tool to identify bugs in the code logic.
Relevancy
Patience
Be patient with the community responses to your questions. Keep in mind the community are volunteers contributing to your
quantitative growth voluntarily. When possible, answer your own questions to leave a path for future readers. Avoid "bumps",
"+1", "Any Update?", double posting, thread hijacking , or necro-bumping discussions. Contributions are often rewarded with
QuantConnect Credit .
Bigotry
QuantConnect is firmly rooted in our policy against bigotry in our community forum. We are vehemently against racist, sexist,
xenophobic, homophobic, or otherwise discriminatory behavior in our community. Any language that may offend anyone based
Harassment
Bullying is not a part of our core culture at QuantConnect. We do not tolerate bullying, sexual harassment, profanity, threats of
violence or otherwise, or any sexual harassment in our community forum.
We request bug reports be sent to the Support Team . The forums are not an effective bug tracking tool and often the reported
issue is simply confusion on how the platform operates. For data issues please report the specific dates, times, contracts, and
type of issue to the Data Explorer Issues List . This is a system we've designed to track, fix and notify users when issues are
fixed.
Promotional Activity
Spam and other forms of promotional activity isn't permitted in the community forum. Posts that deliver immediate value to the
readers are permitted such as sharing a well-performing algorithm with an attribution to the author's company in the code
comments.
Can Someone Make My Algorithm?
We understand people are at different stages of their quant-growth, but if you are soliciting assistance you should have
completed Boot Camp , and attach a backtest or code snippet with your best attempt at building your algorithm. This shows
respect for the reader's time. You will need to know how to code to use QuantConnect.
Reporting Violations
We monitor our forum diligently, but if you see something unsavory, please message us to report the activity.
We aspire to have a welcoming community filled with high-quality discussions about quantitative and algorithmic trading. Since
our founding in November 2012, we ran an informal code of conduct and evolved those principles to support the community.
Starting January 1st, 2021 as the scale of community content surpassed our ability to review each post, we have sought to write
down these guidelines to provide transparency and framework for productive discussions. We welcome your feedback and
expect this code of conduct to evolve over time.
Community > Forum
Community
Forum
Introduction
The QuantConnect forum is a place to discuss with other community members, Mia (our AI assistant), the core QuantConnect
team, and our Integration Partners . Use the forum to spark interesting discussions, ask for assistance from other members, and
voice your opinion on our products. You must complete 30% of the Bootcamp lessons in the Learning Center to unlock the
Discussions
Discussions are a set of forum posts and comments about a targeted subject. We occasionally post to forum discussions to
announce new features, tutorials, and examples. If you have completed 30% of the Bootcamp lessons, you can contribute to
discussions. Create discussions to connect with other members or to ask for guidance on a specific problem that you are facing,
but always perform your own research and tests before asking other members for assistance.
Publishing text content that includes bold, italics, lists, links, emojis, and LaTeX
Sharing Backtests
You can attach project files and backtest results to your forum comments. Sharing your project files is helpful in the following
situations:
Sharing backtests is helpful in these situations because it enables other members to reproduce your results. However, since
Lean is under constant development, old backtests that are attached to forum discussions can sometimes produce different
You can only attach backtests to the forum if they don't throw errors. If you want to share a backtest that throws errors, call the
Credit
To show your appreciation for contributions in the forum, give some QuantConnect Credit (QCC) rewards . The following table
Bestowed in recognition of
80
quantitative advances.
Nobel Laureate
Notifications
Follow discussions to receive email notifications when members post new content. You can follow all forum discussions or
individual discussions.
All Discussions
Individual Discussions
To toggle your subscription to individual discussions, add or remove a bookmark to the discussions.
Search Discussions
Create Discussions
2. Click the Project field and then select the project that contains the backtest that you want to attach from the drop-
down menu.
3. Click the Backtest field and then select a backtest from the drop-down menu.
When you attach a backtest, you're sharing all of the project files that were used to generate the backtest results.
7. (Optional) Under the Discussion Tags section, click Show All and then click all of the tags that are relevant to the
discussion.
Post Comments
You can only post comments on open forum discussions. To open a closed discussion, contact us .
4. If you want to reply to a comment in the discussion, click Reply at the bottom of the comment.
5. If you want to comment on the top-level discussion, scroll to the bottom of the discussion page and enter your comment.
6. (Optional) If you comment on the top-level discussion, follow these steps to attach a backtest:
2. Click the Project field and then select the project that contains the backtest you want to attach from the drop-down
menu.
3. Click the Backtest field and then select a backtest from the drop-down menu.
When you attach a backtest, you're sharing all of the project files that were used to generate the backtest results.
7. Click Reply .
Accept Answers
The discussion closes and a copy of the accepted answer is added as the first comment in the discussion.
Give Rewards
You need sufficient QuantConnect Credit (QCC) in your organization to give QCC rewards.
comment in the discussion, on the comment that you want to reward, click Reward Answer .
The reward displays and the QCC value of the reward is deducted from your organization's balance.
5. If you want to give an upvote, click the thumbs-up icon on the comment that you want to reward.
Share Comments
2. Click the discussion that contains the comment that you want to share.
3. On the discussion page, in the bottom-right corner of the comment that you want to share, click the share icon and then
Edit Comments
You can edit comments only within five minutes after publishing the comments.
3. Click the discussion that contains the comment that you want to edit.
4. On the discussion page, in the top-right corner of the comment that you want to edit, click the three dots icon and then
click Edit .
5. (Optional) Update the comment text.
2. Click the Project field and then select the project that contains the backtest that you want to attach from the drop-
down menu.
You can only attach projects that you own.
3. Click the Backtest field and then select a backtest from the drop-down menu.
7. Click Update .
Delete Comments
Email us the comment URL and a reason for deleting the comment. We will consider deleting the comment.
Open the forum homepage , click a discussion, and then click a member's profile image to view the member's profile page.
Manage Bookmarks
4. On the discussion page, in the bottom-right corner of the first comment, click the bookmark icon.
Click the bookmark icon again to remove the discussion from your bookmarks.
On the forum homepage, click Bookmarked to view all of the discussions that you have bookmarked.
Community > Discord
Community
Discord
Introduction
Join the QuantConnect Discord server to chat with community members, Mia (our AI assistant), and the core QuantConnect
team in real-time.
Code of Conduct
The Discord server is governed by the normal rules in the Code of Conduct .
Community > Profile
Community
Profile
Introduction
Your QuantConnect profile page is your place to customize your community appearance. Your profile page is accessible to
everyone from the forum. The page displays your personal information, your preferred programming language, your latest
Personal Information
Your profile page displays the following personal information about you:
Username
Title
Picture
Biography
Website
The date that you joined QuantConnect
You can edit your profile image, username, title, biography, social media links, and email.
Profile Image
3. Click Browse .
4. Select a file from your local machine and then click Open .
Your profile image must be in gif , jpg , or png format and less than 1MB in size.
5. Click Save .
Username
Title
3. On your profile page, hover over your title and then click the Edit box that appears.
Biography
3. On your profile page, hover over your biography and then click the Edit box that appears.
3. On your profile page, hover over the social media icon that you want to update and then click the Edit box that appears.
Organizations
Your profile page displays all of the organizations of which you are a member and the date that you joined each organization.
Activity
Your profile page displays your last five forum posts and your community engagement statistics. The forum post display lets
other members read your recent posts and lets you find the comments that you recently posted. The page displays your
community engagement statistics like the number of experience points that you've earned, the number of comments that
you've posted, the number of discussions that you've created, and the number of algorithms that you've shared in the forum.
Your community engagement statistics are displayed so that other members can see how active you are in the forum.
In addition to your forum activity, your profile page also platform engagement statistics like the number of backtests that you've
run and the proportion of the Bootcamp lessons that you've completed. Your platform engagement statistics are displayed so
that other members can see how experienced you are with QuantConnect and Lean.
Badges
Badges are fun to collect and show your experience with QuantConnect. Your profile page displays the badges you've earned.
Badge Description
Log In
2. If you signed up with your Google or Facebook account, click Sign In with Google or Sign In with Facebook and then follow
the prompts.
3. If you signed up with your email address, enter your email address, enter your password, and then click Sign In .
4. If you have 2FA enabled on your account, in the Please Enter 2FA Code field, enter the authentication code from the
Google Authenticator app on your mobile device and then click Sign In .
Toggle 2FA
3. Follow the steps in the pop-up window and then click Activate Two Factor .
"Success" displays.
3. On your Account page, in the Security section, click Request Email With Token and Your User-Id for API Requests .
4. Click OK .
2. Stop all the backtests, optimization jobs, live algorithms, and notebooks you're running.
3. In the top navigation bar, click yourUsername > My Account .
5. Click OK .
3. On your Account page, in the Security section, click Sign Out next to the session that you want to close.
4. Select the subscriptions you want and deselect the subscriptions you don't want.
Change Password
Sign Out
In the top navigation bar, click yourUsername > Sign Out to sign out.
Deactivate Account
Remove Account
Community
Quant League
Introduction
Every year, we see thousands of applications for internships from driven and intelligent students seeking opportunities to
springboard their careers. The top industry funds take less than 1% of applicants, leaving thousands of students unable to prove
their abilities.
The Open Quant League is an opportunity for university classes and clubs to showcase their quantitative trading skills. Team
members do research publicly and deploy algorithms live, gaining a track-record. All teams that enter the competition receive
A platform to discuss their strategy logic with a public, permanent link to share on their LinkedIn profiles and resumes.
Inbound inquiries from employers in the QC community looking for help on their algorithms or looking to hire talent for their
fund.
Public quarterly rankings page to share with potential employers via URL, including your discussion thread.
In addition, all QC community members benefit from gaining access to the research from each university that participates. The
live algorithm the team contributed will be public, so community members can use it to learn, trade, and improve.
Schedule
The competition runs on a quarterly schedule. At the end of each quarter, the competition resets and the algorithms in the
Academic Scholarships
For every team that participates, QuantConnect provides Trading Firm seats with Bronze-tier support and an increased number
of backtest, research, and live trading nodes for a total value of $20,000 per year. Competitors can use these perks without a
cost for their team's submission and personal projects.
Note: The scholarship will be revoked for teams who don't submit a QuantLeague entry.
Rankings
Algorithms are simply ranked by net performance over the quarter, but this condition is subject to change. To view current
Prizes
The top three organizations at the end of the quarterly competition receive prices of 500, 300, and $200, respectively. We are
looking to increase these prizes via Corporate Sponsorships .
Additionally, the members of the winning team will get a chance to interview for a QuantConnect internship.
Team's University
Team name
The email with which the captain is registered on the QuantConnect platform
The emails with which the team members are registered on the QuantConnect platform
A confirmation that all team members have updated their Names, Profile Picture, and LinkedIn Profiles on the
QuantConnect platform
For the investment thesis, introduce your strategy concepts and philosophy to help investors and funds understand your
investment idea. Communicating your thesis and attracting investment for your projects is critical to quantitative finance. You
can encourage discussion and contributions by posting interesting ideas on your team's page.
All members have updated their Name, Profile Picture, and LinkedIn account on the platform so funds in the QuantConnect
Your algorithm is unique. Teams are penalized for submitting algorithms that are nearly identical to other competitors.
Forex includes the top 20 pairs, and Futures includes the top 30 contracts.
Once you submit the form, the QuantConnect team will review your submission and list it to the Quant League.
Update Submissions
4. On the Update League Submission page, enter the algorithm name and description into the form.
5. Follow these steps to attach a backtest:
2. Click the Project field and then select the project that contains the backtest that you want to attach from the drop-
down menu.
Note: You can only attach projects that you own.
3. Click the Backtest field and then select a backtest from the drop-down menu.
Your algorithm has been updated and is competing in the league. Congratulations!
Intellectual Property
The source code of each algorithm is private during its first quarter in the competition. At the end of its first quarter in the
competition, the source code will be visible, even if the algorithm is submitted to the next competition. To keep your source
Remember, the goal is to demonstrate the strength of your abilities which is easier when employers can review the code you're
writing.
Quotas
Schools and clubs can have up to two entries in the competition each quarter, one for an academic course and one for a student
society. For example, Duke University can have one entry for FECON 413 and another entry for the Duke Investment Club.
Corporate Sponsorships
We are proud to share the community's support for Quant League's university talent with the following three 3 sponsorship
tiers. We direct all the funds we receive from the sponsorship to increasing student prizes.
With our sponsorship tiers starting at just $250 USD, we would love for you to join us in making Quant League a tremendous
success! To make the contribution and support student talent, contact our team.
Pamphlet
To share information about this competition with your team members or university, feel free to download and distribute the
following pamphlet.
Common Mistakes
The following video explains some common mistakes teams make in their submission algorithms:
Clone the algorithm code .
Community > Academic Grants
Community
Academic Grants
Introduction
The Academic Grant program gives researchers publishing a paper up to a three-month subscription. With this grant, you can
implement your strategy and generate public source code that anyone can use to reproduce your results with our open-source
platform on a uniform dataset. You can use the grant to create a Team organization with multiple members collaborating on the
research.
To be eligible for this grant, you must meet the following criteria:
1. You must be a member of an academic or corporate institution with a track record of published papers in peer-reviewed
journals of the quantitative finance field.
2. You must prove that you are a member of the institution as a professor, researcher, or student.
3. You must be actively doing research with the goal of writing a research paper.
Your research should be achievable using the QuantConnect platform and data. For example, we don't currently accept
research on bonds, stock warrants, and non-US stocks. You can only use external data sources from official government
websites, like FRED , or data vendors with a good track record. To view the dataset currently available on QuantConnect, see
To apply for a grant, submit your research proposal based on a draft paper or thesis to be published to
[email protected] , along with details of your academic program or corporate research program.
Republishing Permission
By accepting a grant, you agree to share your research with a write-up, including the code, with the QuantConnect Research
forum . If applicable, your strategy may be deployed as an example (with full credit given) on the Explorer page .
Community > Integration Partners
Community
Integration Partners
Introduction
Our Integration Partners are hand-picked, independent consultants and companies with a solid track record of operational
excellence with QuantConnect. They offer guidance, consultation, teaching, coding development services. Let them help take
your idea to a fully implemented algorithmic trading strategy.
The Integration Partners are thoroughly vetted and must pass a test to provide their services to the community. They decide
their pricing and the services that they provide. Their services range from beginner to advanced dives into the algorithm
framework, strategy and project consultation, developing simple to complex algorithms, portfolio optimization, and more. Hire
them on the Integration Partners page to connect with a QuantConnect expert, to progress your development skills, or to
To list your services on the Integration Partners page, contact us and pass our test. If you are accepted and community
members hire you, you receive 100% of the revenue. As an Integration Partner, you set your own pricing, define your own
services, pick your own hours, and get paid to work on your quant trading specialty. Our Integration Partner program is a great
addition to resumes.
Community > Affiliates
Community
Affiliates
Introduction
Our Affiliate Program gives influential quants, financial strategists, and traders an opportunity to use their platforms to share
QuantConnect and subsequently share in profits from referrals.
Earning Potential
On a monthly basis, you'll receive 10% of sales that originate for your referral. You'll receive this for up to 12 months after the
individual you refer subscribes to our services. For example, if you refer a customer who signs up for our
280/monthplanandthecustomstayswithusfor12 + months, you ′ llreceive12paymentsof28 for a total of $336 over the course of the first
year. If the customer leaves after five months, you'll receive compensation for those five months.
Chris is a YouTube host with an audience of more than 20,000 subscribers where he posts trading and finance-related content
in an easy-to-digest format. He is often appreciated for his ability to simply present complex concepts. Chris originally
organically posted a review of various algorithmic trading platforms that caught our eye, so we invited him to join the
Over a period of two months, Chris and the QuantConnect team collaborated to design a series of video topics that would be
interesting for the broader community. Chris always had complete content ownership and artistic control over his content. He
often sought a “content reviewˮ from the QuantConnect team in a private Slack channel to help maintain the technical accuracy
and quality of the videos. We were mindful to update him about new features that might impact or improve his videos. Each time
Chris published a video, we would re-share it on all our social media channels to increase his video reach. We were always
motivated to get high-quality content to the community so they can learn more effectively.
Through his channel and the partnership with QuantConnect, Chris was able to create a long-term passive income from his
content. Each month, he drives approximately 500 users to QuantConnect and 10-15 subscribe to become long-term clients.
Within six months, he has built a passive recurring revenue stream of $250/month.
Become a Partner
To apply for the QuantConnect Affiliate Program, fill in the application form .
API Reference
API Reference
The QuantConnect REST API lets you communicate with our cloud servers through URL endpoints.
Authentication
Project Management
File Management
Compiling Code
Backtest Management
Live Management
Optimization Management
Reports
Account
Lean Version
Examples
API Reference > Authentication
API Reference
Authentication
Introduction
Make authenticated REST requests to the QuantConnect API with your User-id and API-Token. Use a simple API endpoint to
verify the authentication is working correctly.
Authenticating Requests
Requests to QuantConnect API v2 require a hashed combination of time, and the API token. The unixtime stamp combination
serves as a nonce token as each request is sent with a different signature but never requires sending the API token itself.
Hashing
PY
# Get timestamp
timestamp = str(int(time.time()))
time_stamped_token = "<your_api_token>" + ':' + timestamp
Follow the below example to install the hashing into the headings and make an API request.
PY
# Create POST Request with headers (optional: Json Content as data argument).
response = requests.post("<request_url>",
data = {},
json = {}, # Some request requires json param (must remove the data param in this case)
headers = headers)
content = response.text
Authentication status check endpoint to verify the hashing function is working successfully. The /authenticate API does not
require any information, but just an authenticated hash in the header.
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
{
Example "success": true
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management
API Reference
Project Management
The QuantConnect REST API lets you manage your projects on our cloud servers through URL endpoints.
Create Project
Read Project
Update Project
Delete Project
Collaboration
Nodes
API Reference > Project Management > Create Project
Project Management
Create Project
Introduction
Description
Create a project with the specified name and programming language. If the project-name already exists, API call returns
Request
Name and language of the project to create. The /projects/create API accepts requests in the following format:
CreateProjectRequest Model - Request to create a project with the specified name and language via QuantConnect.com
API.
string
name
Project name.
string Enum
language
Programming langage to use. Options : ['C#', 'Py']
string
organizationId Optional parameter for specifying organization to create
project under. If none provided web defaults to preferred.
{
"name": "string",
Example "language": "C#",
"organizationId": "string"
}
Responses
200 Success
Project Array
projects
List of projects for the authenticated user.
LeanVersion Array
versions
List of LEAN versions.
success boolean
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
Example
{
"projects": [
{
"projectId": 0,
"organizationId": 0,
"name": "string",
"modified": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"ownerId": 0,
"language": "C#",
"collaborators": [
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
],
"leanVersionId": 0,
"leanPinnedToMaster": true,
"owner": true,
"description": "string",
"channelId": "string",
"parameters": [
{
"name": "string",
"value": 0
}
],
"libraries": [
{
"projectId": 0,
"libraryName": "string",
"ownerName": "string",
"access": true
}
],
"grid": "string",
"liveGrid": "string",
"paperEquity": 0,
"lastLiveDeployment": "2021-11-
26T15:18:27.693Z",
"liveForm": ,
"encrypted": true,
"codeRunning": true,
"leanEnvironment": 0,
"encryptionKey": {
"id": "string",
"name": "string"
}
}
],
"versions": [
{
"id": ,
"created": "2021-11-26T15:18:27.693Z",
"description": "string",
"leanHash": "string",
"leanCloudHash": "string",
"name": "string",
"ref": "string",
"public":
}
],
"success": true,
"errors": [
"string"
]
}
Project Model - Response from reading a project by id.
integer
projectId
Project id.
integer
organizationId
Orgainization id.
string
name
Name of the project.
string($date-time)
modified
Modified date for the project.
string($date-time)
created
Date the project was created.
integer
ownerId
Owner id.
string Enum
language
Programming language of the project. Options : ['C#', 'Py']
Collaborator Array
collaborators
List of collaborators.
integer
leanVersionId
The version of LEAN this project is running on.
boolean
leanPinnedToMaster Indicate if the project is pinned to the master branch of
LEAN.
boolean
owner
Indicate if you are the owner of the project.
string
description
The project description.
string
channelId
Channel id.
ParameterSet Array
parameters
Optimization parameters.
Library Array
libraries
The library projects.
string
grid
Configuration of the backtest view grid.
string
liveGrid
Configuration of the live view grid.
number
paperEquity
The equity value of the last paper trading instance.
lastLiveDeployment string($date-time)
The last live deployment active time.
object
liveForm
The last live wizard content used.
boolean
encrypted
Indicates if the project is encrypted.
boolean
codeRunning
Indicates if the project is running or not.
integer
leanEnvironment
LEAN environment of the project running on.
EncryptionKey object
encryptionKey
Encryption key details.
Example
{
"projectId": 0,
"organizationId": 0,
"name": "string",
"modified": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"ownerId": 0,
"language": "C#",
"collaborators": [
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
],
"leanVersionId": 0,
"leanPinnedToMaster": true,
"owner": true,
"description": "string",
"channelId": "string",
"parameters": [
{
"name": "string",
"value": 0
}
],
"libraries": [
{
"projectId": 0,
"libraryName": "string",
"ownerName": "string",
"access": true
}
],
"grid": "string",
"liveGrid": "string",
"paperEquity": 0,
"lastLiveDeployment": "2021-11-
26T15:18:27.693Z",
"liveForm": ,
"encrypted": true,
"codeRunning": true,
"leanEnvironment": 0,
"encryptionKey": {
"id": "string",
"name": "string"
}
}
Collaborator Model
integer
uid
User ID.
boolean
liveControl
Indicate if the user have live control.
string Enum
permission
The permission this user is given. Options : ['read', 'write']
string
publicId
The user public ID.
string
example:
profileImage
https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg
The url of the user profile image.
string
example: [email protected]
email
The registered email of the user.
string
name
The display name of the user.
string
bio
The biography of the user.
boolean
owner
Indicate if the user is the owner of the project.
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
Example
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
ParameterSet Model - Parameter set.
string
name
Name of parameter.
number
value
Value of parameter.
{
"name": "string",
Example
"value": 0
}
Library Model
integer
projectId
Project Id of the library project.
string
libraryName
Name of the library project.
string
ownerName
Name of the library project owner.
boolean
access
Indicate if the library project can be accessed.
{
"projectId": 0,
"libraryName": "string",
Example
"ownerName": "string",
"access": true
}
string
id
Encryption key id.
string
name
Name of the encryption key.
{
"id": "string",
Example "name": "string"
}
LeanVersion Model
int
id
ID of the LEAN version.
string($date-time)
created
Date when this version was created.
string
description
Description of the LEAN version.
string
leanHash
Commit Hash in the LEAN repository.
string
leanCloudHash
Commit Hash in the LEAN Cloud repository.
string
name
Name of the branch where the commit is.
string
ref
Reference to the branch where the commit is.
int
public Indicates if the version is available for the public (1) or not
(0).
{
"id": ,
"created": "2021-11-26T15:18:27.693Z",
"description": "string",
"leanHash": "string",
Example "leanCloudHash": "string",
"name": "string",
"ref": "string",
"public":
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management > Read Project
Project Management
Read Project
Introduction
List details of all projects, or the project matched the passed project ID if the project ID property passed.
Request
The projectId for the project to read, or nothing to get a details list of all projects. The /projects/read API accepts requests in
ReadProjectRequest Model - Request to get details about a specific project or a details list of all projects.
integer
projectId Id of the project. If not provided the API will return a details
list of all projects.
{
Example "projectId": 0
}
Responses
200 Success
Project Array
projects
List of projects for the authenticated user.
LeanVersion Array
versions
List of LEAN versions.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"projects": [
{
"projectId": 0,
"organizationId": 0,
"name": "string",
"modified": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"ownerId": 0,
"language": "C#",
"collaborators": [
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
],
"leanVersionId": 0,
"leanPinnedToMaster": true,
"owner": true,
"description": "string",
"channelId": "string",
"parameters": [
{
"name": "string",
Example
"value": 0
}
],
"libraries": [
{
"projectId": 0,
"libraryName": "string",
"ownerName": "string",
"access": true
}
],
"grid": "string",
"liveGrid": "string",
"paperEquity": 0,
"lastLiveDeployment": "2021-11-
26T15:18:27.693Z",
"liveForm": ,
"encrypted": true,
"codeRunning": true,
"leanEnvironment": 0,
"encryptionKey": {
"id": "string",
"name": "string"
}
}
],
"versions": [
{
"id": ,
"created": "2021-11-26T15:18:27.693Z",
"description": "string",
"leanHash": "string",
"leanCloudHash": "string",
"name": "string",
"ref": "string",
"public":
}
],
"success": true,
"errors": [
"string"
]
}
Project Model - Response from reading a project by id.
integer
projectId
Project id.
integer
organizationId
Orgainization id.
string
name
Name of the project.
string($date-time)
modified
Modified date for the project.
string($date-time)
created
Date the project was created.
integer
ownerId
Owner id.
string Enum
language
Programming language of the project. Options : ['C#', 'Py']
Collaborator Array
collaborators
List of collaborators.
integer
leanVersionId
The version of LEAN this project is running on.
boolean
leanPinnedToMaster Indicate if the project is pinned to the master branch of
LEAN.
boolean
owner
Indicate if you are the owner of the project.
string
description
The project description.
string
channelId
Channel id.
ParameterSet Array
parameters
Optimization parameters.
Library Array
libraries
The library projects.
string
grid
Configuration of the backtest view grid.
string
liveGrid
Configuration of the live view grid.
number
paperEquity
The equity value of the last paper trading instance.
string($date-time)
lastLiveDeployment
The last live deployment active time.
object
liveForm
The last live wizard content used.
boolean
encrypted
Indicates if the project is encrypted.
boolean
codeRunning
Indicates if the project is running or not.
integer
leanEnvironment
LEAN environment of the project running on.
EncryptionKey object
encryptionKey
Encryption key details.
{
Example "projectId": 0,
"organizationId": 0,
"name": "string",
"modified": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"ownerId": 0,
"language": "C#",
"collaborators": [
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
],
"leanVersionId": 0,
"leanPinnedToMaster": true,
"owner": true,
"description": "string",
"channelId": "string",
"parameters": [
{
"name": "string",
"value": 0
}
],
"libraries": [
{
"projectId": 0,
"libraryName": "string",
"ownerName": "string",
"access": true
}
],
"grid": "string",
"liveGrid": "string",
"paperEquity": 0,
"lastLiveDeployment": "2021-11-
26T15:18:27.693Z",
"liveForm": ,
"encrypted": true,
"codeRunning": true,
"leanEnvironment": 0,
"encryptionKey": {
"id": "string",
"name": "string"
}
}
Collaborator Model
integer
uid
User ID.
boolean
liveControl
Indicate if the user have live control.
string Enum
permission
The permission this user is given. Options : ['read', 'write']
string
publicId
The user public ID.
string
example:
profileImage
https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg
The url of the user profile image.
string
email example: [email protected]
The registered email of the user.
string
name
The display name of the user.
string
bio
The biography of the user.
boolean
owner
Indicate if the user is the owner of the project.
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
Example
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
ParameterSet Model - Parameter set.
string
name
Name of parameter.
number
value
Value of parameter.
{
"name": "string",
Example "value": 0
}
Library Model
integer
projectId
Project Id of the library project.
string
libraryName
Name of the library project.
string
ownerName
Name of the library project owner.
boolean
access
Indicate if the library project can be accessed.
{
"projectId": 0,
"libraryName": "string",
Example "ownerName": "string",
"access": true
}
string
id
Encryption key id.
string
name
Name of the encryption key.
{
"id": "string",
Example
"name": "string"
}
LeanVersion Model
int
id
ID of the LEAN version.
string($date-time)
created
Date when this version was created.
string
description
Description of the LEAN version.
string
leanHash
Commit Hash in the LEAN repository.
string
leanCloudHash
Commit Hash in the LEAN Cloud repository.
string
name
Name of the branch where the commit is.
string
ref
Reference to the branch where the commit is.
int
public Indicates if the version is available for the public (1) or not
(0).
{
"id": ,
"created": "2021-11-26T15:18:27.693Z",
"description": "string",
"leanHash": "string",
Example
"leanCloudHash": "string",
"name": "string",
"ref": "string",
"public":
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management > Update Project
Project Management
Update Project
Introduction
Request
integer
projectId
Project Id to which the file belongs.
string
name
The new name for the project.
object
description
The new description for the project.
{
"projectId": 0,
Example "name": "string",
"description":
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
401 Authentication Error
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management > Delete Project
Project Management
Delete Project
Introduction
Delete a project.
Request
integer
projectId
Project Id to which the file belongs.
{
Example "projectId": 0
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management > Collaboration
Project Management
Collaboration
API Reference > Project Management > Collaboration > Create Project Collaborator
Collaboration
Create Project Collaborator
Introduction
Request
integer
projectId
Project Id we sent for compile.
string
collaboratorUserId
User Id of the collaborator we want to add.
bool
collaborationLiveControl
Gives the right to deploy and stop live algorithms.
bool
collaborationWrite
Gives the right to edit the code.
{
"projectId": 0,
"collaboratorUserId": "string",
Example
"collaborationLiveControl": ,
"collaborationWrite":
}
Responses
200 Success
CreateCollaboratorResponse Model - Response received when creating collaborator.
Collaborator Array
collaborators
List of collaborators.
boolean
success
Indicate if the API request was successful.
{
"collaborators": [
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
Example
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
],
"success": true
}
Collaborator Model
integer
uid
User ID.
boolean
liveControl
Indicate if the user have live control.
string Enum
permission
The permission this user is given. Options : ['read', 'write']
string
publicId
The user public ID.
string
example:
profileImage
https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg
The url of the user profile image.
string
email example: [email protected]
The registered email of the user.
string
name
The display name of the user.
string
bio
The biography of the user.
boolean
owner
Indicate if the user is the owner of the project.
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
Example
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management > Collaboration > Read Project Collaborators
Collaboration
Read Project Collaborators
Introduction
Request
integer
projectId Id of the project from which to read one or multiple
collaborators.
{
Example "projectId": 0
}
Responses
200 Success
ReadCollaboratorsResponse Model - Response received when reading the collaborators of a project.
Collaborator Array
collaborators
List of collaborators.
boolean
userLiveControl Indicate if the user has the right to deploy and stop live
algorithms.
string
userPermissions
List the user permissions - write/read.
boolean
success
Indicate if the API request was successful.
{
"collaborators": [
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
integer
uid
User ID.
boolean
liveControl
Indicate if the user have live control.
string Enum
permission
The permission this user is given. Options : ['read', 'write']
string
publicId
The user public ID.
string
example:
profileImage
https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg
The url of the user profile image.
string
email example: [email protected]
The registered email of the user.
string
name
The display name of the user.
string
bio
The biography of the user.
boolean
owner
Indicate if the user is the owner of the project.
{
"uid": 0,
"liveControl": true,
"permission": "read",
"publicId": "string",
"profileImage":
"https://cdn.quantconnect.com/web/i/users/profile/abc123.jpeg",
Example
"email": "[email protected]",
"name": "string",
"bio": "string",
"owner": true
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management > Nodes
Project Management
Nodes
API Reference > Project Management > Nodes > Read Project Nodes
Nodes
Read Project Nodes
Introduction
Request
string
projectId
Project Id to which the nodes refer.
{
Example "projectId": "string"
}
Responses
200 Success
ProjectNodesResponse Model - Response received when reading all nodes of a project.
#/components/schemas/ProjectNodes
nodes
List of project nodes.
boolean
autoSelectNode
Indicate if a node is automatically selected.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"nodes": ,
"autoSelectNode": true,
"success": true,
Example "errors": [
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Project Management > Nodes > Update Project Nodes
Nodes
Update Project Nodes
Introduction
Update the active state of some nodes to true. If you don't provide any nodes, all the nodes become inactive and
AutoSelectNode is true.
Request
integer
projectId
Project Id to which the nodes refer.
string Array
nodes
List of node Id to update.
{
"projectId": 0,
"nodes": [
Example
"string"
]
}
Responses
200 Success
ProjectNodesResponse Model - Response received when reading all nodes of a project.
#/components/schemas/ProjectNodes
nodes
List of project nodes.
boolean
autoSelectNode
Indicate if a node is automatically selected.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"nodes": ,
"autoSelectNode": true,
"success": true,
Example
"errors": [
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > File Management
API Reference
File Management
The QuantConnect REST API lets you manage your files on our cloud servers through URL endpoints.
Create File
Read File
Update File
Delete File
API Reference > File Management > Create File
File Management
Create File
Introduction
Request
Project, file name and file content to create. The /files/create API accepts requests in the following format:
integer
projectId
Project Id to which the file belongs.
string
example:
name
main.py
The name of the new file.
string
content
The content of the new file.
{
"projectId": 0,
Example "name": "main.py",
"content": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > File Management > Read File
File Management
Read File
Introduction
If a ReadSingleFileRequest is passed, reads that file from the project. If a ReadAllFilesRequest is passed, reads all files in the
project.
Request
An array list of files from the project requested. The /files/read API accepts requests in the following format:
ReadFilesRequest Model - Request to read all files from a project or just one (if the name is provided).
integer
projectId
Project Id to which the file belongs.
string
name
Optional. The name of the file that will be read.
{
"projectId": 0,
Example "name": "string"
}
Responses
200 Success
ProjectFilesResponse Model - Response received when reading files from a project.
ProjectFile Array
files
List of project file information.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"files": [
{
"id": ,
"projectId": ,
"name": "string",
"content": "string",
"modified": "2021-11-26T15:18:27.693Z",
Example "open": true,
"isLibrary": true
}
],
"success": true,
"errors": [
"string"
]
}
ProjectFile Model - File for a project.
int
id
ID of the project file. This can also be null.
int
projectId
ID of the project.
string
name
Name of a project file.
string
content
Contents of the project file.
string($date-time)
modified
DateTime project file was modified.
boolean
open
Indicates if the project file is open or not.
boolean
isLibrary Indicates if the project file is a library or not. It's always
false in live/read and backtest/read.
{
"id": ,
"projectId": ,
"name": "string",
Example "content": "string",
"modified": "2021-11-26T15:18:27.693Z",
"open": true,
"isLibrary": true
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > File Management > Update File
File Management
Update File
Introduction
Request
Information about the file to update along with the new properties to set. The /files/update API accepts requests in the
following format:
integer
projectId
Project Id to which the file belongs.
string
oldFileName
The current name of the file.
string
newName
The new name for the file.
{
"projectId": 0,
Example "oldFileName": "string",
"newName": "string"
}
integer
projectId
Project Id to which the file belongs.
string
name
The name of the file that should be updated.
string
content
The new contents of the file.
{
"projectId": 0,
Example "name": "string",
"content": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > File Management > Delete File
File Management
Delete File
Introduction
Request
Project Id and filename to specify the file for deletion. The /files/delete API accepts requests in the following format:
integer
projectId
Project Id to which the file belongs.
string
name
The name of the file that should be deleted.
{
"projectId": 0,
Example
"name": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
string
www_authenticate
Header
API Reference > Compiling Code
API Reference
Compiling Code
The QuantConnect REST API lets you compile your projects on our cloud servers through URL endpoints.
Compiling Code
Create Compilation Job
Introduction
Request
Project Id specifying project to build. The /compile/create API accepts requests in the following format:
integer
projectId
Project Id we wish to compile.
{
Example "projectId": 0
}
Responses
200 Success
CompileResponse Model - Response from the compiler on a build event.
string
compileId
Compile Id for a sucessful build.
string Enum
state True on successful compile. Options : ['InQueue',
'BuildSuccess', 'BuildError']
integer
projectId
Project Id we sent for compile.
string
signature
Signature key of compilation.
string Array
signatureOrder
Signature order of files to be compiled.
string Array
logs
Logs of the compilation request.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"compileId": "string",
"state": "InQueue",
"projectId": 0,
"signature": "string",
"signatureOrder": [
"string"
],
Example
"logs": [
"string"
],
"success": true,
"errors": [
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Compiling Code > Read Compilation Result
Compiling Code
Read Compilation Result
Introduction
Request
Read a compile result for a specific Project Id and Compile Id. The /compile/read API accepts requests in the following format:
integer
projectId
Project Id we sent for compile.
string
compileId
Compile Id returned during the creation request.
{
"projectId": 0,
Example "compileId": "string"
}
Responses
200 Success
CompileResponse Model - Response from the compiler on a build event.
string
compileId
Compile Id for a sucessful build.
string Enum
state True on successful compile. Options : ['InQueue',
'BuildSuccess', 'BuildError']
integer
projectId
Project Id we sent for compile.
string
signature
Signature key of compilation.
string Array
signatureOrder
Signature order of files to be compiled.
string Array
logs
Logs of the compilation request.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"compileId": "string",
"state": "InQueue",
"projectId": 0,
"signature": "string",
"signatureOrder": [
"string"
],
Example "logs": [
"string"
],
"success": true,
"errors": [
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management
API Reference
Backtest Management
The QuantConnect REST API lets you manage backtests on our cloud servers through URL endpoints.
Create Backtest
Read Backtest
Update Backtest
Delete Backtest
List Backtests
Introduction
Request
Information required to update the tags collection for a backtest. The /backtests/tags/update API accepts requests in the
following format:
integer
projectId
Project Id for the backtest we want to update.
string Array
tags
Array of the new backtest tags.
{
"projectId": 0,
"backtestId": ,
Example "tags": [
"string"
]
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management > Create Backtest
Backtest Management
Create Backtest
Introduction
Request
Create a new backtest given a project Id and compile Id. The /backtests/create API accepts requests in the following format:
integer
projectId
Project Id we sent for compile.
string
compileId
Compile Id for the project to backtest.
string
backtestName
Name for the new backtest.
object
example: value
parameters[name] Parameters used in the backtest. E.g.,
parameters[ema_fast] = 10, parameters[ema_slow] = 100,
etc.
{
"projectId": 0,
"compileId": "string",
Example "backtestName": "string",
"parameters[name]": "value"
}
Responses
200 Success
BacktestResult Array
backtest
Collection of backtests for a project.
boolean
debugging
Indicates if the backtest is run under debugging mode.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"backtest": [
{
"note": "string",
"name": "string",
"organizationId": 0,
"projectId": 0,
"completed": true,
"optimizationId": "string",
"backtestId": "string",
"tradeableDates": 0,
"researchGuide": {
"minutes": 0,
"backtestCount": 0,
"parameters": 0
},
"backtestStart": "2021-11-26T15:18:27.693Z",
"backtestEnd": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"snapshotId": 0,
"status": "Completed.",
"error": "string",
"stacktrace": "string",
"progress": 0,
"hasInitializeError": true,
"charts": {
"name": "string"
},
"parameterSet": {
"name": "string",
"value": 0
},
"rollingWindow": {
"tradeStatistics": {
"startDateTime": "2021-11-
26T15:18:27.693Z",
"endDateTime": "2021-11-
26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-
26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-
26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"runtimeStatistics": {
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
"Probabilistic Sharpe Ratio": "50.00%",
"Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
Example
},
"statistics": {
"Total Orders": "string",
"Average Win": "string",
"Average Loss": "string",
"Compounding Annual Return": "string",
"Drawdown": "string",
"Expectancy": "string",
"Start Equity": "string",
"End Equity": "string",
"Net Profit": "string",
"Sharpe Ratio": "string",
"Sortino Ratio": "string",
"Probabilistic Sharpe Ratio": "string",
"Loss Rate": "string",
"Win Rate": "string",
"Profit-Loss Ratio": "string",
"Alpha": "string",
"Alpha": "string",
"Beta": "string",
"Annual Standard Deviation": "string",
"Annual Variance": "string",
"Information Ratio": "string",
"Tracking Error": "string",
"Treynor Ratio": "string",
"Total Fees": "string",
"Estimated Strategy Capacity": "string",
"Lowest Capacity Asset": "string",
"Portfolio Turnover": "string"
},
"totalPerformance": {
"tradeStatistics": {
"startDateTime": "2021-11-
26T15:18:27.693Z",
"endDateTime": "2021-11-
26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-
26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-
26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"nodeName": "string",
"outOfSampleMaxEndDate": "2021-11-
26T15:18:27.693Z",
"outOfSampleDays": 0
}
],
"debugging": true,
"success": true,
"errors": [
"string"
]
}
BacktestResult Model - Results object class. Results are exhaust from backtest or live algorithms running in LEAN.
string
note
Note on the backtest attached by the user.
string
name
Name of the backtest.
integer
organizationId
Organization ID.
integer
projectId
Project ID.
boolean
completed
Boolean true when the backtest is completed.
string
optimizationId Optimization task ID, if the backtest is part of an
optimization.
string
backtestId
Assigned backtest ID.
integer
tradeableDates
Number of traadeable days.
ResearchGuide object
researchGuide A power gauge for backtests, time and parameters to
estimate the overfitting risk.
string($date-time)
backtestStart
The starting time of the backtest.
string($date-time)
backtestEnd
The ending time of the backtest.
string($date-time)
created
Backtest creation date and time.
integer
snapshotId
Snapshot id of this backtest result.
string Enum
status Status of the backtest. Options : ['Completed.', 'In
Queue...', "'Running: _%'"]
string
error
Backtest error message.
string
stacktrace
Backtest error stacktrace.
number
progress
Progress of the backtest in percent 0-1.
boolean
hasInitializeError
Indicates if the backtest has error during initialization.
ChartSummary object
charts Charts updates for the live algorithm since the last result
packet.
ParameterSet object
parameterSet
Parameters used in the backtest.
AlgorithmPerformance object
rollingWindow
Rolling window detailed statistics.
RuntimeStatistics object
runtimeStatistics Runtime banner/updating statistics in the title banner of the
live algorithm GUI.
StatisticsResult object
statistics
Statistics information sent during the algorithm operations.
AlgorithmPerformance object
totalPerformance
The algorithm performance statistics.
string
nodeName
The backtest node name.
string($date-time)
outOfSampleMaxEndDate
End date of out of sample data.
integer
outOfSampleDays
Number of days of out of sample days.
{
"note": "string",
"name": "string",
"organizationId": 0,
"projectId": 0,
"completed": true,
"optimizationId": "string",
"backtestId": "string",
"tradeableDates": 0,
"researchGuide": {
"minutes": 0,
"backtestCount": 0,
"parameters": 0
},
"backtestStart": "2021-11-26T15:18:27.693Z",
"backtestEnd": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"snapshotId": 0,
"status": "Completed.",
"error": "string",
"stacktrace": "string",
"progress": 0,
"hasInitializeError": true,
"charts": {
"name": "string"
},
"parameterSet": {
"name": "string",
"value": 0
},
"rollingWindow": {
"tradeStatistics": {
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"runtimeStatistics": {
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
"Probabilistic Sharpe Ratio": "50.00%",
Example "Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
},
"statistics": {
"Total Orders": "string",
"Average Win": "string",
"Average Loss": "string",
"Compounding Annual Return": "string",
"Drawdown": "string",
"Expectancy": "string",
"Start Equity": "string",
"End Equity": "string",
"Net Profit": "string",
"Sharpe Ratio": "string",
"Sortino Ratio": "string",
"Probabilistic Sharpe Ratio": "string",
"Loss Rate": "string",
"Win Rate": "string",
"Profit-Loss Ratio": "string",
"Alpha": "string",
"Beta": "string",
"Annual Standard Deviation": "string",
"Annual Variance": "string",
"Information Ratio": "string",
"Tracking Error": "string",
"Treynor Ratio": "string",
"Total Fees": "string",
"Estimated Strategy Capacity": "string",
"Lowest Capacity Asset": "string",
"Portfolio Turnover": "string"
"Portfolio Turnover": "string"
},
"totalPerformance": {
"tradeStatistics": {
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"nodeName": "string",
"outOfSampleMaxEndDate": "2021-11-
26T15:18:27.693Z",
"outOfSampleDays": 0
}
ResearchGuide Model - A power gauge for backtests, time and parameters to estimate the overfitting risk.
integer
minutes
Number of minutes used in developing the current backtest.
integer
backtestCount
The quantity of backtests run in the project.
integer
parameters
Number of parameters detected.
{
"minutes": 0,
Example "backtestCount": 0,
"parameters": 0
}
string
name
Name of the Chart.
{
Example "name": "string"
}
ParameterSet Model - Parameter set.
string
name
Name of parameter.
number
value
Value of parameter.
{
"name": "string",
Example
"value": 0
}
AlgorithmPerformance Model - The AlgorithmPerformance class is a wrapper for TradeStatistics and PortfolioStatistics.
TradeStatistics object
tradeStatistics
A set of statistics calculated from a list of closed trades.
PortfolioStatistics object
portfolioStatistics Represents a set of statistics calculated from equity and
benchmark samples.
Trade Array
closedTrades
The algorithm statistics on portfolio.
{
"tradeStatistics": {
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
Example "averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
}
string($date-time)
startDateTime
The entry date/time of the first trade.
string($date-time)
endDateTime
The exit date/time of the first trade.
integer
totalNumberOfTrades
The total number of trades.
integer
numberOfWinningTrades
The total number of winning trades.
integer
numberOfLosingTrades
The total number of losing trades.
number
totalProfitLoss
The total profit/loss for all trades (as symbol currency).
number
totalProfit
The total profit for all winning trades (as symbol currency).
number
totalLoss
The total loss for all losing trades (as symbol currency).
number
largestProfit
The largest profit in a single trade (as symbol currency).
number
largestLoss
The largest loss in a single trade (as symbol currency).
number
averageProfitLoss The average profit/loss (a.k.a. Expectancy or Average
Trade) for all trades (as symbol currency).
number
averageProfit The average profit for all winning trades (as symbol
currency).
number
averageLoss The average loss for all winning trades (as symbol
currency).
string
averageTradeDuration
The average duration for all trades.
string
averageWinningTradeDuration
The average duration for all winning trades.
string
averageLosingTradeDuration
The average duration for all losing trades.
string
medianTradeDuration
The median duration for all trades.
string
medianWinningTradeDuration
The median duration for all winning trades.
string
medianLosingTradeDuration
The median duration for all losing trades.
integer
maxConsecutiveWinningTrades
The maximum number of consecutive winning trades.
integer
maxConsecutiveLosingTrades
The maximum number of consecutive losing trades.
number
profitLossRatio The ratio of the average profit per trade to the average loss
per trade.
number
winLossRatio The ratio of the number of winning trades to the number of
losing trades.
number
winRate The ratio of the number of winning trades to the total
number of trades.
number
lossRate The ratio of the number of losing trades to the total number
of trades.
number
averageMAE
The average Maximum Adverse Excursion for all trades.
number
averageMFE
The average Maximum Adverse Excursion for all trades.
number
largestMAE
The average Maximum Favorable Excursion for all trades.
number
largestMFE The largest Maximum Adverse Excursion in a single trade
(as symbol currency).
number
maximumClosedTradeDrawdown The maximum closed-trade drawdown for all trades (as
symbol currency).
number
maximumIntraTradeDrawdown The maximum intra-trade drawdown for all trades (as
symbol currency).
number
profitLossStandardDeviation The standard deviation of the profits/losses for all trades
(as symbol currency).
number
profitLossDownsideDeviation The downside deviation of the profits/losses for all trades
(as symbol currency).
number
profitFactor
The ratio of the total profit to the total loss.
number
sharpeRatio The ratio of the average profit/loss to the standard
deviation.
number
sortinoRatio The ratio of the average profit/loss to the downside
deviation.
number
profitToMaxDrawdownRatio The ratio of the total profit/loss to the maximum closed
trade drawdown.
number
maximumEndTradeDrawdown The maximum amount of profit given back by a single trade
before exit (as symbol currency).
number
averageEndTradeDrawdown The average amount of profit given back by all trades
before exit (as symbol currency).
string
maximumDrawdownDuration The maximum amount of time to recover from a drawdown
(longest time between new equity highs or peaks).
number
totalFees
The sum of fees for all trades.
{
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
Example "profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
}
PortfolioStatistics Model - Represents a set of statistics calculated from equity and benchmark samples.
number
averageWinRate
The average rate of return for winning trades.
number
averageLossRate
The average rate of return for losing trades.
number
profitLossRatio
The ratio of the average win rate to the average loss rate.
number
winRate The ratio of the number of winning trades to the total
number of trades.
number
lossRate The ratio of the number of losing trades to the total number
of trades.
number
expectancy
The expected value of the rate of return.
number
startEquity
Initial Equity Total Value.
number
endEquity
Final Equity Total Value.
number
compoundingAnnualReturn Annual compounded returns statistic based on the final-
starting capital and years.
number
drawdown
Drawdown maximum percentage.
number
totalNetProfit
The total net profit percentage.
number
sharpeRatio Sharpe ratio with respect to risk free rate: measures excess
of return per unit of risk.
number
Probabilistic Sharpe Ratio is a probability measure
probabilisticSharpeRatio associated with the Sharpe ratio. It informs us of the
probability that the estimated Sharpe ratio is greater than a
chosen benchmark.
number
sortinoRatio Sortino ratio with respect to risk free rate; measures excess
of return per unit of downside risk.
number
Algorithm "Alpha" statistic - abnormal returns over the risk
alpha
free rate and the relationshio (beta) with the benchmark
returns.
number
Algorithm beta statistic - the covariance between the
beta
algorithm and benchmark performance, divided by
benchmark variance.
number
annualStandardDeviation
Annualized standard deviation.
number
annualVariance Annualized variance statistic calculation using the daily
performance variance and trading days per year.
number
informationRatio
Information ratio - risk adjusted return.
number
Tracking error volatility (TEV) statistic - a measure of how
trackingError
closely a portfolio follows the index to which it is
benchmarked.
number
Treynor ratio statistic is a measurement of the returns
treynorRatio
earned in excess of that which could have been earned on
an investment that has no diversifiable risk.
number
portfolioTurnover
The average Portfolio Turnover.
number
The 1-day VaR for the portfolio, using the Variance-
valueAtRisk99 covariance approach. Assumes a 99% confidence level, 1
year lookback period, and that the returns are normally
distributed.
number
The 1-day VaR for the portfolio, using the Variance-
valueAtRisk95 covariance approach. Assumes a 95% confidence level, 1
year lookback period, and that the returns are normally
distributed.
{
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
Example "portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
}
Symbol object
Represents a unique security identifier. This is made of two
symbol components, the unique SID and the Value. The value is the
current ticker symbol while the SID is constant over the life
of a security.
string($date-time)
entryTime
The date and time the trade was opened.
number
entryPrice The price at which the trade was opened (or the average
price if multiple entries).
string Enum
direction
Direction of a trade. Options : ['Long', 'Short']
number
quantity
The total unsigned quantity of the trade.
string($date-time)
exitTime
The date and time the trade was closed.
number
exitPrice The price at which the trade was closed (or the average
price if multiple exits).
number
profitLoss
The gross profit/loss of the trade (as account currency).
number
totalFees The total fees associated with the trade (always positive
value) (as account currency).
number
mae
The Maximum Adverse Excursion (as account currency).
number
mfe
The Maximum Favorable Excursion (as account currency).
string
duration
The duration of the trade.
number
endTradeDrawdown The amount of profit given back before the trade was
closed.
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
Example "quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
Symbol Model - Represents a unique security identifier. This is made of two components, the unique SID and the Value. The
value is the current ticker symbol while the SID is constant over the life of a security.
string
value
The current symbol for this ticker.
string
id
The security identifier for this symbol.
string
permtick
The current symbol for this ticker.
{
"value": "string",
Example "id": "string",
"permtick": "string"
}
RuntimeStatistics Model
string
example:
Equity
$100.00
Total portfolio value.
string
Fees example: -$100.00
Transaction fee.
string
example:
Holdings
$100.00
Equity value of security holdings.
string
example:
Net Profit
$100.00
Net profit.
string
Probabilistic Sharpe Ratio example: 50.00%
Probabilistic Sharpe Ratio.
string
Return example: 50.00%
Return.
string
example:
Unrealized
$100.00
Unrealized profit/loss.
string
example:
Volume
$100.00
Total transaction volume.
{
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
Example "Probabilistic Sharpe Ratio": "50.00%",
"Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
}
string
Total Orders
Total nuber of orders.
string
Average Win
The average rate of return for winning trades.
string
Average Loss
The average rate of return for losing trades.
string
Compounding Annual Return Annual compounded returns statistic based on the final-
starting capital and years.
string
Drawdown
Drawdown maximum percentage.
string
Expectancy
The expected value of the rate of return.
string
Start Equity
Initial Equity Total Value.
string
End Equity
Final Equity Total Value.
string
Net Profit
The total net profit percentage.
string
Sharpe Ratio Sharpe ratio with respect to risk free rate; measures excess
of return per unit of risk.
string
Sortino Ratio Sortino ratio with respect to risk free rate; measures excess
of return per unit of downside risk.
string
Is a probability measure associated with the Sharpe ratio. It
Probabilistic Sharpe Ratio
informs us of the probability that the estimated Sharpe ratio
is greater than a chosen benchmark.
string
Loss Rate The ratio of the number of losing trades to the total number
of trades.
string
Win Rate The ratio of the number of winning trades to the total
number of trades.
string
Profit-Loss Ratio
The ratio of the average win rate to the average loss rate.
string
Algorithm "Alpha" statistic - abnormal returns over the risk
Alpha
free rate and the relationshio (beta) with the benchmark
returns.
string
Algorithm "beta" statistic - the covariance between the
Beta
algorithm and benchmark performance, divided by
benchmark's variance.
string
Annual Standard Deviation
Annualized standard deviation.
string
Annual Variance Annualized variance statistic calculation using the daily
performance variance and trading days per year.
string
Information Ratio
Information ratio - risk adjusted return.
string
Tracking error volatility (TEV) statistic - a measure of how
Tracking Error
closely a portfolio follows the index to which it is
benchmarked.
string
Treynor ratio statistic is a measurement of the returns
Treynor Ratio
earned in excess of that which could have been earned on
an investment that has no diversifiable risk.
string
Total Fees
Total amount of fees.
string
Estimated Strategy Capacity The estimated total capacity of the strategy at a point in
time.
string
Lowest Capacity Asset Provide a reference to the lowest capacity symbol used in
scaling down the capacity for debugging.
string
Portfolio Turnover
The average Portfolio Turnover.
{
"Total Orders": "string",
"Average Win": "string",
"Average Loss": "string",
"Compounding Annual Return": "string",
"Drawdown": "string",
"Expectancy": "string",
"Start Equity": "string",
"End Equity": "string",
"Net Profit": "string",
"Sharpe Ratio": "string",
"Sortino Ratio": "string",
"Probabilistic Sharpe Ratio": "string",
"Loss Rate": "string",
"Win Rate": "string",
"Profit-Loss Ratio": "string",
"Alpha": "string",
"Beta": "string",
"Annual Standard Deviation": "string",
"Annual Variance": "string",
"Information Ratio": "string",
"Tracking Error": "string",
"Treynor Ratio": "string",
"Total Fees": "string",
"Estimated Strategy Capacity": "string",
"Lowest Capacity Asset": "string",
"Portfolio Turnover": "string"
}
Example
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management > Read Backtest
Backtest Management
Read Backtest
The QuantConnect REST API lets you read backtest results from our cloud servers through URL endpoints.
Backtest Statistics
Charts
Orders
Insights
API Reference > Backtest Management > Read Backtest > Backtest Statistics
Read Backtest
Backtest Statistics
Introduction
Read out that backtest from the project (optionally with the charts included).
Request
Fetch the results for the project Id and backtest Id provided (and optional chart name provided). The /backtests/read API
integer
projectId Id of the project from which to read one or multiple
backtests.
string
backtestId
When provided, specific backtest Id to read.
string
chart Optional. If provided, the API will return the backtests
charts.
{
"projectId": 0,
Example "backtestId": "string",
"chart": "string"
}
Responses
200 Success
BacktestResult Array
backtest
Collection of backtests for a project.
boolean
debugging
Indicates if the backtest is run under debugging mode.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"backtest": [
{
"note": "string",
"name": "string",
"organizationId": 0,
"projectId": 0,
"completed": true,
"optimizationId": "string",
"backtestId": "string",
"tradeableDates": 0,
"researchGuide": {
"minutes": 0,
"backtestCount": 0,
"parameters": 0
},
"backtestStart": "2021-11-26T15:18:27.693Z",
"backtestEnd": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"snapshotId": 0,
"status": "Completed.",
"error": "string",
"stacktrace": "string",
"progress": 0,
"hasInitializeError": true,
"charts": {
"name": "string"
},
"parameterSet": {
"name": "string",
"value": 0
},
"rollingWindow": {
"tradeStatistics": {
"startDateTime": "2021-11-
26T15:18:27.693Z",
"endDateTime": "2021-11-
26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-
26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-
26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"runtimeStatistics": {
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
"Probabilistic Sharpe Ratio": "50.00%",
"Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
Example },
"statistics": {
"Total Orders": "string",
"Average Win": "string",
"Average Loss": "string",
"Compounding Annual Return": "string",
"Drawdown": "string",
"Expectancy": "string",
"Start Equity": "string",
"End Equity": "string",
"Net Profit": "string",
"Sharpe Ratio": "string",
"Sortino Ratio": "string",
"Probabilistic Sharpe Ratio": "string",
"Loss Rate": "string",
"Win Rate": "string",
"Profit-Loss Ratio": "string",
"Alpha": "string",
"Beta": "string",
"Annual Standard Deviation": "string",
"Annual Variance": "string",
"Information Ratio": "string",
"Tracking Error": "string",
"Treynor Ratio": "string",
"Treynor Ratio": "string",
"Total Fees": "string",
"Estimated Strategy Capacity": "string",
"Lowest Capacity Asset": "string",
"Portfolio Turnover": "string"
},
"totalPerformance": {
"tradeStatistics": {
"startDateTime": "2021-11-
26T15:18:27.693Z",
"endDateTime": "2021-11-
26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-
26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-
26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"nodeName": "string",
"outOfSampleMaxEndDate": "2021-11-
26T15:18:27.693Z",
"outOfSampleDays": 0
}
],
"debugging": true,
"success": true,
"errors": [
"string"
]
}
BacktestResult Model - Results object class. Results are exhaust from backtest or live algorithms running in LEAN.
string
note
Note on the backtest attached by the user.
string
name
Name of the backtest.
integer
organizationId
Organization ID.
integer
projectId
Project ID.
boolean
completed
Boolean true when the backtest is completed.
string
optimizationId Optimization task ID, if the backtest is part of an
optimization.
string
backtestId
Assigned backtest ID.
integer
tradeableDates
Number of traadeable days.
ResearchGuide object
researchGuide A power gauge for backtests, time and parameters to
estimate the overfitting risk.
string($date-time)
backtestStart
The starting time of the backtest.
string($date-time)
backtestEnd
The ending time of the backtest.
string($date-time)
created
Backtest creation date and time.
integer
snapshotId
Snapshot id of this backtest result.
string Enum
status Status of the backtest. Options : ['Completed.', 'In
Queue...', "'Running: _%'"]
string
error
Backtest error message.
string
stacktrace
Backtest error stacktrace.
number
progress
Progress of the backtest in percent 0-1.
boolean
hasInitializeError
Indicates if the backtest has error during initialization.
ChartSummary object
charts Charts updates for the live algorithm since the last result
packet.
ParameterSet object
parameterSet
Parameters used in the backtest.
AlgorithmPerformance object
rollingWindow
Rolling window detailed statistics.
RuntimeStatistics object
runtimeStatistics Runtime banner/updating statistics in the title banner of the
live algorithm GUI.
StatisticsResult object
statistics
Statistics information sent during the algorithm operations.
AlgorithmPerformance object
totalPerformance
The algorithm performance statistics.
string
nodeName
The backtest node name.
string($date-time)
outOfSampleMaxEndDate
End date of out of sample data.
integer
outOfSampleDays
Number of days of out of sample days.
{
"note": "string",
"note": "string",
"name": "string",
"organizationId": 0,
"projectId": 0,
"completed": true,
"optimizationId": "string",
"backtestId": "string",
"tradeableDates": 0,
"researchGuide": {
"minutes": 0,
"backtestCount": 0,
"parameters": 0
},
"backtestStart": "2021-11-26T15:18:27.693Z",
"backtestEnd": "2021-11-26T15:18:27.693Z",
"created": "2021-11-26T15:18:27.693Z",
"snapshotId": 0,
"status": "Completed.",
"error": "string",
"stacktrace": "string",
"progress": 0,
"hasInitializeError": true,
"charts": {
"name": "string"
},
"parameterSet": {
"name": "string",
"value": 0
},
"rollingWindow": {
"tradeStatistics": {
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"runtimeStatistics": {
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
"Probabilistic Sharpe Ratio": "50.00%",
Example "Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
},
"statistics": {
"Total Orders": "string",
"Average Win": "string",
"Average Loss": "string",
"Compounding Annual Return": "string",
"Drawdown": "string",
"Expectancy": "string",
"Start Equity": "string",
"End Equity": "string",
"Net Profit": "string",
"Sharpe Ratio": "string",
"Sortino Ratio": "string",
"Probabilistic Sharpe Ratio": "string",
"Loss Rate": "string",
"Win Rate": "string",
"Profit-Loss Ratio": "string",
"Alpha": "string",
"Beta": "string",
"Annual Standard Deviation": "string",
"Annual Variance": "string",
"Information Ratio": "string",
"Tracking Error": "string",
"Treynor Ratio": "string",
"Total Fees": "string",
"Estimated Strategy Capacity": "string",
"Lowest Capacity Asset": "string",
"Portfolio Turnover": "string"
},
"totalPerformance": {
"tradeStatistics": {
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
},
"nodeName": "string",
"outOfSampleMaxEndDate": "2021-11-
26T15:18:27.693Z",
"outOfSampleDays": 0
}
ResearchGuide Model - A power gauge for backtests, time and parameters to estimate the overfitting risk.
integer
minutes
Number of minutes used in developing the current backtest.
integer
backtestCount
The quantity of backtests run in the project.
integer
parameters
Number of parameters detected.
{
"minutes": 0,
Example "backtestCount": 0,
"parameters": 0
}
string
name
Name of the Chart.
{
Example "name": "string"
}
ParameterSet Model - Parameter set.
string
name
Name of parameter.
number
value
Value of parameter.
{
"name": "string",
Example "value": 0
}
AlgorithmPerformance Model - The AlgorithmPerformance class is a wrapper for TradeStatistics and PortfolioStatistics.
TradeStatistics object
tradeStatistics
A set of statistics calculated from a list of closed trades.
PortfolioStatistics object
portfolioStatistics Represents a set of statistics calculated from equity and
benchmark samples.
Trade Array
closedTrades
The algorithm statistics on portfolio.
{
"tradeStatistics": {
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
"profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
},
"portfolioStatistics": {
"averageWinRate": 0,
Example "averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
"portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
},
"closedTrades": [
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
"quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
]
}
string($date-time)
startDateTime
The entry date/time of the first trade.
string($date-time)
endDateTime
The exit date/time of the first trade.
integer
totalNumberOfTrades
The total number of trades.
integer
numberOfWinningTrades
The total number of winning trades.
integer
numberOfLosingTrades
The total number of losing trades.
number
totalProfitLoss
The total profit/loss for all trades (as symbol currency).
number
totalProfit
The total profit for all winning trades (as symbol currency).
number
totalLoss
The total loss for all losing trades (as symbol currency).
number
largestProfit
The largest profit in a single trade (as symbol currency).
number
largestLoss
The largest loss in a single trade (as symbol currency).
number
averageProfitLoss The average profit/loss (a.k.a. Expectancy or Average
Trade) for all trades (as symbol currency).
number
averageProfit The average profit for all winning trades (as symbol
currency).
number
averageLoss The average loss for all winning trades (as symbol
currency).
string
averageTradeDuration
The average duration for all trades.
string
averageWinningTradeDuration
The average duration for all winning trades.
string
averageLosingTradeDuration
The average duration for all losing trades.
string
medianTradeDuration
The median duration for all trades.
string
medianWinningTradeDuration
The median duration for all winning trades.
string
medianLosingTradeDuration
The median duration for all losing trades.
integer
maxConsecutiveWinningTrades
The maximum number of consecutive winning trades.
integer
maxConsecutiveLosingTrades
The maximum number of consecutive losing trades.
number
profitLossRatio The ratio of the average profit per trade to the average loss
per trade.
number
winLossRatio The ratio of the number of winning trades to the number of
losing trades.
number
winRate The ratio of the number of winning trades to the total
number of trades.
number
lossRate The ratio of the number of losing trades to the total number
of trades.
number
averageMAE
The average Maximum Adverse Excursion for all trades.
number
averageMFE
The average Maximum Adverse Excursion for all trades.
number
largestMAE
The average Maximum Favorable Excursion for all trades.
number
largestMFE The largest Maximum Adverse Excursion in a single trade
(as symbol currency).
number
maximumClosedTradeDrawdown The maximum closed-trade drawdown for all trades (as
symbol currency).
number
maximumIntraTradeDrawdown The maximum intra-trade drawdown for all trades (as
symbol currency).
number
profitLossStandardDeviation The standard deviation of the profits/losses for all trades
(as symbol currency).
number
profitLossDownsideDeviation The downside deviation of the profits/losses for all trades
(as symbol currency).
number
profitFactor
The ratio of the total profit to the total loss.
number
sharpeRatio The ratio of the average profit/loss to the standard
deviation.
number
sortinoRatio The ratio of the average profit/loss to the downside
deviation.
number
profitToMaxDrawdownRatio The ratio of the total profit/loss to the maximum closed
trade drawdown.
number
maximumEndTradeDrawdown The maximum amount of profit given back by a single trade
before exit (as symbol currency).
number
averageEndTradeDrawdown The average amount of profit given back by all trades
before exit (as symbol currency).
string
maximumDrawdownDuration The maximum amount of time to recover from a drawdown
(longest time between new equity highs or peaks).
number
totalFees
The sum of fees for all trades.
{
"startDateTime": "2021-11-26T15:18:27.693Z",
"endDateTime": "2021-11-26T15:18:27.693Z",
"totalNumberOfTrades": 0,
"numberOfWinningTrades": 0,
"numberOfLosingTrades": 0,
"totalProfitLoss": 0,
"totalProfit": 0,
"totalLoss": 0,
"largestProfit": 0,
"largestLoss": 0,
"averageProfitLoss": 0,
"averageProfit": 0,
"averageLoss": 0,
"averageTradeDuration": "string",
"averageWinningTradeDuration": "string",
"averageLosingTradeDuration": "string",
"medianTradeDuration": "string",
"medianWinningTradeDuration": "string",
"medianLosingTradeDuration": "string",
"maxConsecutiveWinningTrades": 0,
"maxConsecutiveLosingTrades": 0,
"profitLossRatio": 0,
"winLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"averageMAE": 0,
"averageMFE": 0,
"largestMAE": 0,
"largestMFE": 0,
"maximumClosedTradeDrawdown": 0,
"maximumIntraTradeDrawdown": 0,
"profitLossStandardDeviation": 0,
Example "profitLossDownsideDeviation": 0,
"profitFactor": 0,
"sharpeRatio": 0,
"sortinoRatio": 0,
"profitToMaxDrawdownRatio": 0,
"maximumEndTradeDrawdown": 0,
"averageEndTradeDrawdown": 0,
"maximumDrawdownDuration": "string",
"totalFees": 0
}
PortfolioStatistics Model - Represents a set of statistics calculated from equity and benchmark samples.
number
averageWinRate
The average rate of return for winning trades.
number
averageLossRate
The average rate of return for losing trades.
number
profitLossRatio
The ratio of the average win rate to the average loss rate.
number
winRate The ratio of the number of winning trades to the total
number of trades.
number
lossRate The ratio of the number of losing trades to the total number
of trades.
number
expectancy
The expected value of the rate of return.
number
startEquity
Initial Equity Total Value.
number
endEquity
Final Equity Total Value.
number
compoundingAnnualReturn Annual compounded returns statistic based on the final-
starting capital and years.
number
drawdown
Drawdown maximum percentage.
number
totalNetProfit
The total net profit percentage.
number
sharpeRatio Sharpe ratio with respect to risk free rate: measures excess
of return per unit of risk.
number
Probabilistic Sharpe Ratio is a probability measure
probabilisticSharpeRatio associated with the Sharpe ratio. It informs us of the
probability that the estimated Sharpe ratio is greater than a
chosen benchmark.
number
sortinoRatio Sortino ratio with respect to risk free rate; measures excess
of return per unit of downside risk.
number
Algorithm "Alpha" statistic - abnormal returns over the risk
alpha
free rate and the relationshio (beta) with the benchmark
returns.
number
Algorithm beta statistic - the covariance between the
beta
algorithm and benchmark performance, divided by
benchmark variance.
number
annualStandardDeviation
Annualized standard deviation.
number
annualVariance Annualized variance statistic calculation using the daily
performance variance and trading days per year.
number
informationRatio
Information ratio - risk adjusted return.
number
Tracking error volatility (TEV) statistic - a measure of how
trackingError
closely a portfolio follows the index to which it is
benchmarked.
number
Treynor ratio statistic is a measurement of the returns
treynorRatio
earned in excess of that which could have been earned on
an investment that has no diversifiable risk.
number
portfolioTurnover
The average Portfolio Turnover.
number
The 1-day VaR for the portfolio, using the Variance-
valueAtRisk99 covariance approach. Assumes a 99% confidence level, 1
year lookback period, and that the returns are normally
distributed.
number
The 1-day VaR for the portfolio, using the Variance-
valueAtRisk95 covariance approach. Assumes a 95% confidence level, 1
year lookback period, and that the returns are normally
distributed.
{
"averageWinRate": 0,
"averageLossRate": 0,
"profitLossRatio": 0,
"winRate": 0,
"lossRate": 0,
"expectancy": 0,
"startEquity": 0,
"endEquity": 0,
"compoundingAnnualReturn": 0,
"drawdown": 0,
"totalNetProfit": 0,
"sharpeRatio": 0,
"probabilisticSharpeRatio": 0,
"sortinoRatio": 0,
"alpha": 0,
"beta": 0,
"annualStandardDeviation": 0,
"annualVariance": 0,
"informationRatio": 0,
"trackingError": 0,
"treynorRatio": 0,
Example "portfolioTurnover": 0,
"valueAtRisk99": 0,
"valueAtRisk95": 0
}
Symbol object
Represents a unique security identifier. This is made of two
symbol components, the unique SID and the Value. The value is the
current ticker symbol while the SID is constant over the life
of a security.
string($date-time)
entryTime
The date and time the trade was opened.
number
entryPrice The price at which the trade was opened (or the average
price if multiple entries).
string Enum
direction
Direction of a trade. Options : ['Long', 'Short']
number
quantity
The total unsigned quantity of the trade.
string($date-time)
exitTime
The date and time the trade was closed.
number
exitPrice The price at which the trade was closed (or the average
price if multiple exits).
number
profitLoss
The gross profit/loss of the trade (as account currency).
number
totalFees The total fees associated with the trade (always positive
value) (as account currency).
number
mae
The Maximum Adverse Excursion (as account currency).
number
mfe
The Maximum Favorable Excursion (as account currency).
string
duration
The duration of the trade.
number
endTradeDrawdown The amount of profit given back before the trade was
closed.
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"entryTime": "2021-11-26T15:18:27.693Z",
"entryPrice": 0,
"direction": "Long",
Example "quantity": 0,
"exitTime": "2021-11-26T15:18:27.693Z",
"exitPrice": 0,
"profitLoss": 0,
"totalFees": 0,
"mae": 0,
"mfe": 0,
"duration": "string",
"endTradeDrawdown": 0
}
Symbol Model - Represents a unique security identifier. This is made of two components, the unique SID and the Value. The
value is the current ticker symbol while the SID is constant over the life of a security.
string
value
The current symbol for this ticker.
string
id
The security identifier for this symbol.
string
permtick
The current symbol for this ticker.
{
"value": "string",
Example "id": "string",
"permtick": "string"
}
RuntimeStatistics Model
string
example:
Equity
$100.00
Total portfolio value.
string
Fees example: -$100.00
Transaction fee.
string
example:
Holdings
$100.00
Equity value of security holdings.
string
example:
Net Profit
$100.00
Net profit.
string
Probabilistic Sharpe Ratio example: 50.00%
Probabilistic Sharpe Ratio.
string
Return example: 50.00%
Return.
string
example:
Unrealized
$100.00
Unrealized profit/loss.
string
example:
Volume
$100.00
Total transaction volume.
{
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
Example "Probabilistic Sharpe Ratio": "50.00%",
"Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
}
string
Total Orders
Total nuber of orders.
string
Average Win
The average rate of return for winning trades.
string
Average Loss
The average rate of return for losing trades.
string
Compounding Annual Return Annual compounded returns statistic based on the final-
starting capital and years.
string
Drawdown
Drawdown maximum percentage.
string
Expectancy
The expected value of the rate of return.
string
Start Equity
Initial Equity Total Value.
string
End Equity
Final Equity Total Value.
string
Net Profit
The total net profit percentage.
string
Sharpe Ratio Sharpe ratio with respect to risk free rate; measures excess
of return per unit of risk.
string
Sortino Ratio Sortino ratio with respect to risk free rate; measures excess
of return per unit of downside risk.
string
Is a probability measure associated with the Sharpe ratio. It
Probabilistic Sharpe Ratio
informs us of the probability that the estimated Sharpe ratio
is greater than a chosen benchmark.
string
Loss Rate The ratio of the number of losing trades to the total number
of trades.
string
Win Rate The ratio of the number of winning trades to the total
number of trades.
string
Profit-Loss Ratio
The ratio of the average win rate to the average loss rate.
string
Algorithm "Alpha" statistic - abnormal returns over the risk
Alpha
free rate and the relationshio (beta) with the benchmark
returns.
string
Algorithm "beta" statistic - the covariance between the
Beta
algorithm and benchmark performance, divided by
benchmark's variance.
string
Annual Standard Deviation
Annualized standard deviation.
string
Annual Variance Annualized variance statistic calculation using the daily
performance variance and trading days per year.
string
Information Ratio
Information ratio - risk adjusted return.
string
Tracking error volatility (TEV) statistic - a measure of how
Tracking Error
closely a portfolio follows the index to which it is
benchmarked.
string
Treynor ratio statistic is a measurement of the returns
Treynor Ratio
earned in excess of that which could have been earned on
an investment that has no diversifiable risk.
string
Total Fees
Total amount of fees.
string
Estimated Strategy Capacity The estimated total capacity of the strategy at a point in
time.
string
Lowest Capacity Asset Provide a reference to the lowest capacity symbol used in
scaling down the capacity for debugging.
string
Portfolio Turnover
The average Portfolio Turnover.
{
"Total Orders": "string",
"Average Win": "string",
"Average Loss": "string",
"Compounding Annual Return": "string",
"Drawdown": "string",
"Expectancy": "string",
"Start Equity": "string",
"End Equity": "string",
"Net Profit": "string",
"Sharpe Ratio": "string",
"Sortino Ratio": "string",
"Probabilistic Sharpe Ratio": "string",
"Loss Rate": "string",
"Win Rate": "string",
"Profit-Loss Ratio": "string",
"Alpha": "string",
"Beta": "string",
"Annual Standard Deviation": "string",
"Annual Variance": "string",
"Information Ratio": "string",
"Tracking Error": "string",
"Treynor Ratio": "string",
"Total Fees": "string",
"Estimated Strategy Capacity": "string",
"Lowest Capacity Asset": "string",
"Portfolio Turnover": "string"
}
Example
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management > Read Backtest > Charts
Read Backtest
Charts
Introduction
Request
Request body to obtain a chart from a backtest. The /backtests/chart/read API accepts requests in the following format:
integer
projectId
Project ID of the request.
string
name
The requested chart name.
integer
start
The Utc start seconds timestamp of the request.
integer
end
The Utc end seconds timestamp of the request.
integer
count
The number of data points to request.
string
backtestId
Associated Backtest ID for this chart request.
{
"projectId": 0,
"name": "string",
"start": 0,
Example "end": 0,
"count": 0,
"backtestId": "string"
}
Responses
200 Success
LoadingChartResponse Model - Response when the requested chart is being generated.
number
progress
Loading percentage of the chart generation process.
string
example:
status
loading
Status of the chart generation process.
boolean
success
Indicate if the API request was successful.
{
"progress": 0,
Example "status": "loading",
"success": true
}
ReadChartResponse Model - Response with the requested chart from a live algorithm or backtest.
Chart object
chart
Single Parent Chart Object for Custom Charting.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"chart": {
"name": "string",
"chartType": "Overlay",
"series": {
"name": "string",
"unit": "string",
"index": 0,
"values": [
"object"
],
"seriesType": "Line",
"color": "string",
"scatterMarkerSymbol": "none"
Example
}
},
"success": true,
"errors": [
"string"
]
}
Chart Model - Single Parent Chart Object for Custom Charting.
string
name
Name of the Chart.
string Enum
chartType Type of the Chart, Overlayed or Stacked. Options :
['Overlay', 'Stacked']
Series object
series
List of Series Objects for this Chart.
{
"name": "string",
"chartType": "Overlay",
"series": {
"name": "string",
"unit": "string",
"index": 0,
Example "values": [
"object"
],
"seriesType": "Line",
"color": "string",
"scatterMarkerSymbol": "none"
}
}
Series Model - Chart Series Object - Series data and properties for a chart.
string
name
Name of the series.
string
unit
Axis for the chart series.
integer
index
Index/position of the series on the chart.
object Array
Values for the series plot. These values are assumed to be
values
in ascending time order (first points earliest, last points
latest).
string Enum
seriesType Chart type for the series. Options : ['Line', 'Scatter',
'Candle', 'Bar', 'Flag', 'StackedArea', 'Pie', 'Treemap']
string
color
Color the series.
string Enum
Shape or symbol for the marker in a scatter plot. Options :
scatterMarkerSymbol
['none', 'circle', 'square', 'diamond', 'triangle', 'triangle-
down']
{
"name": "string",
"unit": "string",
"index": 0,
"values": [
Example "object"
],
"seriesType": "Line",
"color": "string",
"scatterMarkerSymbol": "none"
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management > Read Backtest > Orders
Read Backtest
Orders
Introduction
Request
Fetch the orders of a backtest for the project Id, backtest Id and steps provided. The /backtests/orders/read API accepts
integer
start Starting index of the orders to be fetched. Required if end >
100.
integer
end Last index of the orders to be fetched. Note that end - start
must be less than 100.
integer
projectId
Id of the project from which to read the backtest.
string
backtestId
Id of the backtest from which to read the orders.
{
"start": 0,
"end": 0,
Example
"projectId": 0,
"backtestId": "string"
}
Responses
200 Success
BacktestOrdersResponse Model - Contains orders and the number of orders of the backtest in the request criteria.
Order object
orders
/.
integer
length
Total number of returned orders.
{
"orders": {
"id": 0,
"contingentId": 0,
"brokerId": [
"string"
],
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"limitPrice": ,
"stopPrice": 0,
"stopTriggered": ,
"price": 0,
"priceCurrency": "string",
"time": "2021-11-26T15:18:27.693Z",
"createdTime": "2021-11-26T15:18:27.693Z",
"lastFillTime": "2021-11-26T15:18:27.693Z",
"lastUpdateTime": "2021-11-26T15:18:27.693Z",
"canceledTime": "2021-11-26T15:18:27.693Z",
"quantity": 0,
"type": 0 = Market,
"status": 0 = New,
"tag": "string",
"securityType": 0 = Base,
"direction": 0 = Buy,
"value": 0,
"orderSubmissionData": {
"bidPrice": 0,
"askPrice": 0,
"lastPrice": 0
},
"isMarketable": true,
"properties": {
"timeInForce": 0 = GoodTilCanceled
},
"events": [
{
Example "algorithmId": "string",
"symbol": "string",
"symbolValue": "string",
"symbolPermtick": "string",
"orderId": 0,
"orderEventId": 0,
"id": 0,
"status": "new",
"orderFeeAmount": 0,
"orderFeeCurrency": "string",
"fillPrice": 0,
"fillPriceCurrency": "string",
"fillQuantity": 0,
"direction": "string",
"message": "string",
"isAssignment": true,
"stopPrice": 0,
"limitPrice": 0,
"quantity": 0,
"time": 0,
"isInTheMoney":
}
],
"trailingAmount": 0,
"trailingPercentage": ,
"groupOrderManager": {
"id": 0,
"quantity": 0,
"count": 0,
"limitPrice": 0,
"orderIds": [
"integer"
],
"direction": 0
},
"triggerPrice": 0,
"triggerTouched":
},
"length": 0
}
Order Model - Order struct for placing new trade.
integer
id
Order ID.
integer
contingentId
Order Id to process before processing this order.
string Array
brokerId Brokerage Id for this order for when the brokerage splits
orders into multiple pieces.
Symbol object
Represents a unique security identifier. This is made of two
symbol components, the unique SID and the Value. The value is the
current ticker symbol while the SID is constant over the life
of a security.
nummber
limitPrice
Limit price of the Order.
number
stopPrice
Stop price of the Order.
bool
stopTriggered Indicates if the stop price has been reached, so the limit
order has been triggered.
number
price
Price of the Order.
string
priceCurrency
Currency for the order price.
string($date-time)
time
Gets the utc time the order was created.
string($date-time)
createdTime
Gets the utc time this order was created. Alias for Time.
string($date-time)
lastFillTime Gets the utc time the last fill was received, or null if no fills
have been received.
string($date-time)
lastUpdateTime Gets the utc time this order was last updated, or null if the
order has not been updated.
string($date-time)
canceledTime Gets the utc time this order was canceled, or null if the
order was not canceled.
number
quantity
Number of shares to execute.
integer Enum
Order type. Options : ['0 = Market', '1 = Limit', '2 =
StopMarket', '3 = StopLimit', '4 = MarketOnOpen', '5 =
type
MarketOnClose', '6 = OptionExercise', '7 = LimitIfTouched',
'8 = ComboMarket', '9 = ComboLimit', '10 =
ComboLegLimit', '11 = TrailingStop']
integer Enum
Status of the Order. Options : ['0 = New', '1 = Submitted', '2
status
= PartiallyFilled', '3 = Filled', '5 = Canceled', '6 = None', '7 =
Invalid', '8 = CancelPending', '9 = UpdateSubmitted']
string
tag
Tag the order with some custom data.
integer Enum
Type of tradable security / underlying asset. Options : ['0 =
securityType
Base', '1 = Equity', '2 = Option', '3 = Commodity', '4 =
Forex', '5 = Future', '6 = Cfd', '7 = Crypto']
integer Enum
direction Order Direction Property based off Quantity. Options : ['0 =
Buy', '1 = Sell', '2 = Hold']
number
value Gets the executed value of this order. If the order has not
yet filled, then this will return zero.
OrderSubmissionData object
orderSubmissionData Stores time and price information available at the time an
order was submitted.
boolean
isMarketable
Returns true if the order is a marketable order.
OrderProperties object
properties
Additional properties of the order.
OrderEvent Array
events
The order events.
number
trailingAmount
Trailing amount for a trailing stop order.
bool
trailingPercentage Determines whether the trailingAmount is a percentage or
an absolute currency value.
GroupOrderManager object
groupOrderManager
Manager of a group of orders.
number
triggerPrice The price which, when touched, will trigger the setting of a
limit order at limitPrice.
bool
triggerTouched
Whether or not the triggerPrice has been touched.
{
"id": 0,
"contingentId": 0,
"brokerId": [
"string"
],
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"limitPrice": ,
"stopPrice": 0,
"stopTriggered": ,
"price": 0,
"priceCurrency": "string",
"time": "2021-11-26T15:18:27.693Z",
"createdTime": "2021-11-26T15:18:27.693Z",
"lastFillTime": "2021-11-26T15:18:27.693Z",
"lastUpdateTime": "2021-11-26T15:18:27.693Z",
"canceledTime": "2021-11-26T15:18:27.693Z",
"quantity": 0,
"type": 0 = Market,
"status": 0 = New,
"tag": "string",
"securityType": 0 = Base,
"direction": 0 = Buy,
"value": 0,
"orderSubmissionData": {
"bidPrice": 0,
"askPrice": 0,
"lastPrice": 0
},
"isMarketable": true,
"properties": {
"timeInForce": 0 = GoodTilCanceled
Example },
"events": [
{
"algorithmId": "string",
"symbol": "string",
"symbolValue": "string",
"symbolPermtick": "string",
"orderId": 0,
"orderEventId": 0,
"id": 0,
"status": "new",
"orderFeeAmount": 0,
"orderFeeCurrency": "string",
"fillPrice": 0,
"fillPriceCurrency": "string",
"fillQuantity": 0,
"direction": "string",
"message": "string",
"isAssignment": true,
"stopPrice": 0,
"limitPrice": 0,
"quantity": 0,
"time": 0,
"isInTheMoney":
}
],
"trailingAmount": 0,
"trailingPercentage": ,
"groupOrderManager": {
"id": 0,
"quantity": 0,
"count": 0,
"limitPrice": 0,
"orderIds": [
"integer"
],
"direction": 0
},
"triggerPrice": 0,
"triggerTouched":
}
Symbol Model - Represents a unique security identifier. This is made of two components, the unique SID and the Value. The
value is the current ticker symbol while the SID is constant over the life of a security.
string
value
The current symbol for this ticker.
string
id
The security identifier for this symbol.
string
permtick
The current symbol for this ticker.
{
"value": "string",
Example "id": "string",
"permtick": "string"
}
OrderSubmissionData Model - Stores time and price information available at the time an order was submitted.
number
bidPrice
The bid price at an order submission time.
number
askPrice
The ask price at an order submission time.
number
lastPrice
The current price at an order submission time.
{
"bidPrice": 0,
Example "askPrice": 0,
"lastPrice": 0
}
object Enum
Defines the length of time over which an order will continue
timeInForce
working before it is cancelled. Options : ['0 =
GoodTilCanceled', '1 = Day', '2 = GoodTilDate']
{
Example "timeInForce": 0 = GoodTilCanceled
}
OrderEvent Model - Change in an order state applied to user algorithm portfolio
string
algorithmId
Algorithm Id, BacktestId or DeployId.
string
symbol
Easy access to the order symbol associated with this event.
string
symbolValue The current symbol for this ticker; It is a user friendly
symbol representation.
string
symbolPermtick
The original symbol used to generate this symbol.
integer
orderId
Id of the order this event comes from.
integer
orderEventId
The unique order event id for each order.
integer
id
The unique order event Id for each order.
string Enum
Status of the Order. Options : ['new', 'submitted',
status
'partiallyFilled', 'filled', 'canceled', 'none', 'invalid',
'cancelPending', 'updateSubmitted']
number
orderFeeAmount
The fee amount associated with the order.
string
orderFeeCurrency
The fee currency associated with the order.
number
fillPrice
Fill price information about the order.
string
fillPriceCurrency
Currency for the fill price.
number
fillQuantity
Number of shares of the order that was filled in this event.
string
direction
Order direction.
string
message
Any message from the exchange.
boolean
isAssignment
True if the order event is an assignment.
number
stopPrice
The current stop price.
number
limitPrice
The current limit price.
number
quantity
The current order quantity.
integer
time
The time of this event in unix timestamp.
bool
isInTheMoney
True if the order event's option is In-The-Money (ITM).
{
"algorithmId": "string",
"symbol": "string",
"symbolValue": "string",
"symbolPermtick": "string",
"orderId": 0,
"orderEventId": 0,
"id": 0,
"status": "new",
"orderFeeAmount": 0,
"orderFeeCurrency": "string",
Example "fillPrice": 0,
"fillPriceCurrency": "string",
"fillQuantity": 0,
"direction": "string",
"message": "string",
"isAssignment": true,
"stopPrice": 0,
"limitPrice": 0,
"quantity": 0,
"time": 0,
"isInTheMoney":
}
GroupOrderManager Model - Manager of a group of orders.
integer
id
The unique order group Id.
number
quantity
The group order quantity.
integer
count
The total order count associated with this order group.
number
limitPrice
The limit price associated with this order group if any.
integer Array
orderIds
The order Ids in this group.
integer
direction
Order Direction Property based off Quantity.
{
"id": 0,
"quantity": 0,
"count": 0,
"limitPrice": 0,
Example "orderIds": [
"integer"
],
"direction": 0
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management > Read Backtest > Insights
Read Backtest
Insights
Introduction
Request
Fetch the insights of a backtest for the project Id, backtest Id and steps provided. The /backtests/read/insights API accepts
integer
start Starting index of the insights to be fetched. Required if end
> 100.
integer
end Last index of the insights to be fetched. Note that end -
start must be less than 100.
integer
projectId
Id of the project from which to read the backtest.
string
backtestId
Id of the backtest from which to read the insights.
{
"start": 0,
"end": 0,
Example
"projectId": 0,
"backtestId": "string"
}
Responses
200 Success
BacktestInsightsResponse Model - Contains insights and the number of insights of the backtest in the request criteria.
Insight Array
insights
Collection of insights.
integer
length
Total number of returned insights.
boolean
success
Indicate if the API request was successful.
{
"insights": [
{
"id": "string",
"groupId": "string",
"sourceModel": "string",
"generatedTime": "string",
"createdTime": 0,
"closeTime": 0,
"symbol": "string",
"ticker": "string",
"type": "price",
"reference": "string",
"referenceValueFinal": "string",
Example "direction": "down",
"period": 0,
"magnitude": 0,
"confidence": 0,
"weight": 0,
"scoreIsFinal": ,
"scoreDirection": 0,
"scoreMagnitude": 0,
"estimatedValue": 0,
"tag": "2021-11-26T15:18:27.693Z"
}
],
"length": 0,
"success": true
}
string
id
Insight ID.
string
groupId
ID of the group of insights.
string
sourceModel
Name of the model that sourced the insight.
string
generatedTime
Gets the utc unixtime this insight was generated.
number
createdTime
Gets the utc unixtime this insight was created.
number
closeTime
Gets the utc unixtime this insight was closed.
string
symbol Gets the symbol ID this insight is for.
string
ticker
Gets the symbol ticker this insight is for.
string Enum
type Gets the type of insight, for example, price or volatility.
Options : ['price', 'volatility']
string
reference Gets the initial reference value this insight is predicting
against.
string
referenceValueFinal Gets the final reference value, used for scoring, this insight
is predicting against.
string Enum
direction Gets the predicted direction, down, flat or up. Options :
['down', 'flat', 'up']
number
period Gets the period, in seconds, over which this insight is
expected to come to fruition.
number
magnitude Gets the predicted percent change in the insight type
(price/volatility). This value can be null.
number
confidence
Gets the confidence in this insight. This value can be null.
number
weight Gets the portfolio weight of this insight. This value can be
null.
bool
scoreIsFinal
Gets whether or not this is the insight's final score.
number
scoreDirection
Gets the direction score.
number
scoreMagnitude
Gets the magnitude score.
number
estimatedValue Gets the estimated value of this insight in the account
currency.
string($float)
tag
The insight's tag containing additional information.
{
"id": "string",
"groupId": "string",
"sourceModel": "string",
"generatedTime": "string",
"createdTime": 0,
"closeTime": 0,
"symbol": "string",
"ticker": "string",
"type": "price",
"reference": "string",
"referenceValueFinal": "string",
"direction": "down",
"period": 0,
"magnitude": 0,
Example
"confidence": 0,
"weight": 0,
"scoreIsFinal": ,
"scoreDirection": 0,
"scoreMagnitude": 0,
"estimatedValue": 0,
"tag": "2021-11-26T15:18:27.693Z"
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management > Update Backtest
Backtest Management
Update Backtest
Introduction
Request
A JSON object containing info about the backtest and new name. The /backtests/update API accepts requests in the following
format:
integer
projectId
Project Id for the backtest we want to update.
string
backtestId
Backtest Id we want to update.
string
name
Name we would like to assign to the backtest.
string
note
Note attached to the backtest.
{
"projectId": 0,
"backtestId": "string",
Example "name": "string",
"note": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Backtest Management > Delete Backtest
Backtest Management
Delete Backtest
Introduction
Request
Information required to delete the backtest. The /backtests/delete API accepts requests in the following format:
integer
projectId
Project Id for the backtest we want to delete.
string
backtestId
Backtest Id we want to delete.
{
"projectId": 0,
Example
"backtestId": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
string
www_authenticate
Header
API Reference > Backtest Management > List Backtests
Backtest Management
List Backtests
Introduction
Request
Fetch the results for the project Id provided. The /backtests/list API accepts requests in the following format:
integer
projectId Id of the project from which to read one or multiple
backtests.
boolean
includeStatistics If true, the backtests summaries from the response will
contain the statistics with their corresponding values.
{
"projectId": 0,
Example "includeStatistics": true
}
Responses
200 Success
BacktestSummaryResponse Model - Collection container for a list of backtest summaries for a project.
BacktestSummaryResult Array
backtest
Collection of backtest summaries for a project.
int
count
Number of backtest summaries retrieved in the response.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"backtest": [
{
"backtestId": "string",
"status": "Completed.",
"name": "string",
"created": "2021-11-26T15:18:27.693Z",
"progress": 0,
"optimizationId": "string",
"tradeableDates": 0,
"parameterSet": {
"name": "string",
"value": 0
},
"snapshotId": 0,
"tags": [
"string"
],
"sharpeRatio": ,
"alpha": ,
"beta": ,
"compoundingAnnualReturn": ,
Example
"drawdown": ,
"lossRate": ,
"netProfit": ,
"parameters": ,
"psr": ,
"securityTypes": "string",
"sortinoRatio": ,
"trades": ,
"treynorRatio": ,
"winRate":
}
],
"count": ,
"success": true,
"errors": [
"string"
]
}
BacktestSummaryResult Model - Result object class for the List Backtest response from the API.
string
backtestId
Assigned backtest ID.
string Enum
status Status of the backtest. Options : ['Completed.', 'In
Queue...', "'Running: _%'"]
string
name
Name of the backtest.
string($date-time)
created
Backtest creation date and time.
number
progress
Progress of the backtest in percent 0-1.
string
optimizationId Optimization task ID, if the backtest is part of an
optimization.
integer
tradeableDates
Number of traadeable days.
ParameterSet object
parameterSet
Parameters used in the backtest.
integer
snapshotId
Snapshot id of this backtest result.
string Array
tags
Collection of tags for the backtest.
float
sharpeRatio Sharpe ratio with respect to risk free rate; measures excess
of return per unit of risk.
float
Algorithm "Alpha" statistic - abnormal returns over the risk
alpha
free rate and the relationshio (beta) with the benchmark
returns.
float
Algorithm "beta" statistic - the covariance between the
beta
algorithm and benchmark performance, divided by
benchmark's variance.
float
compoundingAnnualReturn Annual compounded returns statistic based on the final-
starting capital and years.
float
drawdown
Drawdown maximum percentage.
float
lossRate The ratio of the number of losing trades to the total number
of trades.
float
netProfit
Net profit percentage.
int
parameters
Number of parameters in the backtest.
float
psr Price-to-sales ratio.
string
securityTypes
SecurityTypes present in the backtest.
float
sortinoRatio Sortino ratio with respect to risk free rate; measures excess
of return per unit of downside risk.
int
trades
Number of trades in the backtest.
float
Treynor ratio statistic is a measurement of the returns
treynorRatio
earned in excess of that which could have been earned on
an investment that has no diversifiable risk.
float
winRate The ratio of the number of winning trades to the total
number of trades.
{
"backtestId": "string",
"status": "Completed.",
"name": "string",
"created": "2021-11-26T15:18:27.693Z",
"progress": 0,
"optimizationId": "string",
"tradeableDates": 0,
"parameterSet": {
"name": "string",
"value": 0
},
"snapshotId": 0,
"tags": [
"string"
],
"sharpeRatio": ,
"alpha": ,
"beta": ,
"compoundingAnnualReturn": ,
"drawdown": ,
"lossRate": ,
"netProfit": ,
"parameters": ,
"psr": ,
"securityTypes": "string",
"sortinoRatio": ,
"trades": ,
"treynorRatio": ,
"winRate":
}
Example
ParameterSet Model - Parameter set.
string
name
Name of parameter.
number
value
Value of parameter.
{
"name": "string",
Example
"value": 0
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management
API Reference
Live Management
The QuantConnect REST API lets you manage your live algorithms on our cloud servers through URL endpoints.
Live Commands
API Reference > Live Management > Create Live Algorithm
Live Management
Create Live Algorithm
Introduction
Request
Project, compile and brokerage login information for deploying a live algorithm. The /live/create API accepts requests in the
following format:
string
example: -1
integer
projectId
Project Id.
string
compileId
Compile Id.
string
nodeId
Id of the node that will run the algorithm.
object Enum
Brokerage configurations to be used in the live algorithm.
Options : ['QuantConnectSettings',
'InteractiveBrokersSettings', 'BinanceSettings',
'BinanceFuturesUSDMSettings',
brokerage 'BinanceFuturesCOINSettings', 'BinanceUSSettings',
'TradierSettings', 'BitfinexSettings', 'CoinbaseSettings',
'KrakenSettings', 'BybitSettings', 'OandaSettings',
'ZerodhaSettings', 'SamcoSettings', 'WolverineSettings',
'TDAmeritradeSettings', 'TradingTechnologiesSettings',
'RBIBrokerageSettings', 'TerminalLinkSettings']
object
dataProviders Dictionary of data provider configurations to be used in the
live algorithm.
{
"versionId": "-1",
"projectId": 0,
"compileId": "string",
"nodeId": "string",
"brokerage": {
"id": "string",
"holdings": [
{
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
],
"cash": [
{
"amount": 0,
"currency": "string"
}
]
},
"dataProviders": {
"QuantConnectBrokerage": {
Example "id": "string",
"holdings": [
{
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
],
"cash": [
{
"amount": 0,
"currency": "string"
}
]
}
}
}
QuantConnectSettings Model - QuantConnect settings for using it as a brokerage or data provider.
string
id
ID of QuantConnect, this is QuantConnectBrokerage.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
CashAmount Array
cash
List of cash amount.
{
"id": "string",
"holdings": [
{
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
Example }
],
"cash": [
{
"amount": 0,
"currency": "string"
}
]
}
InteractiveBrokersSettings Model - Settings for using Interactive Brokers as brokerage or data provider.
string
id ID of InteractiveBrokers, this is
InteractiveBrokersBrokerage.
string
ib-user-name
Your Interactive Brokers username.
string
ib-password
Your Interactive Brokers password.
string Enum
ib-trading-mode Represents the types of environments supported by
Interactive Brokers for trading. Options : ['live', 'paper']
string
ib-account
Your Interactive Brokers account id.
string($date)
ib-weekly-restart-utc-time
Weekly restart UTC time (hh:mm:ss).
{
"id": "string",
"ib-user-name": "string",
"ib-password": "string",
Example "ib-trading-mode": "live",
"ib-account": "string",
"ib-weekly-restart-utc-time": "2021-11-
26T15:18:27.693Z"
}
BinanceSettings Model
string
id
ID of the brokerage, this is, BinanceBrokerage.
string
binance-exchange-name
Binance exchange, this is, Binance.
string
binance-api-secret
Your Binance API secret.
string
binance-api-key
Your Binance API key.
string
binance-api-url Binance configuration for spot/margin. The value for this
property is https://api.binance.com.
string
binance-websocket-url Binance configuration for spot/margin. The value for this
property is wss://stream.binance.com:9443/ws.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
object
description
/.
{
"id": "string",
"binance-exchange-name": "string",
"binance-api-secret": "string",
"binance-api-key": "string",
"binance-api-url": "string",
"binance-websocket-url": "string",
"holdings": [
Example {
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
],
"description":
}
BinanceFuturesUSDMSettings Model
string
id
ID of the brokerage, this is, BinanceBrokerage.
string
binance-exchange-name
Binance exchange, this is, Binance-USDM-Futures.
string
binance-api-secret
Your Binance API secret.
string
binance-api-key
Your Binance API key.
string
binance-fapi-url Binance Futures configuration for spot/margin. The value
for this property is https://fapi.binance.com.
string
binance-fwebsocket-url Binance Futures configuration for spot/margin. The value
for this property is wss://fstream.binance.com/ws.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
object
description
/.
{
"id": "string",
"binance-exchange-name": "string",
"binance-api-secret": "string",
"binance-api-key": "string",
"binance-fapi-url": "string",
"binance-fwebsocket-url": "string",
"holdings": [
Example {
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
],
"description":
}
BinanceFuturesCOINSettings Model
string
id
ID of the brokerage, this is, BinanceBrokerage.
string
binance-exchange-name
Binance exchange, this is, Binance-COIN-Futures.
string
binance-api-secret
Your Binance API secret.
string
binance-api-key
Your Binance API key.
string
binance-dapi-url Binance Futures configuration for spot/margin. The value
for this property is https://dapi.binance.com.
string
binance-dwebsocket-url Binance Futures configuration for spot/margin. The value
for this property is wss://dstream.binance.com/ws.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
object
description
/.
{
"id": "string",
"binance-exchange-name": "string",
"binance-api-secret": "string",
"binance-api-key": "string",
"binance-dapi-url": "string",
"binance-dwebsocket-url": "string",
"holdings": [
Example {
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
],
"description":
}
BinanceUSSettings Model
string
id
ID of the brokerage, this is, BinanceBrokerage.
string
binance-exchange-name
Binance exchange, this is, BinanceUS.
string
binanceus-api-secret
Your Binance US API secret.
string
binanceus-api-key
Your Binance US API key.
string
binanceus-api-url Binance US configuration for spot/margin. The value for this
property is https://api.binance.us.
string
binanceus-websocket-url Binance US configuration for spot/margin. The value for this
property is wss://stream.binance.us:9443/ws.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
object
description
/.
{
"id": "string",
"binance-exchange-name": "string",
"binanceus-api-secret": "string",
"binanceus-api-key": "string",
"binanceus-api-url": "string",
"binanceus-websocket-url": "string",
"holdings": [
Example {
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
],
"description":
}
TradierSettings Model - Settings for using Tradier as a data provider.
string
id
ID of the brokerage, this is, TradierBrokerage.
string
tradier-account-id
Your Tradier account id.
string
tradier-access-token
Your Tradier access token.
string Enum
tradier-environment Whether the developer sandbox should be used. Options :
['live', 'paper']
{
"id": "string",
"tradier-account-id": "string",
Example "tradier-access-token": "string",
"tradier-environment": "live"
}
string
id
ID of the brokerage, this is, BitfinexBrokerage.
string
bitfinex-api-key
Your Bitfinex API key.
string
bitfinex-api-secret
Your Bitfinex API secret.
{
"id": "string",
Example "bitfinex-api-key": "string",
"bitfinex-api-secret": "string"
}
CoinbaseSettings Model - Settings for using Coinbase as a data provider or brokerage.
string
id
ID of the brokerage, this is, CoinbaseBrokerage.
string
coinbase-api-key
Your Coinbase Advanced Trade API key.
string
coinbase-api-secret
Your Coinbase Advanced Trade API secret.
string
coinbase-url Coinbase URL, this is, wss://advanced-trade-
ws.coinbase.com.
string
coinbase-rest-api
Coinbase REST API, this is, https://api.coinbase.com.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
{
"id": "string",
"coinbase-api-key": "string",
"coinbase-api-secret": "string",
"coinbase-url": "string",
"coinbase-rest-api": "string",
"holdings": [
Example {
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
]
}
KrakenSettings Model - Settings for using Kraken as a data provider.
string
id
ID of the brokerage, this is, KrakenBrokerage.
string
kraken-api-key
Your Kraken API key.
string
kraken-api-secret
Your Kraken API secret.
string
kraken-verification-tier
Your Kraken Verification Tier.
{
"id": "string",
"kraken-api-key": "string",
Example
"kraken-api-secret": "string",
"kraken-verification-tier": "string"
}
BybitSettings Model - Settings for using Bybit as a data provider or brokerage.
string
id
ID of the brokerage, this is, BybitBrokerage.
string
bybit-api-key
Your Bybit API key.
string
bybit-api-secret
Your Bybit API secret.
string
bybit-vip-level
Your Bybit VIP Level.
string Enum
bybit-use-testnet Whether the testnet should be used. Options : ['live',
'paper']
string
bybit-api-url
Bybit API URL, this is, https://api-testnet.bybit.com.
string
bybit-websocket-url
Bybit Websocket URL, this is, wss://stream.bybit.com.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
{
"id": "string",
"bybit-api-key": "string",
"bybit-api-secret": "string",
"bybit-vip-level": "string",
"bybit-use-testnet": "live",
"bybit-api-url": "string",
"bybit-websocket-url": "string",
Example "holdings": [
{
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
]
}
OandaSettings Model - Settings for using Oanda as a data provider or brokerage.
string
id
ID of the brokerage, this is, OandaBrokerage.
string
Your OANDA account id can be found on your OANDA
oanda-account-id Account Statement page
(https://www.oanda.com/account/statement/). It follows
the following format '###-###-######-###'.
string
Your OANDA API token. You can generate an API token
oanda-access-token
from the Manage API Access page
(https://www.oanda.com/account/tpa/personal_token).
string Enum
oanda-environment The environment to run in, Practice for fxTrade Practice,
Trade for fxTrade. Options : ['Practice', 'Trade']
{
"id": "string",
"oanda-account-id": "string",
Example
"oanda-access-token": "string",
"oanda-environment": "Practice"
}
ZerodhaSettings Model - Settings for using Zerodha as a data provider or brokerage.
string
id
Brokerage ID, this is, ZerodhaBrokerage.
string
zerodha-api-key
Your Kite Connect API key.
string
zerodha-access-token
Your Kite Connect access token.
string Enum
The product type must be set to MIS if you are targeting
zerodha-product-type intraday products, CNC if you are targeting delivery
products or NRML if you are targeting carry forward
products. Options : ['mis', 'cnc', 'nrml']
string Enum
The trading segment must be set to 'equity' if you are
zerodha-trading-segment trading equities on NSE or BSE, or 'commodity' if you are
trading commodities on MCX. Options : ['equity',
'commodity']
bool
zerodha-history-subscription
Whether you have a history API subscription for Zerodha.
{
"id": "string",
"zerodha-api-key": "string",
"zerodha-access-token": "string",
Example "zerodha-product-type": "mis",
"zerodha-trading-segment": "equity",
"zerodha-history-subscription":
}
SamcoSettings Model - Settings for using Samco as a data provider or brokerage.
string
id
Brokerage ID, this is, SamcoBrokerage.
string
samco-client-id
Your Samco account Client ID.
string
samco-client-password
Your Samco account password.
int
samco-year-of-birth
Your year of birth (YYYY) registered with Samco.
string Enum
MIS if you are targeting intraday products, CNC if you are
samco-product-type
targeting delivery products, NRML if you are targeting carry
forward products. Options : ['mis', 'cnc', 'nrml']
string Enum
\'equity\' if you are trading equities on NSE or BSE,
samco-trading-segment
commodity if you are trading \'commodities\' on MCX.
Options : ['equity', 'commodity']
{
"id": "string",
"samco-client-id": "string",
"samco-client-password": "string",
Example "samco-year-of-birth": ,
"samco-product-type": "mis",
"samco-trading-segment": "equity"
}
WolverineSettings Model - Settings for using Wolverine Execution Services as a brokerage.
string
id
Brokerage ID, this is, WolverineBrokerage.
string
wolverine-on-behalf-of-comp-id
Value used to identify the trading firm.
string
wolverine-account
Wolverine Execution Services account name.
CashAmount Array
cash
List of cash amount.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
{
"id": "string",
"wolverine-on-behalf-of-comp-id": "string",
"wolverine-account": "string",
"cash": [
{
"amount": 0,
"currency": "string"
}
Example ],
"holdings": [
{
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
]
}
TDAmeritradeSettings Model - Settings for using TDAmeritrade as a data provider or brokerage.
string
id
Brokerage ID, this is, TDAmeritradeBrokerage.
string
tdameritrade-api-key
Your TDAmeritrade API key.
string
tdameritrade-access-token
Your TDAmeritrade OAuth Access Token.
string
tdameritrade-account-number
Your TDAmeritrade account number.
{
"id": "string",
"tdameritrade-api-key": "string",
Example
"tdameritrade-access-token": "string",
"tdameritrade-account-number": "string"
}
TradingTechnologiesSettings Model - Settings for using Trading Technologies as a brokerage.
string
id
Brokerage ID, this is, TradingTechnologiesBrokerage.
string
tt-user-name
Trading Technologies user name.
string
tt-session-password
Trading Technologies session password.
string
tt-account-name
Trading Technologies account name.
string
tt-rest-app-key
Trading Technologies App key.
string
tt-rest-app-secret
Trading Technologies App secret.
string Enum
tt-rest-environment Environment in which the brokerage Trading Technologies
will be used. Options : ['live', 'uat']
string
tt-order-routing-sender-comp-id
Trading Technologies remote comp id.
CashAmount Array
cash
List of cash amount.
{
"id": "string",
"tt-user-name": "string",
"tt-session-password": "string",
"tt-account-name": "string",
"tt-rest-app-key": "string",
"tt-rest-app-secret": "string",
"tt-rest-environment": "live",
Example
"tt-order-routing-sender-comp-id": "string",
"cash": [
{
"amount": 0,
"currency": "string"
}
]
}
RBIBrokerageSettings Model - Settings for using RBI as a brokerage.
string
id
Brokerage ID, this is, RBIBrokerage.
string
rbi-on-behalf-of-comp-id
Value used to identify the trading firm.
string
rbi-account
RBI account name.
CashAmount Array
cash
List of cash amount.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
{
"id": "string",
"rbi-on-behalf-of-comp-id": "string",
"rbi-account": "string",
"cash": [
{
"amount": 0,
"currency": "string"
}
Example ],
"holdings": [
{
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
]
}
TerminalLinkSettings Model - Settings for using TerminalLink as a brokerage.
string
id
Brokerage ID, this is TerminalLinkBrokerage.
string Enum
terminal-link-connection-type Terminal Link Connection Type [DAPI, SAPI]. Options :
['DAPI', 'SAPI']
CashAmount Array
cash
List of cash amount.
BrokerageHolding Array
holdings
List of holdings for the brokerage.
{
"id": "string",
"terminal-link-connection-type": "DAPI",
"cash": [
{
"amount": 0,
"currency": "string"
}
],
Example
"holdings": [
{
"symbolId": "string",
"symbol": "string",
"quantity": 0,
"averagePrice": 0
}
]
}
string
symbolId
Symbol ID of the holding.
string
symbol
Symbol ticker of the holding.
number
quantity
Quantity of the Symbol we hold.
number
averagePrice Average Price of our Holding in the currency the symbol is
traded in.
{
"symbolId": "string",
"symbol": "string",
Example "quantity": 0,
"averagePrice": 0
}
CashAmount Model - Represents a cash amount which can be converted to account currency using a currency converter.
number
amount
The amount of cash.
string
currency
The currency in which the cash amount is denominated.
{
"amount": 0,
Example
"currency": "string"
}
Responses
200 Success
LiveAlgorithm object
live Live algorithm instance result from the QuantConnect Rest
API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"live": {
"projectId": 0,
"deployId": "string",
"status": "DeployError",
"launched": "2021-11-26T15:18:27.693Z",
"stopped": "2021-11-26T15:18:27.693Z",
"brokerage": "Interactive",
"subscription": "string",
"error": "string",
Example
"success": true,
"errors": [
"string"
]
},
"success": true,
"errors": [
"string"
]
}
LiveAlgorithm Model - Live algorithm instance result from the QuantConnect Rest API.
integer
projectId
Project Id for the live instance.
string
deployId Unique live algorithm deployment identifier (similar to a
backtest id).
string Enum
States of a live deployment. Options : ['DeployError',
status 'InQueue', 'Running', 'Stopped', 'Liquidated', 'Deleted',
'Completed', 'RuntimeError', 'Invalid', 'LoggingIn',
'Initializing', 'History']
string($date-time)
launched
Datetime the algorithm was launched in UTC.
string($date-time)
stopped Datetime the algorithm was stopped in UTC, null if its still
running.
string Enum
Brokerage. Options : ['Interactive', 'FXCM', 'Oanda',
brokerage
'Tradier', 'PaperBrokerage', 'Alpaca', 'Bitfinex', 'Binance',
'Coinbase']
string
subscription
Chart we're subscribed to.
string
error Live algorithm error message from a crash or algorithm
runtime error.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"projectId": 0,
"deployId": "string",
"status": "DeployError",
"launched": "2021-11-26T15:18:27.693Z",
"stopped": "2021-11-26T15:18:27.693Z",
"brokerage": "Interactive",
Example "subscription": "string",
"error": "string",
"success": true,
"errors": [
"string"
]
}
string
www_authenticate
Header
API Reference > Live Management > Read Live Algorithm
Live Management
Read Live Algorithm
The QuantConnect REST API lets you read your live algorithm results from our cloud servers through URL endpoints.
Charts
Portfolio State
Orders
Insights
Logs
API Reference > Live Management > Read Live Algorithm > Live Algorithm Statistics
Introduction
If a ReadLiveAlgorithmRequest is provided details on a live algorithm are returned. If a ListLiveAlgorithmsRequest is passed get
Request
Dynamic arguement to specify whether seeking single project or list response. The /live/read API accepts requests in the
following format:
integer
projectId
Id of the project to read.
string
deployId
Specific instance Id to read.
{
"projectId": 0,
Example "deployId": "string"
}
Responses
200 Success
LiveAlgorithmResults Model - Details a live algorithm from the live/read API endpoint.
string
message
Error message.
string
status Indicates the status of the algorihtm, i.e. 'Running',
'Stopped'.
string
deployId
Algorithm deployment ID.
int
cloneId The snapshot project ID for cloning the live development's
source code.
string
launched
Date the live algorithm was launched.
string
stopped
Date the live algorithm was stopped.
string
brokerage
Brokerage used in the live algorithm.
string
securityTypes
Security types present in the live algorithm.
string
projectName
Name of the project the live algorithm is in.
string
dataCenter Name of the data center where the algorithm is physically
located.
bool
public
Indicates if the algorithm is being live shared.
ProjectFile Array
files
Files present in the project in which the algorithm is.
RuntimeStatistics object
Runtime banner/updating statistics in the title banner of the
runtimeStatistics
live algorithm GUI. It can be empty if the algorithm is not
running.
ChartSummary object
charts Chart updates for the live algorithm since the last result
packet.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"message": "string",
"status": "string",
"deployId": "string",
"cloneId": ,
"launched": "string",
"stopped": "string",
"brokerage": "string",
"securityTypes": "string",
"projectName": "string",
"dataCenter": "string",
"public": ,
"files": [
{
"id": ,
"projectId": ,
"name": "string",
"content": "string",
"modified": "2021-11-26T15:18:27.693Z",
"open": true,
"isLibrary": true
}
],
"runtimeStatistics": {
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
Example
"Probabilistic Sharpe Ratio": "50.00%",
"Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
},
"charts": {
"name": "string"
},
"success": true,
"errors": [
"string"
]
}
ProjectFile Model - File for a project.
int
id
ID of the project file. This can also be null.
int
projectId
ID of the project.
string
name
Name of a project file.
string
content
Contents of the project file.
string($date-time)
modified
DateTime project file was modified.
boolean
open
Indicates if the project file is open or not.
boolean
isLibrary Indicates if the project file is a library or not. It's always
false in live/read and backtest/read.
{
"id": ,
"projectId": ,
"name": "string",
Example "content": "string",
"modified": "2021-11-26T15:18:27.693Z",
"open": true,
"isLibrary": true
}
RuntimeStatistics Model
string
example:
Equity
$100.00
Total portfolio value.
string
Fees example: -$100.00
Transaction fee.
string
example:
Holdings
$100.00
Equity value of security holdings.
string
example:
Net Profit
$100.00
Net profit.
string
Probabilistic Sharpe Ratio example: 50.00%
Probabilistic Sharpe Ratio.
string
Return example: 50.00%
Return.
string
example:
Unrealized
$100.00
Unrealized profit/loss.
string
example:
Volume
$100.00
Total transaction volume.
{
"Equity": "$100.00",
"Fees": "-$100.00",
"Holdings": "$100.00",
"Net Profit": "$100.00",
Example "Probabilistic Sharpe Ratio": "50.00%",
"Return": "50.00%",
"Unrealized": "$100.00",
"Volume": "$100.00"
}
ChartSummary Model - Contains the names of all charts
string
name
Name of the Chart.
{
Example "name": "string"
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > Read Live Algorithm > Charts
Introduction
Request
Request body to obtain a chart from a live algorithm. The /live/chart/read API accepts requests in the following format:
integer
projectId
Project ID of the request.
string
name
The requested chart name.
integer
start
The Utc start seconds timestamp of the request.
integer
end
The Utc end seconds timestamp of the request.
integer
count
The number of data points to request.
{
"projectId": 0,
"name": "string",
Example "start": 0,
"end": 0,
"count": 0
}
Responses
200 Success
LoadingChartResponse Model - Response when the requested chart is being generated.
number
progress
Loading percentage of the chart generation process.
string
example:
status
loading
Status of the chart generation process.
boolean
success
Indicate if the API request was successful.
{
"progress": 0,
Example "status": "loading",
"success": true
}
ReadChartResponse Model - Response with the requested chart from a live algorithm or backtest.
Chart object
chart
Single Parent Chart Object for Custom Charting.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"chart": {
"name": "string",
"chartType": "Overlay",
"series": {
"name": "string",
"unit": "string",
"index": 0,
"values": [
"object"
],
"seriesType": "Line",
"color": "string",
"scatterMarkerSymbol": "none"
Example
}
},
"success": true,
"errors": [
"string"
]
}
Chart Model - Single Parent Chart Object for Custom Charting.
string
name
Name of the Chart.
string Enum
chartType Type of the Chart, Overlayed or Stacked. Options :
['Overlay', 'Stacked']
Series object
series
List of Series Objects for this Chart.
{
"name": "string",
"chartType": "Overlay",
"series": {
"name": "string",
"unit": "string",
"index": 0,
Example "values": [
"object"
],
"seriesType": "Line",
"color": "string",
"scatterMarkerSymbol": "none"
}
}
Series Model - Chart Series Object - Series data and properties for a chart.
string
name
Name of the series.
string
unit
Axis for the chart series.
integer
index
Index/position of the series on the chart.
object Array
Values for the series plot. These values are assumed to be
values
in ascending time order (first points earliest, last points
latest).
string Enum
seriesType Chart type for the series. Options : ['Line', 'Scatter',
'Candle', 'Bar', 'Flag', 'StackedArea', 'Pie', 'Treemap']
string
color
Color the series.
string Enum
Shape or symbol for the marker in a scatter plot. Options :
scatterMarkerSymbol
['none', 'circle', 'square', 'diamond', 'triangle', 'triangle-
down']
{
"name": "string",
"unit": "string",
"index": 0,
"values": [
Example "object"
],
"seriesType": "Line",
"color": "string",
"scatterMarkerSymbol": "none"
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > Read Live Algorithm > Portfolio State
Introduction
Request
Fetch the live portfolio state for the project Id provided. The /live/portfolio/read API accepts requests in the following
format:
ReadLivePortfolioRequest Model - Request to read the portfolio state from a live algorithm.
integer
projectId
Id of the project from which to read the live algorithm.
{
Example "projectId": 0
}
Responses
200 Success
LivePortfolioResponse Model - Contains holdings and cash of the live algorithm in the request criteria.
Portfolio object
portfolio
Portfolio object with the holdings and cash information.
{
"portfolio": {
"holdings": {
"AAPL R735QTJ8XC9X": {
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"type": "Base",
"currencySymbol": "$",
"averagePrice": 0,
"quantity": 0,
"marketPrice": 0,
"conversionRate": 0,
"marketValue": 0,
"unrealizedPnl": 0
}
},
Example
"cash": {
"USD": {
"symbol": "string",
"amount": 0,
"conversionRate": 0,
"currencySymbol": ,
"valueInAccountCurrency": 0
}
}
}
}
Portfolio Model - Portfolio object with the holdings and cash information.
object
holdings
Dictionary of algorithm holdings information.
object
cash
Dictionary of algorithm cash currencies information.
{
"holdings": {
"AAPL R735QTJ8XC9X": {
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"type": "Base",
"currencySymbol": "$",
"averagePrice": 0,
"quantity": 0,
"marketPrice": 0,
"conversionRate": 0,
Example "marketValue": 0,
"unrealizedPnl": 0
}
},
"cash": {
"USD": {
"symbol": "string",
"amount": 0,
"conversionRate": 0,
"currencySymbol": ,
"valueInAccountCurrency": 0
}
}
}
Holding Model - Live results object class for packaging live result data.
Symbol object
Represents a unique security identifier. This is made of two
symbol components, the unique SID and the Value. The value is the
current ticker symbol while the SID is constant over the life
of a security.
string Enum
Type of tradable security / underlying asset. Options :
type
['Base', 'Equity', 'Option', 'Commodity', 'Forex', 'Future',
'Cfd', 'Crypto']
string
currencySymbol example: $
The currency symbol of the holding.
number
averagePrice Average Price of our Holding in the currency the symbol is
traded in.
number
quantity
Quantity of the Symbol we hold.
number
marketPrice Current Market Price of the Asset in the currency the
symbol is traded in.
number
conversionRate
Current market conversion rate into the account currency.
number
marketValue
Current market value of the holding.
number
unrealizedPnl
Current unrealized P/L of the holding.
{
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"type": "Base",
Example "currencySymbol": "$",
"averagePrice": 0,
"quantity": 0,
"marketPrice": 0,
"conversionRate": 0,
"marketValue": 0,
"unrealizedPnl": 0
}
Symbol Model - Represents a unique security identifier. This is made of two components, the unique SID and the Value. The
value is the current ticker symbol while the SID is constant over the life of a security.
string
value
The current symbol for this ticker.
string
id
The security identifier for this symbol.
string
permtick
The current symbol for this ticker.
{
"value": "string",
Example "id": "string",
"permtick": "string"
}
string
symbol
Gets the symbol used to represent this cash.
number
amount
Gets or sets the amount of cash held.
number
conversionRate
The currency conversion rate to the account base currency.
object
currencySymbol
The symbol of the currency, such as $.
number
valueInAccountCurrency The value of the currency cash in the account base
currency.
{
"symbol": "string",
"amount": 0,
Example "conversionRate": 0,
"currencySymbol": ,
"valueInAccountCurrency": 0
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > Read Live Algorithm > Orders
Introduction
Request
Fetch the orders of a live algorithm for the project Id and steps provided. The /live/orders/read API accepts requests in the
following format:
integer
start Starting index of the orders to be fetched. Required if end >
100.
integer
end Last index of the orders to be fetched. Note that end - start
must be less than 100.
integer
projectId
Id of the project from which to read the live algorithm.
{
"start": 0,
Example "end": 0,
"projectId": 0
}
Responses
200 Success
LiveOrdersResponse Model - Contains orders and the number of orders of the live algorithm in the request criteria.
Order Array
orders
Collection of orders.
integer
length
Total number of returned orders.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"orders": [
{
"id": 0,
"contingentId": 0,
"brokerId": [
"string"
],
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"limitPrice": ,
"stopPrice": 0,
"stopTriggered": ,
"price": 0,
"priceCurrency": "string",
"time": "2021-11-26T15:18:27.693Z",
"createdTime": "2021-11-26T15:18:27.693Z",
"lastFillTime": "2021-11-26T15:18:27.693Z",
"lastUpdateTime": "2021-11-
26T15:18:27.693Z",
"canceledTime": "2021-11-26T15:18:27.693Z",
"quantity": 0,
"type": 0 = Market,
"status": 0 = New,
"tag": "string",
"securityType": 0 = Base,
"direction": 0 = Buy,
"value": 0,
"orderSubmissionData": {
"bidPrice": 0,
"askPrice": 0,
"lastPrice": 0
},
"isMarketable": true,
"properties": {
"timeInForce": 0 = GoodTilCanceled
},
"events": [
{
"algorithmId": "string",
"symbol": "string",
Example
"symbolValue": "string",
"symbolPermtick": "string",
"orderId": 0,
"orderEventId": 0,
"id": 0,
"status": "new",
"orderFeeAmount": 0,
"orderFeeCurrency": "string",
"fillPrice": 0,
"fillPriceCurrency": "string",
"fillQuantity": 0,
"direction": "string",
"message": "string",
"isAssignment": true,
"stopPrice": 0,
"limitPrice": 0,
"quantity": 0,
"time": 0,
"isInTheMoney":
}
],
"trailingAmount": 0,
"trailingPercentage": ,
"groupOrderManager": {
"id": 0,
"quantity": 0,
"count": 0,
"limitPrice": 0,
"orderIds": [
"integer"
],
"direction": 0
},
"triggerPrice": 0,
"triggerTouched":
}
}
],
"length": 0,
"success": true,
"errors": [
"string"
]
}
integer
id
Order ID.
integer
contingentId
Order Id to process before processing this order.
string Array
brokerId Brokerage Id for this order for when the brokerage splits
orders into multiple pieces.
Symbol object
Represents a unique security identifier. This is made of two
symbol components, the unique SID and the Value. The value is the
current ticker symbol while the SID is constant over the life
of a security.
nummber
limitPrice
Limit price of the Order.
number
stopPrice
Stop price of the Order.
bool
stopTriggered Indicates if the stop price has been reached, so the limit
order has been triggered.
number
price
Price of the Order.
string
priceCurrency
Currency for the order price.
string($date-time)
time
Gets the utc time the order was created.
string($date-time)
createdTime
Gets the utc time this order was created. Alias for Time.
string($date-time)
lastFillTime Gets the utc time the last fill was received, or null if no fills
have been received.
string($date-time)
lastUpdateTime Gets the utc time this order was last updated, or null if the
order has not been updated.
string($date-time)
canceledTime Gets the utc time this order was canceled, or null if the
order was not canceled.
number
quantity
Number of shares to execute.
integer Enum
Order type. Options : ['0 = Market', '1 = Limit', '2 =
StopMarket', '3 = StopLimit', '4 = MarketOnOpen', '5 =
type
MarketOnClose', '6 = OptionExercise', '7 = LimitIfTouched',
'8 = ComboMarket', '9 = ComboLimit', '10 =
ComboLegLimit', '11 = TrailingStop']
integer Enum
Status of the Order. Options : ['0 = New', '1 = Submitted', '2
status
= PartiallyFilled', '3 = Filled', '5 = Canceled', '6 = None', '7 =
Invalid', '8 = CancelPending', '9 = UpdateSubmitted']
string
tag
Tag the order with some custom data.
integer Enum
Type of tradable security / underlying asset. Options : ['0 =
securityType
Base', '1 = Equity', '2 = Option', '3 = Commodity', '4 =
Forex', '5 = Future', '6 = Cfd', '7 = Crypto']
integer Enum
direction Order Direction Property based off Quantity. Options : ['0 =
Buy', '1 = Sell', '2 = Hold']
number
value Gets the executed value of this order. If the order has not
yet filled, then this will return zero.
OrderSubmissionData object
orderSubmissionData Stores time and price information available at the time an
order was submitted.
boolean
isMarketable
Returns true if the order is a marketable order.
OrderProperties object
properties
Additional properties of the order.
OrderEvent Array
events
The order events.
number
trailingAmount
Trailing amount for a trailing stop order.
bool
trailingPercentage Determines whether the trailingAmount is a percentage or
an absolute currency value.
GroupOrderManager object
groupOrderManager
Manager of a group of orders.
number
triggerPrice The price which, when touched, will trigger the setting of a
limit order at limitPrice.
bool
triggerTouched
Whether or not the triggerPrice has been touched.
{
"id": 0,
"contingentId": 0,
"brokerId": [
"string"
],
"symbol": {
"value": "string",
"id": "string",
"permtick": "string"
},
"limitPrice": ,
"stopPrice": 0,
"stopTriggered": ,
"price": 0,
"priceCurrency": "string",
"time": "2021-11-26T15:18:27.693Z",
"createdTime": "2021-11-26T15:18:27.693Z",
"lastFillTime": "2021-11-26T15:18:27.693Z",
"lastUpdateTime": "2021-11-26T15:18:27.693Z",
"canceledTime": "2021-11-26T15:18:27.693Z",
"quantity": 0,
"type": 0 = Market,
"status": 0 = New,
"tag": "string",
"securityType": 0 = Base,
"direction": 0 = Buy,
"value": 0,
"orderSubmissionData": {
"bidPrice": 0,
"askPrice": 0,
"lastPrice": 0
},
"isMarketable": true,
"properties": {
"timeInForce": 0 = GoodTilCanceled
},
"events": [
{
"algorithmId": "string",
"symbol": "string",
"symbolValue": "string",
"symbolPermtick": "string",
"orderId": 0,
"orderEventId": 0,
"id": 0,
"status": "new",
"orderFeeAmount": 0,
"orderFeeCurrency": "string",
"fillPrice": 0,
"fillPriceCurrency": "string",
"fillQuantity": 0,
"direction": "string",
"message": "string",
"isAssignment": true,
"stopPrice": 0,
"limitPrice": 0,
"quantity": 0,
"time": 0,
"isInTheMoney":
}
],
"trailingAmount": 0,
"trailingPercentage": ,
"groupOrderManager": {
"id": 0,
"quantity": 0,
"count": 0,
"limitPrice": 0,
"orderIds": [
"integer"
],
"direction": 0
},
Example
"triggerPrice": 0,
"triggerTouched":
}
Symbol Model - Represents a unique security identifier. This is made of two components, the unique SID and the Value. The
value is the current ticker symbol while the SID is constant over the life of a security.
string
value
The current symbol for this ticker.
string
id
The security identifier for this symbol.
string
permtick
The current symbol for this ticker.
{
"value": "string",
Example "id": "string",
"permtick": "string"
}
OrderSubmissionData Model - Stores time and price information available at the time an order was submitted.
number
bidPrice
The bid price at an order submission time.
number
askPrice
The ask price at an order submission time.
number
lastPrice
The current price at an order submission time.
{
"bidPrice": 0,
Example "askPrice": 0,
"lastPrice": 0
}
object Enum
Defines the length of time over which an order will continue
timeInForce
working before it is cancelled. Options : ['0 =
GoodTilCanceled', '1 = Day', '2 = GoodTilDate']
{
Example "timeInForce": 0 = GoodTilCanceled
}
string
symbol
Easy access to the order symbol associated with this event.
string
symbolValue The current symbol for this ticker; It is a user friendly
symbol representation.
string
symbolPermtick
The original symbol used to generate this symbol.
integer
orderId
Id of the order this event comes from.
integer
orderEventId
The unique order event id for each order.
integer
id
The unique order event Id for each order.
string Enum
Status of the Order. Options : ['new', 'submitted',
status
'partiallyFilled', 'filled', 'canceled', 'none', 'invalid',
'cancelPending', 'updateSubmitted']
number
orderFeeAmount
The fee amount associated with the order.
string
orderFeeCurrency
The fee currency associated with the order.
number
fillPrice
Fill price information about the order.
string
fillPriceCurrency
Currency for the fill price.
number
fillQuantity
Number of shares of the order that was filled in this event.
string
direction
Order direction.
string
message
Any message from the exchange.
boolean
isAssignment
True if the order event is an assignment.
number
stopPrice
The current stop price.
number
limitPrice
The current limit price.
number
quantity
The current order quantity.
integer
time
The time of this event in unix timestamp.
bool
isInTheMoney
True if the order event's option is In-The-Money (ITM).
{
"algorithmId": "string",
"symbol": "string",
"symbolValue": "string",
"symbolPermtick": "string",
"orderId": 0,
"orderEventId": 0,
"id": 0,
"status": "new",
"orderFeeAmount": 0,
"orderFeeCurrency": "string",
Example "fillPrice": 0,
"fillPriceCurrency": "string",
"fillQuantity": 0,
"direction": "string",
"message": "string",
"isAssignment": true,
"stopPrice": 0,
"limitPrice": 0,
"quantity": 0,
"time": 0,
"isInTheMoney":
}
GroupOrderManager Model - Manager of a group of orders.
integer
id
The unique order group Id.
number
quantity
The group order quantity.
integer
count
The total order count associated with this order group.
number
limitPrice
The limit price associated with this order group if any.
integer Array
orderIds
The order Ids in this group.
integer
direction
Order Direction Property based off Quantity.
{
"id": 0,
"quantity": 0,
"count": 0,
"limitPrice": 0,
Example "orderIds": [
"integer"
],
"direction": 0
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > Read Live Algorithm > Insights
Introduction
Request
Fetch the insights of a live algorithm for the project Id and steps provided. The /live/insights/read API accepts requests in
integer
start Starting index of the insights to be fetched. Required if end
> 100.
integer
end Last index of the insights to be fetched. Note that end -
start must be less than 100.
integer
projectId
Id of the project from which to read the live algorithm.
{
"start": 0,
Example "end": 0,
"projectId": 0
}
Responses
200 Success
LiveInsightsResponse Model - Contains insights and the number of insights of the live algorithm in the request criteria.
Insight Array
insights
Collection of insights.
integer
length
Total number of returned insights.
boolean
success
Indicate if the API request was successful.
{
"insights": [
{
"id": "string",
"groupId": "string",
"sourceModel": "string",
"generatedTime": "string",
"createdTime": 0,
"closeTime": 0,
"symbol": "string",
"ticker": "string",
"type": "price",
"reference": "string",
"referenceValueFinal": "string",
Example "direction": "down",
"period": 0,
"magnitude": 0,
"confidence": 0,
"weight": 0,
"scoreIsFinal": ,
"scoreDirection": 0,
"scoreMagnitude": 0,
"estimatedValue": 0,
"tag": "2021-11-26T15:18:27.693Z"
}
],
"length": 0,
"success": true
}
string
id
Insight ID.
string
groupId
ID of the group of insights.
string
sourceModel
Name of the model that sourced the insight.
string
generatedTime
Gets the utc unixtime this insight was generated.
number
createdTime
Gets the utc unixtime this insight was created.
number
closeTime
Gets the utc unixtime this insight was closed.
string
symbol Gets the symbol ID this insight is for.
string
ticker
Gets the symbol ticker this insight is for.
string Enum
type Gets the type of insight, for example, price or volatility.
Options : ['price', 'volatility']
string
reference Gets the initial reference value this insight is predicting
against.
string
referenceValueFinal Gets the final reference value, used for scoring, this insight
is predicting against.
string Enum
direction Gets the predicted direction, down, flat or up. Options :
['down', 'flat', 'up']
number
period Gets the period, in seconds, over which this insight is
expected to come to fruition.
number
magnitude Gets the predicted percent change in the insight type
(price/volatility). This value can be null.
number
confidence
Gets the confidence in this insight. This value can be null.
number
weight Gets the portfolio weight of this insight. This value can be
null.
bool
scoreIsFinal
Gets whether or not this is the insight's final score.
number
scoreDirection
Gets the direction score.
number
scoreMagnitude
Gets the magnitude score.
number
estimatedValue Gets the estimated value of this insight in the account
currency.
string($float)
tag
The insight's tag containing additional information.
{
"id": "string",
"groupId": "string",
"sourceModel": "string",
"generatedTime": "string",
"createdTime": 0,
"closeTime": 0,
"symbol": "string",
"ticker": "string",
"type": "price",
"reference": "string",
"referenceValueFinal": "string",
"direction": "down",
"period": 0,
"magnitude": 0,
Example
"confidence": 0,
"weight": 0,
"scoreIsFinal": ,
"scoreDirection": 0,
"scoreMagnitude": 0,
"estimatedValue": 0,
"tag": "2021-11-26T15:18:27.693Z"
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > Read Live Algorithm > Logs
Introduction
Request
Information about the algorithm to read live logs from. The /live/logs/read API accepts requests in the following format:
ReadLiveLogsRequest Model - Request to read the logs of a specific algorithm. The difference between 'startLine' and
'endLine' must be smaller than 250, else an error will be thrown.
object
format example: json
Format of the log results.
integer
projectId
Project Id of the live running algorithm.
string
algorithmId
Deploy Id (Algorithm Id) of the live running algorithm.
integer
startLine
Start line of logs to read.
integer
endLine
End line of logs to read.
{
"format": "json",
"projectId": 0,
Example "algorithmId": "string",
"startLine": 0,
"endLine": 0
}
Responses
200 Success
ReadLiveLogsResponse Model - Logs from a live algorithm.
string Array
logs
List of logs from the live algorithm.
integer
length
Total amount of rows in the logs.
integer
deploymentOffset
Amount of log rows before the current deployment.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"logs": [
"string"
],
"length": 0,
Example "deploymentOffset": 0,
"success": true,
"errors": [
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > Update Live Algorithm
Live Management
Update Live Algorithm
The QuantConnect REST API lets you update your live algorithms on our cloud servers through URL endpoints.
Introduction
Request
Information about the live algorithm to liquidate. The /live/update/liquidate API accepts requests in the following format:
integer
projectId
Project Id for the live instance we want to liquidate.
{
Example "projectId": 0
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > Update Live Algorithm > Stop Live Algorithm
Introduction
Request
Information about the project to delete. The /live/update/stop API accepts requests in the following format:
integer
projectId
Project Id for the live instance we want to stop.
{
Example "projectId": 0
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Live Management > List Live Algorithms
Live Management
List Live Algorithms
Introduction
Request
Request body to obtain a list of live running algorithms. The /live/list API accepts requests in the following format:
string Enum
States of a live deployment. Options : ['DeployError',
status 'InQueue', 'Running', 'Stopped', 'Liquidated', 'Deleted',
'Completed', 'RuntimeError', 'Invalid', 'LoggingIn',
'Initializing', 'History']
number
start
Earliest launched time of the algorithms in UNIX timestamp.
number
end
Latest launched time of the algorithms in UNIX timestamp.
{
"status": "DeployError",
Example "start": 0,
"end": 0
}
Responses
200 Success
LiveAlgorithmListResponse Model - List of the live algorithms running which match the requested status.
LiveAlgorithm Array
live
Algorithm list matching the requested status.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"live": [
{
"projectId": 0,
"deployId": "string",
"status": "DeployError",
"launched": "2021-11-26T15:18:27.693Z",
"stopped": "2021-11-26T15:18:27.693Z",
"brokerage": "Interactive",
"subscription": "string",
"error": "string",
Example
"success": true,
"errors": [
"string"
]
}
],
"success": true,
"errors": [
"string"
]
}
LiveAlgorithm Model - Live algorithm instance result from the QuantConnect Rest API.
integer
projectId
Project Id for the live instance.
string
deployId Unique live algorithm deployment identifier (similar to a
backtest id).
string Enum
States of a live deployment. Options : ['DeployError',
status 'InQueue', 'Running', 'Stopped', 'Liquidated', 'Deleted',
'Completed', 'RuntimeError', 'Invalid', 'LoggingIn',
'Initializing', 'History']
string($date-time)
launched
Datetime the algorithm was launched in UTC.
string($date-time)
stopped Datetime the algorithm was stopped in UTC, null if its still
running.
string Enum
Brokerage. Options : ['Interactive', 'FXCM', 'Oanda',
brokerage
'Tradier', 'PaperBrokerage', 'Alpaca', 'Bitfinex', 'Binance',
'Coinbase']
string
subscription
Chart we're subscribed to.
string
error Live algorithm error message from a crash or algorithm
runtime error.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"projectId": 0,
"deployId": "string",
"status": "DeployError",
"launched": "2021-11-26T15:18:27.693Z",
"stopped": "2021-11-26T15:18:27.693Z",
"brokerage": "Interactive",
Example "subscription": "string",
"error": "string",
"success": true,
"errors": [
"string"
]
}
string
www_authenticate
Header
API Reference > Live Management > Live Commands
Live Management
Live Commands
Introduction
Request
Sends a command to a live deployment to trigger an action such as placing orders. The /live/commands/create API accepts
integer
example: 19626262
projectId
Project for the live instance we want to run the command
against.
object
example: {'$type': 'OrderCommand', 'symbol': {'id': 'BTCUSD
command 2XR', 'value': 'BTCUSD'}, 'order_type': 'market', 'quantity':
'0.1', 'limit_price': 0, 'stop_price': 0, 'tag': ''}
The command to run.
{
"projectId": 19626262,
"command": {
"$type": "OrderCommand",
"symbol": {
"id": "BTCUSD 2XR",
"value": "BTCUSD"
Example },
"order_type": "market",
"quantity": "0.1",
"limit_price": 0,
"stop_price": 0,
"tag": ""
}
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Optimization Management
API Reference
Optimization Management
Optimization Management
Create Optimization
Introduction
Request
Project, compile and optimization parameters for launching an optimization job. The /optimizations/create API accepts
requests in the following format:
integer
projectId
Project ID of the project the optimization belongs to.
string
name
Name of the optimization.
string
target
Target of the optimization.
string
example: max or
targetTo
min
Target extremum of the optimization.
float
targetValue
Optimization target value.
string
example:
strategy
QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy
Optimization strategy.
string
compileId
Optimization compile ID.
OptimizationParameter Array
parameters
Optimization parameters.
OptimizationConstraint Array
constraints
Optimization constraints.
float
example:
estimatedCost
10
Estimated cost for optimization.
string Enum
nodeType example: O2-8
Optimization node type. Options : ['O2-8', 'O4-12', 'O8-16']
integer
parallelNodes example: 4
Number of parallel nodes for optimization.
{
"projectId": 0,
"name": "string",
"target": "string",
"targetTo": "max or min",
"targetValue": ,
"strategy":
"QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy
"compileId": "string",
"parameters": [
{
"name": "rsi_period",
"min": 10,
"max": 20,
"step": 1,
Example "minStep": 1
}
],
"constraints": [
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
"operator": "greater",
"targetValue": 1
}
],
"estimatedCost": 10,
"nodeType": "O2-8",
"parallelNodes": 4
}
OptimizationParameter Model
string
name example: rsi_period
Name of optimization parameter.
float
example:
min 10
Minimum value of optimization parameter, applicable for
boundary conditions.
float
example:
max 20
Maximum value of optimization parameter, applicable for
boundary conditions.
float
step example: 1
Movement, should be positive.
float
example: 1
{
"name": "rsi_period",
"min": 10,
Example "max": 20,
"step": 1,
"minStep": 1
}
OptimizationConstraint Model
string
target example: TotalPerformance.PortfolioStatistics.SharpeRatio
Property we want to track.
string
example:
operator
greater
The target comparison operation.
float
targetValue example: 1
The value of the property we want to track.
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
Example
"operator": "greater",
"targetValue": 1
}
Responses
200 Success
ListOptimizationResponse Model - Response received when listing optimizations of a project.
CreateOptimizationResponse Array
optimizations
Collection of summarized optimization objects.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"optimizations": [
{
"optimizationId": "string",
"projectId": "string",
"name": "string",
"status": "New",
"nodeType": "O2-8",
"criterion": {
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
string
optimizationId
Optimization ID.
string
projectId
Project ID of the project the optimization belongs to.
string
name
Name of the optimization.
string Enum
status Status of the optimization. Options : ['New', 'Aborted',
'Running', 'Completed']
string Enum
example: O2-8
nodeType Optimization node type. Options : ['O2-8', 'O4-12', 'O8-16']
OptimizationTarget object
criterion
/.
string($date-time)
created
Date when this optimization was created.
number
psr
Price-sales ratio stastic.
number
sharpeRatio
Sharpe ratio statistic.
integer
trades
Number of trades.
integer
cloneId ID of project, were this current project was originally
cloned.
integer
outOfSampleDays
Number of days of out of sample days.
string($date-time)
outOfSampleMaxEndDate
End date of out of sample data.
object Array
parameters
Parameters used in this optimization.
{
"optimizationId": "string",
"projectId": "string",
"name": "string",
"status": "New",
"nodeType": "O2-8",
"criterion": {
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
string
target example: TotalPerformance.PortfolioStatistics.SharpeRatio
Property we want to track.
string
example: max or
extremum
min
Defines the direction of optimization.
float
targetValue example: 1
The value of the property we want to track.
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
Example
"extremum": "max or min",
"targetValue": 1
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Optimization Management > Update Optimization
Optimization Management
Update Optimization
Introduction
Request
string
optimizationId
Optimization ID we want to update.
string
name
Name we'd like to assign to the optimization.
{
"optimizationId": "string",
Example
"name": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
string
www_authenticate
Header
API Reference > Optimization Management > Read Optimization
Optimization Management
Read Optimization
Introduction
Read an optimization.
Request
Optimization ID for the optimization we want to read. The /optimizations/read API accepts requests in the following format:
string
optimizationId
Optimization ID for the optimization we want to read.
{
Example "optimizationId": "string"
}
Responses
200 Success
Optimization object
optimization
Response received when launching an optimization job.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"optimization": {
"optimizationId": "string",
"snapshotId": "string",
"projectId": "string",
"name": "string",
"status": "New",
"nodeType": "O2-8",
"parallelNodes": 4,
"criterion": {
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
"operator": "greater",
"targetValue": 1
}
],
"parameters": [
{
"name": "rsi_period",
"min": 10,
Example "max": 20,
"step": 1,
"minStep": 1
}
],
"backtests": ,
"strategy":
"QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy
"requested": "2021-11-26T15:18:27.693Z",
"optimizationTarget": "string",
"gridLayout": [
"object"
],
"outOfSampleMaxEndDate": "string",
"outOfSampleDays": 0
},
"success": true,
"errors": [
"string"
]
}
string
optimizationId
Optimization ID.
string
snapshotId
Snapshot iD of this optimization.
string
projectId
Project ID of the project the optimization belongs to.
string
name
Name of the optimization.
string Enum
status Status of the optimization. Options : ['New', 'Aborted',
'Running', 'Completed']
string Enum
nodeType example: O2-8
Optimization node type. Options : ['O2-8', 'O4-12', 'O8-16']
integer
parallelNodes example: 4
Number of parallel nodes for optimization.
OptimizationTarget object
criterion
/.
string object
runtimeStatistics Dictionary representing a runtime banner/updating statistics
for the optimization.
OptimizationConstraint Array
constraints
Optimization constraints.
OptimizationParameter Array
parameters
Optimization parameters.
object
backtests
Dictionary of optimization backtests.
string
example:
strategy
QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy
Optimization strategy.
string($date-time)
requested
Optimization requested date and time.
string
optimizationTarget
Statistic to be optimized.
object Array
gridLayout
List with grid charts representing the grid layout.
string
outOfSampleMaxEndDate
End date of out of sample data.
integer
outOfSampleDays
Number of days of out of sample days.
{
"optimizationId": "string",
"snapshotId": "string",
"projectId": "string",
"name": "string",
"status": "New",
"nodeType": "O2-8",
"parallelNodes": 4,
"criterion": {
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
"operator": "greater",
"targetValue": 1
}
Example ],
"parameters": [
{
"name": "rsi_period",
"min": 10,
"max": 20,
"step": 1,
"minStep": 1
}
],
"backtests": ,
"strategy":
"QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy
"requested": "2021-11-26T15:18:27.693Z",
"optimizationTarget": "string",
"gridLayout": [
"object"
],
"outOfSampleMaxEndDate": "string",
"outOfSampleDays": 0
}
OptimizationTarget Model
string
target example: TotalPerformance.PortfolioStatistics.SharpeRatio
Property we want to track.
string
example: max or
extremum
min
Defines the direction of optimization.
float
targetValue example: 1
The value of the property we want to track.
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
Example
"extremum": "max or min",
"targetValue": 1
}
OptimizationConstraint Model
string
target example: TotalPerformance.PortfolioStatistics.SharpeRatio
Property we want to track.
string
example:
operator
greater
The target comparison operation.
float
targetValue example: 1
The value of the property we want to track.
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
Example
"operator": "greater",
"targetValue": 1
}
OptimizationParameter Model
string
name example: rsi_period
Name of optimization parameter.
float
example:
min 10
Minimum value of optimization parameter, applicable for
boundary conditions.
float
example:
max 20
Maximum value of optimization parameter, applicable for
boundary conditions.
float
step example: 1
Movement, should be positive.
float
example: 1
Minimal possible movement for current parameter, should
minStep
be positive. Used by
Strategies.EulerSearchOptimizationStrategy to
determine when this parameter can no longer be optimized.
{
"name": "rsi_period",
"min": 10,
Example "max": 20,
"step": 1,
"minStep": 1
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Optimization Management > Delete Optimization
Optimization Management
Delete Optimization
Introduction
Delete an optimization.
Request
string
optimizationId
Optimization ID we want to delete.
{
Example "optimizationId": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Optimization Management > Abort Optimization
Optimization Management
Abort Optimization
Introduction
Abort an optimization.
Request
string
optimizationId
Optimization ID we want to abort.
{
Example "optimizationId": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Optimization Management > List Optimization
Optimization Management
List Optimization
Introduction
Request
Project ID we'd like to get a list of optimizations for. The /optimizations/list API accepts requests in the following format:
integer
projectId
Project ID we'd like to get a list of optimizations for.
{
Example "projectId": 0
}
Responses
200 Success
ListOptimizationResponse Model - Response received when listing optimizations of a project.
CreateOptimizationResponse Array
optimizations
Collection of summarized optimization objects.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"optimizations": [
{
"optimizationId": "string",
"projectId": "string",
"name": "string",
"status": "New",
"nodeType": "O2-8",
"criterion": {
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
string
optimizationId
Optimization ID.
string
projectId
Project ID of the project the optimization belongs to.
string
name
Name of the optimization.
string Enum
status Status of the optimization. Options : ['New', 'Aborted',
'Running', 'Completed']
string Enum
example: O2-8
nodeType Optimization node type. Options : ['O2-8', 'O4-12', 'O8-16']
OptimizationTarget object
criterion
/.
string($date-time)
created
Date when this optimization was created.
number
psr
Price-sales ratio stastic.
number
sharpeRatio
Sharpe ratio statistic.
integer
trades
Number of trades.
integer
cloneId ID of project, were this current project was originally
cloned.
integer
outOfSampleDays
Number of days of out of sample days.
string($date-time)
outOfSampleMaxEndDate
End date of out of sample data.
object Array
parameters
Parameters used in this optimization.
{
"optimizationId": "string",
"projectId": "string",
"name": "string",
"status": "New",
"nodeType": "O2-8",
"criterion": {
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
string
target example: TotalPerformance.PortfolioStatistics.SharpeRatio
Property we want to track.
string
example: max or
extremum
min
Defines the direction of optimization.
float
targetValue example: 1
The value of the property we want to track.
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
Example
"extremum": "max or min",
"targetValue": 1
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Optimization Management > Estimate Optimization Cost
Optimization Management
Estimate Optimization Cost
Introduction
Request
Project, compile and optimization parameters for estimating the cost of an optimization job. The /optimizations/estimate API
accepts requests in the following format:
integer
projectId
Project ID of the project the optimization belongs to.
string
name
Name of the optimization.
string
target
Target of the optimization.
string
example: max or
targetTo
min
Target extremum of the optimization.
float
targetValue
Optimization target value.
string
example:
strategy
QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy
Optimization strategy.
string
compileId
Optimization compile ID.
OptimizationParameter Array
parameters
Optimization parameters.
OptimizationConstraint Array
constraints
Optimization constraints.
{
"projectId": 0,
"name": "string",
"target": "string",
"targetTo": "max or min",
"targetValue": ,
"strategy":
"QuantConnect.Optimizer.Strategies.GridSearchOptimizationStrategy
"compileId": "string",
"parameters": [
{
"name": "rsi_period",
"min": 10,
"max": 20,
"step": 1,
"minStep": 1
}
Example ],
"constraints": [
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
"operator": "greater",
"targetValue": 1
}
]
}
OptimizationParameter Model
string
name example: rsi_period
Name of optimization parameter.
float
example:
min 10
Minimum value of optimization parameter, applicable for
boundary conditions.
float
example:
max 20
Maximum value of optimization parameter, applicable for
boundary conditions.
float
step example: 1
Movement, should be positive.
float
example: 1
{
"name": "rsi_period",
"min": 10,
Example "max": 20,
"step": 1,
"minStep": 1
}
OptimizationConstraint Model
string
target example: TotalPerformance.PortfolioStatistics.SharpeRatio
Property we want to track.
string
example:
operator
greater
The target comparison operation.
float
targetValue example: 1
The value of the property we want to track.
{
"target":
"TotalPerformance.PortfolioStatistics.SharpeRatio",
Example
"operator": "greater",
"targetValue": 1
}
Responses
200 Success
Estimate object
estimate Response received when estimating the cost of an
optimization.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"estimate": {
"estimateId": "string",
"time": 60,
"balance": 10
Example },
"success": true,
"errors": [
"string"
]
}
Estimate Model - Response received when estimating the cost of an optimization.
string
estimateId
Estimate Id.
integer
example:
time
60
Estimate time in seconds.
integer
example:
balance
10
Estimate balance in QCC.
{
"estimateId": "string",
Example "time": 60,
"balance": 10
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Object Store Management
API Reference
Object Store Management
API Reference > Object Store Management > Upload Object Store Files
Introduction
Request
Upload files to the Object Store. The /object/set API accepts requests in the following format:
ObjectStoreBinaryFile Model - Represents a binary file we we'd like to upload the file to upload to the Object Store.
binary
objectData
Object data to be stored.
{
Example "objectData": b"Hello, world!"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Object Store Management > Get Object Store Metadata
Introduction
Get Object Store properties of a specific organization and key. It does not work if the object store is a directory.
Request
Get Object Store properties of a specific organization and key. The /object/properties API accepts requests in the following
format:
GetObjectStorePropertiesRequest Model - Request to get Object Store properties of a specific organization and keys.
string
organizationId Organization ID we would like to get the Object Store
properties from.
string
key
Key to the Object Store.
{
"organizationId": "string",
Example
"key": "string"
}
Responses
200 Success
GetObjectStorePropertiesResponse Model - Response received when fetching Object Store file properties.
ObjectStoreProperties object
metadata
Object Store file properties.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"metadata": {
"key": "string",
"modified": "2021-11-26T15:18:27.693Z",
"created": "string",
"size": 24,
"md5": "string",
Example "mime": "string",
"preview": "string"
},
"success": true,
"errors": [
"string"
]
}
ObjectStoreProperties Model - Object Store file properties.
string
key
Object Store key.
string($date)
modified
Last time it was modified.
string
created
Date this project was created.
float
example:
size
24
Object Store file size.
string
md5
MD5 (hashing algorithm) hash authentication code.
string
mime
MIME type.
string
preview
Preview of the Object Store file content.
{
"key": "string",
"modified": "2021-11-26T15:18:27.693Z",
"created": "string",
Example "size": 24,
"md5": "string",
"mime": "string",
"preview": "string"
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Object Store Management > Get Object Store File
Introduction
Request
Get Object Store files of a specific organization and key. The /object/get API accepts requests in the following format:
GetObjectStoreJobIdRequest Model - Request to get JobId for the requested Object Store files.
string
organizationId Organization ID we would like to get the Object Store files
from.
string Array
keys
Keys to the Object Store files.
{
"organizationId": "string",
"keys": [
Example "string"
]
}
GetObjectStoreURLRequest Model - Request to get a download URL for certain Object Store files.
string
organizationId Organization ID we would like to get the Object Store files
from.
string
jobId
Job ID for getting a download URL for.
{
"organizationId": "string",
Example "jobId": "string"
}
Responses
200 Success
GetObjectStoreResponse Model - Response received when fetching Object Store file.
string
jobId
Job ID which can be used for querying state or packaging.
string
url
The URL to download the object. This can also be null.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"jobId": "string",
"url": "string",
"success": true,
Example "errors": [
"string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Object Store Management > Delete Object Store File
Introduction
Request
Delete the Object Store file of a specific organization and key. The /object/delete API accepts requests in the following
format:
DeleteObjectStoreRequest Model - Request to delete Object Store metadata of a specific organization and key.
string
organizationId Organization ID we'd like to delete the Object Store file
from.
string
key
Key to the Object Store file.
{
"organizationId": "string",
Example "key": "string"
}
Responses
200 Success
RestResponse Model - Base API response class for the QuantConnect API.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
string
www_authenticate
Header
API Reference > Object Store Management > List Object Store Files
Introduction
Request
List the Object Store files of a specific organization and path. The /object/list API accepts requests in the following format:
ListObjectStoreRequest Model - Request to list Object Store files of a specific organization and path.
string
organizationId
Organization ID we'd like to list the Object Store files from.
string
path
Path to the Object Store files.
{
"organizationId": "string",
Example "path": "string"
}
Responses
200 Success
ListObjectStoreResponse Model - Response received containing a list of stored objects metadata, as well as the total size
of all of them.
string
path example: Mia
Path to the files in the Object Store.
ObjectStoreSummary Array
objects
List of objects stored.
int
objectStorageUsed
Size of all objects stored in bytes.
string
objectStorageUsedHuman
Size of all the objects stored in human-readable format.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"path": "Mia",
"objects": [
{
"key": "Mia/Test",
"name": "string",
"modified": "2021-11-26T15:18:27.693Z",
"mime": "application/json",
"folder": true,
Example "size": 13
}
],
"objectStorageUsed": ,
"objectStorageUsedHuman": "string",
"success": true,
"errors": [
"string"
]
}
ObjectStoreSummary Model - Summary information of the Object Store.
string
key example: Mia/Test
Object Store key.
string
name
File or folder name.
string($date-time)
modified
Last time it was modified.
string
mime example: application/json
MIME type.
boolean
folder
True if it is a folder, false otherwise.
float
example:
size
13
Object Store file size.
{
"key": "Mia/Test",
"name": "string",
"modified": "2021-11-26T15:18:27.693Z",
Example
"mime": "application/json",
"folder": true,
"size": 13
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Reports
API Reference
Reports
The QuantConnect REST API lets you access your backtest reports from our cloud servers through URL endpoints.
Backtest Report
API Reference > Reports > Backtest Report
Reports
Backtest Report
Introduction
Request
A JSON object containing info about the project to delete. The /backtests/read/report API accepts requests in the following
format:
integer
projectId
Id of the project to read.
string
backtestId
Specific backtest Id to read.
{
"projectId": 0,
Example "backtestId": "string"
}
Responses
200 Success
BacktestReport Model - Backtest Report Response wrapper.
string
report
HTML data of the report with embedded base64 images.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"report": "string",
"success": true,
Example "errors": [
"string"
]
}
RequestFailedError Model - The API method call could not be completed as requested.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"success": true,
"errors": [
Example "string"
]
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Account
API Reference
Account
Introduction
None
Description
Request
/account/read Method
Responses
200 Success
string
organizationId
The organization Id.
number
creditBalance
The current account balance.
Card object
card
Credit card information.
{
"organizationId": "string",
"creditBalance": 0,
"card": {
Example "brand": "string",
"expiration": "2021-11-26T15:18:27.693Z",
"last4": "string"
}
}
Card Model - Credit card information.
string
brand
Credit card brand.
string($date-time)
expiration
The credit card expiration.
string
last4
The last 4 digits of the card.
{
"brand": "string",
Example "expiration": "2021-11-26T15:18:27.693Z",
"last4": "string"
}
UnauthorizedError Model - Unauthorized response from the API. Key is missing, invalid, or timestamp is too old for hash.
string
www_authenticate
Header
API Reference > Lean Version
API Reference
Lean Version
Introduction
Returns a list of lean versions with basic information for each version.
Request
/lean/versions/read Method
Responses
200 Success
LeanVersionsResponse Model - Contains the LEAN versions with their basic descriptions.
object Array
versions
List of LEAN versions with their basic descriptions.
boolean
success
Indicate if the API request was successful.
string Array
errors
List of errors with the API call.
{
"versions": [
"object"
],
Example "success": true,
"errors": [
"string"
]
}
API Reference > Examples
API Reference
Examples
Introduction
The following page is a collection of API implementation examples to showcase using the QuantConnect API. If you have an
implementation of the QuantConnect API, let us know so we can showcase your project.
This Python research notebook is an example that implements all of the QuantConnect API in vanilla Python to demonstrate the
Loading [MathJax]/jax/output/HTML-CSS/jax.js
Loading [MathJax]/jax/output/HTML-CSS/jax.js