original_docstring: Returns the annualized stddev of daily log returns of values.
docstring: Returns the annualized stddev of daily log returns of values.
docstring_tokens: Returns the annualized stddev of daily log returns of values .
code: def historical_volatility(values):
      'Returns the annualized stddev of daily log returns of values.'
  
      if not isinstance(values, np.ndarray):
          values = values.values
  
      returns = np.log(values[1:] / values[:-1])
  
      return np.sqrt(TRADING_DAYS_IN_YEAR * returns.var())
code_tokens: def historical_volatility ( values ) : if not isinstance ( values , np . ndarray ) : values = values . values returns = np . log ( values [ 1 : ] / values [ : - 1 ] ) return np . sqrt ( TRADING_DAYS_IN_YEAR * returns . var ( ) )
short_docstring: Returns the annualized stddev of daily log returns of values.
short_docstring_tokens: Returns the annualized stddev of daily log returns of values .
comment: 'Returns the annualized stddev of daily log returns of values.'