docstr: :param models: iterable of TradingModel instances.
  :param ref_index: index of the reference model in the list (for difference).
docstr_tok: [":","param","models",":","iterable","of","TradingModel","instances",".",":","param","ref_index",":","index","of","the","reference","model","in","the","list","(","for","difference",")","."]
code: def __init__(self, models, ref_index=0, labels=None):
      """
  
      :param models: iterable of TradingModel instances.
      :param ref_index: index of the reference model in the list (for difference).
      """
      if hasattr(models, "__iter__") and all(
          [isinstance(x, TradingModel) for x in models]
      ):
          self.models = models
          self.ref_index = ref_index
      else:
          raise AttributeError(
              "Models need to be an iterable of TradingModel instances."
          )
  
      self.labels = labels
  
file_path: finmarketpy/finmarketpy/backtest/backtestcomparison.py
imports: import numpy
  import pandas
  from finmarketpy.util.marketconstants import MarketConstants
  from findatapy.util import SwimPool
  from findatapy.util import LoggerManager
  from finmarketpy.backtest.backtestengine import TradingModel
  from chartpy import Chart, Style, ChartConstants
label_desc: Use image node_id 1 to create a new BacktestComparison object from inherited base classes: object with example: obj = BacktestComparison(models, ref_index, labels)