I am currently stuck trying to get symbol bars for different time windows, using the AlphaModel class from the Algorithm Framework.
The Update-method of my AlphaModel class is defined as follows:
def Update(self, algorithm, data):
''' Determines an insight for each security based on two annualized slopes
Args:
algorithm: The algorithm instance
data: The new data available
Returns:
The new insights generated'''
insights = []
#shortTermBars = GetDailyClosesForAllSymbolsInUniverse(self.shortTermMomentumWindow,self.resolution)
#longTermBars = GetDailyClosesForAllSymbolsInUniverse(self.longTermMomentumWindow,self.resolution)
#...
return insights
How can I get the shortTermBars and the longTermBars for all symbols with the defined windows sizes resolutions, based on the data parameter?
Here is the complete code:
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!