I am interested in developing intra-day equity trading strategies. Given the equities in my "universe" will change intraday I cannot use QC Universe Selection. I have so far coded something that reads in Tickers from a Dropbox file with some Ticker related info. eg lines in the file may be:
NFLX NeutralBias
AAPL LongOnlyBias
TWTR ShortOnlyBias
I have set my code to check the Dropbox file at very regular increments throughout the trading day using ScheduleEvents, if any new tickers are found they are added to the data feed through AddEquity, if any ancillary data has been updated it is changed within my algo etc.
It strikes me that this is a pretty inefficient, in that my algo is constantly checking a file for changes when the vast majority of times changes will not have been made, plus when I do make a change I have to wait for the next ScheduledEvent for the new data to be imported into QC resulting in a lag. It would seem more efficient for me to simply input my data via the Console possibly using keywords such as New, Edit, Remove etc. I would be pretty comfortable implementing this but getting over the first hurdle is my problem in that I don't know how to go about getting QC to read from the console. I have tried ReadLine() within Initialize and OnData but this just gets skipped over and logically don't make sense as the place. Any guidance would be appreciated. With thanks.
Halldor Andersen
Hello Dary. Unfortunately, it is not possible to interact with an algorithm through console input using QuantConnect. However, securities can be added to the security universe, when running algorithm live, using the IDE:
This way, the security universe can be defined by user input, intraday. Further information on how to import custom data can be found in this documentation section.
Greg Kendall
I suppose you could use an obscure security symbol as a flag: 1) Select a symbol you would never use in normal operations ... say GME, and ETF or something, 2) Add that symbol in the method described above during live trading. 3) Have your code look for that symbol in the course selection function and if it sees it then go out and get your modified dropbox list. 4) Remove that symbol from your universe and continue processing. 5) Profit!!!!
Â
Quant Dary
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!