Back

IEX live data feed : how to implement it?

Hi, 

Has someone experimented with the use of IEX as a data streaming source, for a local live deployment of LEAN? 

My first guess was to select the IEXDataQueueHandler in my config.json file, by mimicking what is done for the IQFeedDataQueueHandler.

Unfortunately, that does not work. When deploying the algorithm, I get a runtime error saying that there are no exports corresponding to the typename "QuantConnect.ToolBox.IEX.IEXDataQueueHandler".

Did someone successfully attempt this? Any pointers on how to make this work? 

Thanks for your help, 

Mat

Update Backtest







Hey Mathieu! That should have worked! Sounds like its missing the line of code which tells it to be an export. We'll patch that today,

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.


The issue seems to be that the class IEXDataQueueHandler does not inherit

from IHistoryProvider, while IQFeedDataQueueHandler does.



Does that mean that IEX could be used for live data streaming, but not for

history requests?



If not, would this be complex to implement?
0

Hi Mathieu, 
I wasn't able to repeat the export error when loading the IEXDataQueueHandler, with this configuration:
 

"paper-iex": {

"live-mode": true,

// real brokerage implementations require the BrokerageTransactionHandler
"live-mode-brokerage": "PaperBrokerage",

"data-queue-handler": "QuantConnect.ToolBox.IEX.IEXDataQueueHandler",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler",
"history-provider": "BrokerageHistoryProvider"
}


but you are right, we do not currently have an implementation of IHistoryProvider for IEX,
I added a reminder in this GitHub issue:
 

https://github.com/QuantConnect/Lean/issues/2178
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.


Hi Stefano,



The error is only when using IEX as the history provider, like it is done

in the IQFeed environment, in the config.json file.



What would you say is the easiest way to implement a free history provider

for my algorithm? Would there be a way to get it from Google or Yahoo? (not

real-time data, but just historical daily close values).



Thanks!
0

Hi Mathieu, 
it shouldn't be too hard to fetch historical data from IEX using their API:
 

https://iextrading.com/developer/docs/#chart


This example request will return one year of daily data:
https://api.iextrading.com/1.0/stock/msft/chart/1y

I would recommend adding this feature to the IEXDataQueueHandler by implementing the IHistoryProvider interface.
This would enable IEX to be used locally as both live and historical data source (similar to how it was done for IQFeed).

 

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.


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