class_docstr: Calculates the standard deviation of the passed data for a given period
  
  Note:
    - If 2 datas are provided as parameters, the 2nd is considered to be the
      mean of the first
  
    - ``safepow`` (default: False) If this parameter is True, the standard
      deviation will be calculated as pow(abs(meansq - sqmean), 0.5) to safe
      guard for possible negative results of ``meansq - sqmean`` caused by
      the floating point representation.
  
  Formula:
    - meansquared = SimpleMovingAverage(pow(data, 2), period)
    - squaredmean = pow(SimpleMovingAverage(data, period), 2)
    - stddev = pow(meansquared - squaredmean, 0.5)  # square root
  
  See:
    - http://en.wikipedia.org/wiki/Standard_deviation
code: def __init__(self):
      if len(self.datas) > 1:
          mean = self.data1
      else:
          mean = self.p.movav(self.data, period=self.p.period)
  
      meansq = self.p.movav(pow(self.data, 2), period=self.p.period)
      sqmean = pow(mean, 2)
  
      if self.p.safepow:
          self.lines.stddev = pow(abs(meansq - sqmean), 0.5)
      else:
          self.lines.stddev = pow(meansq - sqmean, 0.5)
  
file_path: backtrader/backtrader/indicators/deviation.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from .None import Indicator, MovAv
label_desc: Use image node_id 2 to create a new StandardDeviation object from inherited base classes: Indicator with example: obj = StandardDeviation()