Back

Pre-market data and daily manual symbol selection

I trade earning announcements and use pre-market data. My strategy is not fully automated because I need to manually submit 10-15 symbols for long entry and 10-15 for short entry the previous night - so, every day, my strategy trades a different set of symbols. My algo also looks at 30 minutes of pre-market data (9-9:30am).

1) Do you provide pre-market data (ideally minute, but 5-min or 10-min is also fine)? How do i access it?

2) Is there some UI library/code/module to easily enter a symbol list every night for long and short (without having to hack the code in my live algo)? If not, pl advise on the easiest approach - a csv file in dropbox?

3) How do i prevent my algo from trading the same security the 2nd day? Not sure how to code so it only trades the most recent symbol list provided so long as earnings are within 1-2 days?

thanks
Kiran
Update Backtest








Welcome Kiran!

1) Yes definitely possible, you must specify "extendedMarketHours" true in the AddSecurity method.
https://github.com/QuantConnect/Lean/blob/master/Algorithm/QCAlgorithm.cs#L1101

2) There is no UX, but you could put a file in dropbox and use a WebClient to download the file. This style of algorithm we classify as a "stock picker" where you don't know the symbols at the start of the algorithm - its tricky to do this at the moment with LEAN. We support it in the open source project and will support it online in the next week.

3) This will depend on your algorithm implementation, you'll need to track when you purchase a position and then ensure you don't repeat the trade.
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.


Thanks Jared,
Is it possible to see the trade entry and trade exit on the price chart? Useful for trouble-shooting and fine-tuning the strategy.

Also, how is the stock-picker feature different from the approach described in (2) above - i.e. reading a file with stock symbols and conditionally opening trades if they meet rules? Any pointers to description/documentation would be helpful

Kiran
0

In the left tab we show the "Stock Plot" -- this includes the trade against the daily chart data. Unfortunately this is the best we can do for now because of data provider restrictions.

The stock-picker/universe selection feature is the same approach as you've described. We're in the final phases of setting up our new data infrastructure to handle this design of algorithm. See this thread - https://www.quantconnect.com/forum/discussion/857/stale-prices-from-1001-onward-or-am-i-using-this-incorrectly-#Item_3
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