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","."]
docstr: Creates a dictionary representing the state of the risk report.
  Returns a dict object of the form:
docstr_tok: ["Creates","a","dictionary","representing","the","state","of","the","risk","report",".","Returns","a","dict","object","of","the","form",":"]
code: def to_dict(self):
      """
      Creates a dictionary representing the state of the risk report.
      Returns a dict object of the form:
      """
      dt = self.latest_dt
      dt_loc = self.latest_dt_loc
      period_label = dt.strftime("%Y-%m")
      rval = {
          "trading_days": self.num_trading_days,
          "benchmark_volatility": self.benchmark_volatility[dt_loc],
          "algo_volatility": self.algorithm_volatility[dt_loc],
          "treasury_period_return": self.treasury_period_return,
          # Though the two following keys say period return,
          # they would be more accurately called the cumulative return.
          # However, the keys need to stay the same, for now, for backwards
          # compatibility with existing consumers.
          "algorithm_period_return": self.algorithm_cumulative_returns[
              dt_loc
          ],
          "benchmark_period_return": self.benchmark_cumulative_returns[
              dt_loc
          ],
          "beta": self.beta[dt_loc],
          "alpha": self.alpha[dt_loc],
          "sharpe": self.sharpe[dt_loc],
          "sortino": self.sortino[dt_loc],
          "information": self.information[dt_loc],
          "excess_return": self.excess_returns[dt_loc],
          "max_drawdown": self.max_drawdown,
          "max_leverage": self.max_leverage,
          "period_label": period_label,
      }
  
      return {
          k: (None if check_entry(k, v) else v)
          for k, v in iteritems(rval)
      }
  
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 3 for calling the RiskMetricsCumulative obj's underlying member method code with example usage: obj.to_dict() and returns: unknown