stream_history=10, book_freq=book_freq, random_state=np.random.RandomState( seed=np.random.randint(low=0, high=2**32, dtype='uint64'))) ]) agent_types.extend("ExchangeAgent") agent_count += 1 # 2) Noise Agents num_noise = 5000 agents.extend([ NoiseAgent(id=j, name="NoiseAgent {}".format(j), type="NoiseAgent", symbol=symbol, starting_cash=starting_cash, wakeup_time=util.get_wake_time(mkt_open, mkt_close), log_orders=log_orders, random_state=np.random.RandomState( seed=np.random.randint(low=0, high=2**32, dtype='uint64'))) for j in range(agent_count, agent_count + num_noise) ]) agent_count += num_noise agent_types.extend(['NoiseAgent']) # 3) Value Agents num_value = 100 agents.extend([ ValueAgent(id=j, name="Value Agent {}".format(j), type="ValueAgent",
# Some configs for ZI agents only (among seven parameter settings). num = 100 # number of noise agents num_noise = int(num * proportion) # ZI strategy split. Note that agent arrival rates are quite small, because our minimum # time step is a nanosecond, and we want the agents to arrive more on the order of # minutes. agents.extend([ NoiseAgent(j, "NoiseAgent {}".format(j), "NoiseAgent", random_state=np.random.RandomState( seed=np.random.randint(low=0, high=2**32, dtype='uint64')), log_orders=log_orders, symbol=symbol, starting_cash=starting_cash, wakeup_time=mkt_open + np.random.rand() * (mkt_close - mkt_open)) for j in range(agent_count, agent_count + num_noise) ]) agent_count += num_noise agent_types.extend( ['NoiseAgent' for j in range(agent_count, agent_count + num_noise)]) # 100 agents num_value = num - num_noise # ZI strategy split. Note that agent arrival rates are quite small, because our minimum # time step is a nanosecond, and we want the agents to arrive more on the order of
random_state=np.random.RandomState( seed=np.random.randint(low=0, high=2**32))) ]) agent_types.extend("ExchangeAgent") agent_count += 1 # 2) Noise Agents num_noise = 5000 noise_mkt_open = historical_date + pd.to_timedelta("09:00:00") noise_mkt_close = historical_date + pd.to_timedelta("16:00:00") agents.extend([ NoiseAgent(id=j, name="NoiseAgent_{}".format(j), type="NoiseAgent", symbol=symbol, starting_cash=starting_cash, wakeup_time=util.get_wake_time(noise_mkt_open, noise_mkt_close), log_orders=False, log_to_file=False, random_state=np.random.RandomState( seed=np.random.randint(low=0, high=2**32))) for j in range(agent_count, agent_count + num_noise) ]) agent_count += num_noise agent_types.extend(['NoiseAgent']) # 3) Value Agents num_value = 100 agents.extend([ ValueAgent(id=j, name="ValueAgent_{}".format(j), type="ValueAgent",
agent_types.extend("ExchangeAgent") agent_count += 1 # 2) Noise Agents num_noise = 5000 noise_mkt_open = historical_date + pd.to_timedelta( "09:00:00") # These times needed for distribution of arrival times # of Noise Agents noise_mkt_close = historical_date + pd.to_timedelta("16:00:00") agents.extend([ NoiseAgent( id=j, name="NoiseAgent {}".format(j), type="NoiseAgent", symbol=symbol, starting_cash=starting_cash, wakeup_time=util.get_wake_time(noise_mkt_open, noise_mkt_close), log_orders=log_orders, random_state=np.random.RandomState( seed=np.random.randint(low=0, high=2**32, dtype="uint64")), ) for j in range(agent_count, agent_count + num_noise) ]) agent_count += num_noise agent_types.extend(["NoiseAgent"]) # 3) Value Agents num_value = 100 agents.extend([ ValueAgent( id=j, name="Value Agent {}".format(j),