Back

Single strategy multiple instruments

        From desktop LEAN is it possible to run same strategy on multiple instruments?

In extreme case single strategy applied to all stocks (which could be >5000)?

          Alternate method, I have linked realtime stock  scanner (trade-ideas.com) to LEAN, 

 scanner will feed instruments to LEAN and specify Long or short.  LEAN manage the trade.

Scanner will feed LEAN  at most 100 trades per day, all to be exited end of day.

Broker used will be Interactive Brokers. Data feed will be IQFEED for data,

Please comment on practicality. Suggestions welcome..I am no software expert.

 

Update Backtest








By default LEAN is for multiple assets (unlike NT etc). You can just ask for multiple data streams at any time with AddEquity/AddSecurity methods. Its up to you to "arrayify" your trade logic.

Yes its probably possible for LEAN to manage 5k instruments. RAM/CPU requirements will depend on what you do in your algorithm and you will probably need to ramp from 100->5000 to test its usage. You'll need a datafeed for 5k instruments which IQFeed doesn't supply.

You can also link LEAN to your scanner & trade on the output. We provide an example of this in the open source project here:

https://github.com/QuantConnect/Lean/blob/master/Algorithm.CSharp/EquitiesLabAlgorithm.cs

 

1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed