Hi,
In this simple example I wouldn't get any data pumped in OnData before Jan 17. Simply saying algo won't warm up . Can anyone please explaine the reason why - and how do I get data to warm up the algo on futures? First output will be following:
2018-01-17 00:00:00 TIME: 1/17/2018 12:00:00 AM
2018-01-17 00:01:00 TIME: 1/17/2018 12:01:00 AM
public override void Initialize()
{
SetStartDate(2018, 01, 17);
SetEndDate(2018, 03, 01);
SetCash(100000);
SetWarmUp(TimeSpan.FromDays(7));
future = AddFuture("BTC", Resolution.Minute);
future.SetFilter(TimeSpan.Zero, TimeSpan.FromDays(92));
}
public override void OnData(Slice data)
{
Log($"TIME: {Time}");
}
Jared Broad
Sorry at this time we do not support warming up Universes. Because futures is a universe of contracts (+ options, equity-universe) it falls into this category. We are aware of the limitation and for now, recommend using the History API to fetch the future contract history you need on start.
Here is an example of using the futures history API to warm up your algorithm:
You will need the specific Symbol object for the contract. These are passed into the OnSecuritiesChanged Event.
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.
Ilshat Garipov
Thank you Jared, that's very helpful !
Ilshat Garipov
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!