class_docstr: :Usage:
      Instantiate RiskMetricsCumulative once.
      Call update() method on each dt to update the metrics.
class_docstr_tok: [":","Usage",":","Instantiate","RiskMetricsCumulative","once",".","Call","update","(",")","method","on","each","dt","to","update","the","metrics","."]
code: def __repr__(self):
      statements = []
      for metric in self.METRIC_NAMES:
          value = getattr(self, metric)[-1]
          if isinstance(value, list):
              if len(value) == 0:
                  value = np.nan
              else:
                  value = value[-1]
          statements.append("{m}:{v}".format(m=metric, v=value))
  
      return "\n".join(statements)
  
file_path: catalyst/catalyst/finance/risk/cumulative.py
imports: import functools
  import logbook
  import numpy
  import pandas
  from pandas.tseries.tools import normalize_date
  from six import iteritems
  from .risk import check_entry, choose_treasury
  from catalyst.patches.stats import alpha_beta_aligned, annual_volatility, downside_risk, information_ratio, max_drawdown, sharpe_ratio, sortino_ratio, cum_returns
  import warnings
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 4 for calling the RiskMetricsCumulative obj's underlying member method code with example usage: obj.__repr__() and returns: str