Hi,
I'm new to the Quantconnect platform. I am researching a cloned algorithm from Quantpaedia. When I backtest the algo and set the start date to 01-01-2019, it only places trades 5 months later. When I tried live paper trading, no orders were placed. I cannot figure why no trades are executed at the start date.
I suspect it is to do with self.lookup_period, for which I cannot find any documentation on this class. Also if I set the start date to 16-07-2020, how can I get the algorithm to trade on the 16th of every month?
Thanks in advance!
Shile Wen
Hi Mohamed,
When setting the start date to any date, the first few months will not see any trades (I've tested this by setting the date to 2016). The reason for this is because of self.SetWarmup on line 48, which warms up the algorithm with 252 (12*21) days of data, and so on line 88, the Rebalance function returns early when we do not have enough data.
As for the reason we may not see trading action immediately, this isn’t a strategy that trades frequently intraday. Looking at line 70, we see that it only makes its trades once per month through the Month Start Scheduled function. This means we will need to wait until the start of the next month until we can see any trades in live. Furthermore, it may trade in QuantConnect paper trading, but it won't trade with other brokerages because custom data is not tradeable with those. Please use our Futures instead.
Best,
Shile Wen
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.
Mohamed Ghassan
Hi Shile,
Thank you for your detailed response. Is there any way I can set the algorithm to trade on a specified date every month. For example, can I set it to trade on the 12th of every month?
Also, can I not use Quandl data on IB due to QuantConnect limitations, or do the other brokers like IB not support custom data? I'm just surprised because many of the startegy library tutorials tend to use quandl data.
Thanks Again!
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!