code: def __init__(
      self,
      start_session,
      end_session,
      trading_calendar,
      capital_base=DEFAULT_CAPITAL_BASE,
      emission_rate="daily",
      data_frequency="daily",
      arena="backtest",
  ):
      assert type(start_session) == pd.Timestamp
      assert type(end_session) == pd.Timestamp
  
      assert (
          trading_calendar is not None
      ), "Must pass in trading calendar!"
      assert (
          start_session <= end_session
      ), "Period start falls after period end."
      assert (
          start_session <= trading_calendar.last_trading_session
      ), "Period start falls after the last known trading day."
      assert (
          end_session >= trading_calendar.first_trading_session
      ), "Period end falls before the first known trading day."
  
      # chop off any minutes or hours on the given start and end dates,
      # as we only support session labels here (and we represent session
      # labels as midnight UTC).
      self._start_session = normalize_date(start_session)
      self._end_session = normalize_date(end_session)
      self._capital_base = capital_base
  
      self._emission_rate = emission_rate
      self._data_frequency = data_frequency
  
      # copied to algorithm's environment for runtime access
      self._arena = arena
  
      self._trading_calendar = trading_calendar
  
      if not trading_calendar.is_session(self._start_session):
          # if the start date is not a valid session in this calendar,
          # push it forward to the first valid session
          self._start_session = (
              trading_calendar.minute_to_session_label(
                  self._start_session
              )
          )
  
      if not trading_calendar.is_session(self._end_session):
          # if the end date is not a valid session in this calendar,
          # pull it backward to the last valid session before the given
          # end date.
          self._end_session = trading_calendar.minute_to_session_label(
              self._end_session, direction="previous"
          )
  
      self._first_open = trading_calendar.open_and_close_for_session(
          self._start_session
      )[0]
      self._last_close = trading_calendar.open_and_close_for_session(
          self._end_session
      )[1]
  
imports: from functools import partial
  import logbook
  import pandas
  from pandas.tslib import normalize_date
  from six import string_types
  from sqlalchemy import create_engine
  from catalyst.assets import AssetDBWriter, AssetFinder
  from catalyst.assets.continuous_futures import CHAIN_PREDICATES
  from catalyst.data.loader import load_market_data
  from catalyst.utils.calendars import get_calendar
  from catalyst.utils.memoize import remember_last
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 1 to create a new SimulationParameters object from inherited base classes: object with example: obj = SimulationParameters(start_session, end_session, trading_calendar, capital_base, emission_rate, data_frequency, arena)