I am trying to annualize standarddeviation and simplemovingaverage in class SymbolData. But sofar I get errors like 'unsupported operand type(s) for *: 'float' and 'StandardDeviation'' and 'TypeError : unsupported operand type(s) for +: 'int' and 'SimpleMovingAverage'' Below is my code within class SymbolData(object): with commented out the part that is not working (I tried this part also via OnRoc_stddevUpDated and OnRoc_smaUpdated functions, but that does not seem to work either).

       self.roc = algorithm.ROC(symbol, 1, Resolution.Daily)
       self.roc_values = []
       self.roc_stddev = StandardDeviation(765)
       self.roc_sma = SimpleMovingAverage(765)
       self.roc.Updated += self.OnRocUpdated
       
       """
       self.roc_stddev_an = 100 * math.sqrt(252) * self.roc_stddev     #annualize
       self.roc_sma_an = 100 * ((1+self.roc_sma) ** 252 - 1)              #annualize 
       self.sharpe = self.roc_stddev / self.roc_sma
       """

In OnData it is working fine like below, but I want to have it in SymbolData for using it in universe selection.

       self.roc_stddev_an = 100 * math.sqrt(252) * SymbolData.roc_stddev.Current.Value #annualize
       self.roc_sma_an = 100 * ((1+SymbolData.roc_sma.Current.Value) ** 252 - 1)          #annualize 

Can someone please give me a direction how this can be done? Thanks!!