class_docstr: Total, Average, Compound and Annualized Returns calculated using a
  logarithmic approach
  
  See:
  
    - https://www.crystalbull.com/sharpe-ratio-better-with-log-returns/
  
  Params:
  
    - ``timeframe`` (default: ``None``)
  
      If ``None`` the ``timeframe`` of the 1st data in the system will be
      used
  
      Pass ``TimeFrame.NoTimeFrame`` to consider the entire dataset with no
      time constraints
  
    - ``compression`` (default: ``None``)
  
      Only used for sub-day timeframes to for example work on an hourly
      timeframe by specifying "TimeFrame.Minutes" and 60 as compression
  
      If ``None`` then the compression of the 1st data of the system will be
      used
  
    - ``tann`` (default: ``None``)
  
      Number of periods to use for the annualization (normalization) of the
  
      namely:
  
        - ``days: 252``
        - ``weeks: 52``
        - ``months: 12``
        - ``years: 1``
  
    - ``fund`` (default: ``None``)
  
      If ``None`` the actual mode of the broker (fundmode - True/False) will
      be autodetected to decide if the returns are based on the total net
      asset value or on the fund value. See ``set_fundmode`` in the broker
      documentation
  
      Set it to ``True`` or ``False`` for a specific behavior
  
  Methods:
  
    - get_analysis
  
      Returns a dictionary with returns as values and the datetime points for
      each return as keys
  
      The returned dict the following keys:
  
        - ``rtot``: Total compound return
        - ``ravg``: Average return for the entire period (timeframe specific)
        - ``rnorm``: Annualized/Normalized return
        - ``rnorm100``: Annualized/Normalized return expressed in 100%
code: def start(self):
      super(Returns, self).start()
      if self.p.fund is None:
          self._fundmode = self.strategy.broker.fundmode
      else:
          self._fundmode = self.p.fund
  
      if not self._fundmode:
          self._value_start = self.strategy.broker.getvalue()
      else:
          self._value_start = self.strategy.broker.fundvalue
  
      self._tcount = 0
  
file_path: backtrader/backtrader/analyzers/returns.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import math
  import backtrader
  from backtrader import TimeFrameAnalyzerBase
label_desc: Use image node_id 1 for calling the Returns obj's underlying member method code with example usage: obj.start() without return types