class_docstr: A :class:`pyalgotrade.stratanalyzer.StrategyAnalyzer` that calculates time-weighted returns for the
  whole portfolio.
  
  :param maxLen: The maximum number of values to hold in net and cumulative returs dataseries.
      Once a bounded length is full, when new items are added, a corresponding number of items are discarded from the
      opposite end. If None then dataseries.DEFAULT_MAX_LEN is used.
  :type maxLen: int.
class_docstr_tok: ["A",":","class",":","`","pyalgotrade.stratanalyzer.StrategyAnalyzer","`","that","calculates","time-weighted","returns","for","the","whole","portfolio",".",":","param","maxLen",":","The","maximum","number","of","values","to","hold","in","net","and","cumulative","returs","dataseries",".","Once","a","bounded","length","is","full",",","when","new","items","are","added",",","a","corresponding","number","of","items","are","discarded","from","the","opposite","end",".","If","None","then","dataseries.DEFAULT_MAX_LEN","is","used",".",":","type","maxLen",":","int","."]
docstr: Returns a :class:`pyalgotrade.dataseries.DataSeries` with the returns for each bar.
code: def getReturns(self):
      """Returns a :class:`pyalgotrade.dataseries.DataSeries` with the returns for each bar."""
      return self.__netReturns
  
imports: import math
  from pyalgotrade import stratanalyzer
  from pyalgotrade import observer
  from pyalgotrade import dataseries
label_desc: Use image node_id 4 for calling the Returns obj's underlying member method code with example usage: obj.getReturns() and returns: self