Back

How to do Daily Analysis on closing price and buying at open price?

I am new to QuantConnect, and want to run the Lean engine locally. If I have open/close/high/low/volume that I can import, is there a way to do analysis on the close prices but do purchases on the open?

I want to start by analysing after market close, and open positions soon after market open (maybe after a check to make sure there wasn't a large gap since last close.).

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.


Hey James,

Welcome to QuantConnect!

You can do your analysis after market hours using the OnEndOfDay method, which fires at the end of every trading day. Any MarketOrders you place during this time period will automatically be converted to MarketOnOpenOrders, which are executed at market open the next day. If you want to account for large gaps in the opening price, it may be best to do your analysis and place your trades after market open at the beginning of the day.

You can import your own data using custom data.

I encourage you to work your way through the bootcamps. They are the best way to learn how Lean works. This bootcamp teaches you how to make an algorithm which trades large gaps between the closing price and the opening price.

Best
Rahul

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