code: def __init__(
      self,
      starting_cash,
      data_frequency,
      period_open=None,
      period_close=None,
      keep_transactions=True,
      keep_orders=False,
      serialize_positions=True,
      name=None,
  ):
      self.data_frequency = data_frequency
  
      # Start and end of the entire period
      self.period_open = period_open
      self.period_close = period_close
  
      self.initialize(
          starting_cash=starting_cash,
          starting_value=0.0,
          starting_exposure=0.0,
      )
  
      self.ending_value = 0.0
      self.ending_exposure = 0.0
      self.ending_cash = starting_cash
  
      self.subperiod_divider = None
  
      # Keyed by asset, the previous last sale price of positions with
      # payouts on price differences, e.g. Futures.
      #
      # This dt is not the previous minute to the minute for which the
      # calculation is done, but the last sale price either before the period
      # start, or when the price at execution.
      self._payout_last_sale_prices = {}
  
      self.keep_transactions = keep_transactions
      self.keep_orders = keep_orders
  
      self.name = name
  
      # An object to recycle via assigning new values
      # when returning portfolio information.
      # So as not to avoid creating a new object for each event
      self._portfolio_store = zp.Portfolio()
      self._account_store = zp.Account()
      self.serialize_positions = serialize_positions
  
imports: from __future__ import division
  import logbook
  import numpy
  from collections import namedtuple
  from catalyst.assets import Future
  from six import itervalues, iteritems
  import catalyst.protocol
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 1 to create a new PerformancePeriod object from inherited base classes: object with example: obj = PerformancePeriod(starting_cash, data_frequency, period_open, period_close, keep_transactions, keep_orders, serialize_positions, name)