Datasets

IQFeed

Introduction

Instead of using the data from QuantConnect or your brokerage, you can use IQFeed if you're deploying a local project on Windows. To use IQFeed, you need to create an account and install IQFeed Client.

To view the implementation of the IQFeed integration, see the Lean.DataSource.IQFeed repository.

Supported Datasets

Our IQFeed integration supports securities from the following asset classes:

Universe Selection

Universe Selection is available with the IQFeed data provider if you download the data from the Dataset Market. The dataset listings show how to download the universe selection data with the CLI. For live trading, you'll need to periodically download the new data from QuantConnect Cloud, which you can automate with Python scripts. For example, the following tutorials explain how to download historical data and download daily updates:

Alternative Data

If you have licensed alternative data with QuantConnect, it works as expected with the IQFeed data provider for research, backtesting, and live trading.

Download

To download IQFeed data, open a terminal in your organization workspace and then run lean data download --data-provider-historical IQFeed --data-type <data-type> --resolution <resolution> --security-type <security-type> --ticker <tickers> --start <YYYYMMDD> --end <YYYYMMDD> --iqfeed-username <username> --iqfeed-password <password>.

$ lean data download --data-provider-historical IQFeed --data-type Trade --resolution Daily --security-type Equity --ticker NVDA,AMD --start 20240303 --end 20240404 --iqfeed-username username --iqfeed-password password

If you provide your credentials, your Lean configuration file saves them.

Research

To access IQFeed data from the local Research Environment, open a terminal in your organization workspace and then run lean research <projectName> --data-provider-historical IQFeed --iqfeed-username <username> --iqfeed-password <password>.

$ lean research "My Project" --data-provider-historical IQFeed --iqfeed-username username --iqfeed-password password

The lean research command also accepts additional options for IQFeed. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean research <projectName> to open the Research Environment with the same options.

Backtesting

To run a local backtest with IQFeed data, open a terminal in your organization workspace and then run lean backtest <projectName> --data-provider-historical IQFeed --iqfeed-username <username> --iqfeed-password <password>.

$ lean backtest "My Project" --data-provider-historical IQFeed --iqfeed-username username --iqfeed-password password

The lean backtest command also accepts additional options for IQFeed. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean backtest <projectName> to run another backtest with the same options.

Optimization

Follow these steps to run a local optimization job with IQFeed data:

  1. Add some parameters to your project.
  2. Open a terminal in your organization workspace.
  3. Run lean optimize <projectName> --data-provider-historical IQFeed --iqfeed-username <username> --iqfeed-password <password>.
  4. $ lean optimize "My Project" --data-provider-historical IQFeed --iqfeed-username username --iqfeed-password password
  5. Follow the steps in the interactive wizard to configure your optimization job settings.

The lean optimize command also accepts additional options so that you can select IQFeed and run the command in non-interactive mode. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean optimize <projectName> to run another optimization job with the same options.

Live Trading

To deploy a local live algorithm that uses IQFeed as the data provider, open a terminal in your organization workspace and then run lean live deploy <projectName> --data-provider-live IQFeed --iqfeed-username <username> --iqfeed-password <password> --brokerage <brokerageName> <requiredBrokerageOptions>.

$ lean live deploy "My Project" --data-provider-live IQFeed --iqfeed-username username --iqfeed-password password --brokerage "Paper Trading"

The lean live deploy command also accepts additional options for IQFeed. Depending on the brokerage you select, you may need to provide some required brokerage options. To use a different provider for historical data, include the --data-provider-historical option. If you provide any of the preceding options, your Lean configuration file saves them so that you only need to run lean live deploy <projectName> --brokerage <brokerageName> to deploy another live algorithm with the same options.

To deploy the live algorithm through the interactive mode of the CLI, see IQFeed.

Pricing

To view the prices of the IQFeed services, see the IQFeed Core Service Fees page on the DTN IQFeed Help Site.

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

Did you find this page helpful?

Contribute to the documentation: