class_docstr: Measures the ratio of change in prices over a period
  
  Formula:
    - roc = (data - data_period) / data_period
  
  See:
    - http://en.wikipedia.org/wiki/Momentum_(technical_analysis)
class_docstr_tok: ["Measures","the","ratio","of","change","in","prices","over","a","period","Formula",":","-","roc","=","(","data","-","data_period",")","\/","data_period","See",":","-","http",":","\/\/en.wikipedia.org\/wiki\/Momentum_","(","technical_analysis",")"]
code: def __init__(self):
      dperiod = self.data(-self.p.period)
      self.l.roc = (self.data - dperiod) / dperiod
      super(RateOfChange, self).__init__()
  
file_path: backtrader/backtrader/indicators/momentum.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from .None import Indicator
label_desc: Use image node_id 1 to create a new RateOfChange object from inherited base classes: Indicator with example: obj = RateOfChange()