I am trying to setup a live LEAN process that does not connect to any implemented brokerage/exchange but instead reads custom data from local files. No securities are defined and no exchange data feeds, only custom data types.
Here is my attempt for the environment in config.json:
"live-customdat": {
"live-mode": true,
// the paper brokerage requires the BacktestingTransactionHandler
"live-mode-brokerage": "PaperBrokerage",
"setup-handler": "QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler",
"result-handler": "QuantConnect.Lean.Engine.Results.LiveTradingResultHandler",
"data-feed-handler": "QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed",
"real-time-handler": "QuantConnect.Lean.Engine.RealTime.LiveTradingRealTimeHandler",
"transaction-handler": "QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler"
}
LEAN seems to launch fine and keeps running but my custom data is not being read with Ondata handlers. The handlers are not being fired despite the nimute-resolution when declaring custom data.
The same setup for the custom data works fine with the "live-gdax" environment.
Wondering if anyone can spot something wrong with my environment configuration. It is fairly similar to "live-paper" except I removed "data-queue-handler" due to "not implemented" error.
Serena M McDonnell
Hi Pavel Paramonov, did you end up figuring this out? I'm also trying to set up a live LEAN process that uses local data.
Alexandre Catarino
Hi Serena M McDonnell ,
What have you done so far and which issues did you face?
Pavel Paramonov, sorry about the wait. Did you try to run the algorithm in QuantConnect Cloud?
It might be an issue with your custom data implementation with a bad definition of EndTime.
Serena M McDonnell
Hi Alexandre,
Thanks for your reply! I started a thread the other day and have more detail there:
https://www.quantconnect.com/forum/discussion/8472/paper-trading-locally-with-ib-and-custom-data-sources/p1The short version is that I have my own data from some vendors stored in the `Lean/Data` folder, and everything works fine when backtesting. However when I switch to `live-interactive` and try to paper trade with IB it seems that my configs are not correct - the terminal output error messages imply that I'm not fetching any data. I tried setting the `data-feed-handler` config for `live-interactive` use the `FileSystemDataFeed` in an effort to get LEAN to read data from my local machine rather than pull from IB's datafeed. I'm sure my configs were set up properly earlier on as I was able to execute a simple buy and hold SPY, but that simply required executing an order and making sure it was reflected in my paper trading account, rather than creating some trading rules based on local fundamental data.
Pavel Paramonov
In my case I ended up registering an exchange feed just to have all OnData methods run on their respective schedule, without using the data from that feed in any way. It does appear as if without reading something from Data/ custom OnData methods are not firing.
Pavel Paramonov
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!