QUANTCONNECT COMMUNITY
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.
Anita Evans
Awesome Service
Randall Cooper
Regarding the statement "it is best to use Minute or Hour resolution and a Scheduled Event to perform daily operations to achieve realistic performance," how do I implement a Scheduled Event using the new algorithm framework (i.e., Universe Selection, Alpha Creation, Portfolio Construction, etc.).  For example, let's say I want generate insights every day 10 minutes after market open - where would I put my self.Schedule.On() function?
Alexandre Catarino
Hi Randall Cooper ,
We can pass the algorithm to the Alpha Model constructor and create the Scheduled Event where the callback method will use algorithm.EmitInsights to emit the generated insights:
# In Initialize self.SetAlpha(MyAlphaModel(self)) class MyAlphaModel(AlphaModel): def __init__(self, algorithm): self.algorithm = algorithm algorithm.Schedule.On( algorithm.DateRules.On(2013, 10, 7), algorithm.TimeRules.At(13, 0), self.SpecificTime) def SpecificTime(self): insights = [] # create insights logic self.algorithm.EmitInsights(insights) def Update(self, algorithm, slice): return []
We are working on new universe selection and alpha models that will incorporate scheduled events to make this workaround unnecessary.
Randall Cooper
Thank you Alexandre for the quick reply and very helpful response - much appreciated!
QuantConnect Robot
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!