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.

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.

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.

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.

Supported Assets

Our IQFeed integration supports securities from the following asset classes:

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: