Back

Scheduling trades with a custom universe

I am relatively new to QuantConnect and am having some difficulty building my first algorithm. My goal is as follows:

I want to take a csv that I have hosted on dropbox that provides a list of 5 stocks for each day of 2017, and on each day I want to place orders for these 5 stocks, 10 minutes after market open and then liquidate the positions 10 minutes before market close.

I have looked through the documentation and example scripts and have found both how to load custom data and execute scheduled events but I can't seem to get them working together. If anyone could provide a rough framework in Python of how I should approach this, it would be greatly appreciated.

Update Backtest







I have attached my current attempt. I don't seem to be getting any errors but the algorithm isn't executing any trades and I can't workout why.

0


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