class_docstr: This analyzer calculates trading system drawdowns stats such as drawdown
  values in %s and in dollars, max drawdown in %s and in dollars, drawdown
  length and drawdown max length
  
  Params:
  
    - ``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 . notation support and subdctionaries) with
      drawdown stats as values, the following keys/attributes are available:
  
      - ``drawdown`` - drawdown value in 0.xx %
      - ``moneydown`` - drawdown value in monetary units
      - ``len`` - drawdown length
  
      - ``max.drawdown`` - max drawdown value in 0.xx %
      - ``max.moneydown`` - max drawdown value in monetary units
      - ``max.len`` - max drawdown length
class_docstr_tok: ["This","analyzer","calculates","trading","system","drawdowns","stats","such","as","drawdown","values","in","%","s","and","in","dollars",",","max","drawdown","in","%","s","and","in","dollars",",","drawdown","length","and","drawdown","max","length","Params",":","-","``","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",".","notation","support","and","subdctionaries",")","with","drawdown","stats","as","values",",","the","following","keys\/attributes","are","available",":","-","``","drawdown","``","-","drawdown","value","in","0.xx","%","-","``","moneydown","``","-","drawdown","value","in","monetary","units","-","``","len","``","-","drawdown","length","-","``","max.drawdown","``","-","max","drawdown","value","in","0.xx","%","-","``","max.moneydown","``","-","max","drawdown","value","in","monetary","units","-","``","max.len","``","-","max","drawdown","length"]
code: def notify_fund(self, cash, value, fundvalue, shares):
      if not self._fundmode:
          self._value = value  # record current value
          self._maxvalue = max(
              self._maxvalue, value
          )  # update peak value
      else:
          self._value = fundvalue  # record current value
          self._maxvalue = max(self._maxvalue, fundvalue)
  
file_path: backtrader/backtrader/analyzers/drawdown.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import backtrader
  from backtrader.utils import AutoOrderedDict
label_desc: Use image node_id 4 for calling the DrawDown obj's underlying member method code with example usage: obj.notify_fund(cash, value, fundvalue, shares) without return types