code: def cumulative_return_graph(
      position: dict,
      report_normal: pd.DataFrame,
      label_data: pd.DataFrame,
      show_notebook=True,
      start_date=None,
      end_date=None,
  ) -> Iterable[go.Figure]:
      """Backtest buy, sell, and holding cumulative return graph
  
          Example:
  
  
              .. code-block:: python
  
                  from qlib.data import D
                  from qlib.contrib.evaluate import risk_analysis, backtest, long_short_backtest
                  from qlib.contrib.strategy import TopkDropoutStrategy
  
                  # backtest parameters
                  bparas = {}
                  bparas['limit_threshold'] = 0.095
                  bparas['account'] = 1000000000
  
                  sparas = {}
                  sparas['topk'] = 50
                  sparas['n_drop'] = 5
                  strategy = TopkDropoutStrategy(**sparas)
  
                  report_normal_df, positions = backtest(pred_df, strategy, **bparas)
  
                  pred_df_dates = pred_df.index.get_level_values(level='datetime')
                  features_df = D.features(D.instruments('csi500'), ['Ref($close, -1)/$close - 1'], pred_df_dates.min(), pred_df_dates.max())
                  features_df.columns = ['label']
  
                  qcr.analysis_position.cumulative_return_graph(positions, report_normal_df, features_df)
  
  
          Graph desc:
  
              - Axis X: Trading day.
              - Axis Y:
              - Above axis Y: `(((Ref($close, -1)/$close - 1) * weight).sum() / weight.sum()).cumsum()`.
              - Below axis Y: Daily weight sum.
              - In the **sell** graph, `y < 0` stands for profit; in other cases, `y > 0` stands for profit.
              - In the **buy_minus_sell** graph, the **y** value of the **weight** graph at the bottom is `buy_weight + sell_weight`.
              - In each graph, the **red line** in the histogram on the right represents the average.
  
      :param position: position data
      :param report_normal:
  
  
              .. code-block:: python
  
                                  return      cost        bench       turnover
                  date
                  2017-01-04  0.003421    0.000864    0.011693    0.576325
                  2017-01-05  0.000508    0.000447    0.000721    0.227882
                  2017-01-06  -0.003321   0.000212    -0.004322   0.102765
                  2017-01-09  0.006753    0.000212    0.006874    0.105864
                  2017-01-10  -0.000416   0.000440    -0.003350   0.208396
  
  
      :param label_data: `D.features` result; index is `pd.MultiIndex`, index name is [`instrument`, `datetime`]; columns names is [`label`].
  
          **The label T is the change from T to T+1**, it is recommended to use ``close``, example: `D.features(D.instruments('csi500'), ['Ref($close, -1)/$close-1'])`
  
  
              .. code-block:: python
  
                                                  label
                  instrument  datetime
                  SH600004        2017-12-11  -0.013502
                                  2017-12-12  -0.072367
                                  2017-12-13  -0.068605
                                  2017-12-14  0.012440
                                  2017-12-15  -0.102778
  
  
      :param show_notebook: True or False. If True, show graph in notebook, else return figures
      :param start_date: start date
      :param end_date: end date
      :return:
      """
      position = copy.deepcopy(position)
      report_normal = report_normal.copy()
      label_data.columns = ["label"]
      _figures = _get_figure_with_position(
          position, report_normal, label_data, start_date, end_date
      )
      if show_notebook:
          BaseGraph.show_graph_in_notebook(_figures)
      else:
          return _figures
  
file_path: qlib/qlib/contrib/report/analysis_position/cumulative_return.py
imports: import copy
  from typing import Iterable
  import pandas
  import plotly.graph_objs
  from ..graph import BaseGraph, SubplotsGraph
  from ..analysis_position.parse_position import get_position_data
label_desc: Use image node_id 3 for calling a global function with example usage: cumulative_return_graph(position, report_normal, label_data, show_notebook, start_date, end_date) and returns: _figures