'If the clock property is not set, then create one based on frequency.'

def _create_clock(self):

    trading_o_and_c = self.trading_calendar.schedule.ix[self.sim_params.sessions]
    market_closes = trading_o_and_c['market_close']
    minutely_emission = False
    if (self.sim_params.data_frequency == 'minute'):
        market_opens = trading_o_and_c['market_open']
        minutely_emission = (self.sim_params.emission_rate == 'minute')
    else:
        market_opens = market_closes
    execution_opens = self.trading_calendar.execution_time_from_open(market_opens)
    execution_closes = self.trading_calendar.execution_time_from_close(market_closes)
    before_trading_start_minutes = days_at_time(self.sim_params.sessions, time(8, 45), 'US/Eastern')
    return MinuteSimulationClock(self.sim_params.sessions, execution_opens, execution_closes, before_trading_start_minutes, minute_emission=minutely_emission)
