class_docstr: Tracks the performance of the algorithm.
code: def __init__(self, sim_params, trading_calendar, env):
      self.sim_params = sim_params
      self.trading_calendar = trading_calendar
      self.asset_finder = env.asset_finder
      self.treasury_curves = env.treasury_curves
  
      self.period_start = self.sim_params.start_session
      self.period_end = self.sim_params.end_session
      self.last_close = self.sim_params.last_close
      self._current_session = self.sim_params.start_session
  
      (
          self.market_open,
          self.market_close,
      ) = self.trading_calendar.open_and_close_for_session(
          self._current_session
      )
  
      self.total_session_count = len(self.sim_params.sessions)
      self.capital_base = self.sim_params.capital_base
      self.emission_rate = sim_params.emission_rate
  
      self.position_tracker = PositionTracker(
          data_frequency=self.sim_params.data_frequency
      )
  
      if self.emission_rate == "daily":
          self.all_benchmark_returns = pd.Series(
              index=self.sim_params.sessions
          )
          self.cumulative_risk_metrics = risk.RiskMetricsCumulative(
              self.sim_params,
              self.treasury_curves,
              self.trading_calendar,
          )
      elif self.emission_rate == "minute":
          self.all_benchmark_returns = pd.Series(
              index=pd.date_range(
                  self.sim_params.first_open,
                  self.sim_params.last_close,
                  freq="Min",
              )
          )
          self.cumulative_risk_metrics = risk.RiskMetricsCumulative(
              self.sim_params,
              self.treasury_curves,
              self.trading_calendar,
              create_first_day_stats=True,
          )
  
      # this performance period will span the entire simulation from
      # inception.
      self.cumulative_performance = PerformancePeriod(
          # initial cash is your capital base.
          starting_cash=self.capital_base,
          data_frequency=self.sim_params.data_frequency,
          # the cumulative period will be calculated over the entire test.
          period_open=self.period_start,
          period_close=self.period_end,
          # don't save the transactions for the cumulative
          # period
          keep_transactions=False,
          keep_orders=False,
          # don't serialize positions for cumulative period
          serialize_positions=False,
          name="Cumulative",
      )
      self.cumulative_performance.position_tracker = (
          self.position_tracker
      )
  
      # this performance period will span just the current market day
      self.todays_performance = PerformancePeriod(
          # initial cash is your capital base.
          starting_cash=self.capital_base,
          data_frequency=self.sim_params.data_frequency,
          # the daily period will be calculated for the market day
          period_open=self.market_open,
          period_close=self.market_close,
          keep_transactions=True,
          keep_orders=True,
          serialize_positions=True,
          name="Daily",
      )
      self.todays_performance.position_tracker = self.position_tracker
  
      self.saved_dt = self.period_start
      # one indexed so that we reach 100%
      self.session_count = 0.0
      self.txn_count = 0
  
      self.account_needs_update = True
      self._account = None
  
imports: from __future__ import division
  import logbook
  import pandas
  from pandas.tseries.tools import normalize_date
  from catalyst.finance.performance.period import PerformancePeriod
  from catalyst.errors import NoFurtherDataError
  import catalyst.finance.risk
  from .position_tracker import PositionTracker
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 1 to create a new PerformanceTracker object from inherited base classes: object with example: obj = PerformanceTracker(sim_params, trading_calendar, env)