def setUpClass(cls): random.seed(0) cls.sids = (1, 2, 3) minute_sim_ps = factory.create_simulation_parameters( num_days=3, sids=cls.sids, data_frequency='minute', emission_rate='minute', ) daily_sim_ps = factory.create_simulation_parameters( num_days=30, sids=cls.sids, data_frequency='daily', emission_rate='daily', ) cls.sim_and_source = { 'minute': (minute_sim_ps, factory.create_minutely_trade_source( cls.sids, sim_params=minute_sim_ps, )), 'daily': (daily_sim_ps, factory.create_trade_source( cls.sids, trade_time_increment=timedelta(days=1), sim_params=daily_sim_ps, )), }
def setUpClass(cls): random.seed(0) cls.sids = (1, 2, 3) minute_sim_ps = factory.create_simulation_parameters( num_days=3, data_frequency='minute', emission_rate='minute', ) daily_sim_ps = factory.create_simulation_parameters( num_days=30, data_frequency='daily', emission_rate='daily', ) cls.env = TradingEnvironment() cls.env.write_data(equities_identifiers=[1, 2, 3]) cls.sim_and_source = { 'minute': (minute_sim_ps, factory.create_minutely_trade_source( cls.sids, sim_params=minute_sim_ps, env=cls.env, )), 'daily': (daily_sim_ps, factory.create_trade_source( cls.sids, trade_time_increment=timedelta(days=1), sim_params=daily_sim_ps, env=cls.env, )), }
def setUpClass(cls): random.seed(0) cls.sids = (1, 2, 3) minute_sim_ps = factory.create_simulation_parameters( num_days=3, sids=cls.sids, data_frequency='minute', emission_rate='minute', ) daily_sim_ps = factory.create_simulation_parameters( num_days=30, sids=cls.sids, data_frequency='daily', emission_rate='daily', ) cls.sim_and_source = { 'minute': (minute_sim_ps, factory.create_minutely_trade_source( cls.sids, trade_count=45, sim_params=minute_sim_ps, )), 'daily': (daily_sim_ps, factory.create_trade_source( cls.sids, trade_count=90, trade_time_increment=timedelta(days=1), sim_params=daily_sim_ps, )), }
def setUp(self): setup_logger(self) sids = [1, 2] self.sim_params = factory.create_simulation_parameters(num_days=2, sids=sids) self.source = factory.create_minutely_trade_source( sids, trade_count=100, sim_params=self.sim_params, concurrent=True, )
def setUp(self): setup_logger(self) sids = [1, 2] self.sim_params = factory.create_simulation_parameters( num_days=2, data_frequency='minute', emission_rate='minute', ) self.source = factory.create_minutely_trade_source( sids, sim_params=self.sim_params, concurrent=True, )
def setUpClass(cls): random.seed(0) cls.sids = (1, 2, 3) minute_sim_ps = factory.create_simulation_parameters( num_days=3, data_frequency="minute", emission_rate="minute" ) daily_sim_ps = factory.create_simulation_parameters(num_days=30, data_frequency="daily", emission_rate="daily") cls.sim_and_source = { "minute": (minute_sim_ps, factory.create_minutely_trade_source(cls.sids, sim_params=minute_sim_ps)), "daily": ( daily_sim_ps, factory.create_trade_source(cls.sids, trade_time_increment=timedelta(days=1), sim_params=daily_sim_ps), ), }
def setUpClass(cls): random.seed(0) cls.sids = (1, 2, 3) minute_sim_ps = factory.create_simulation_parameters( num_days=3, data_frequency="minute", emission_rate="minute" ) daily_sim_ps = factory.create_simulation_parameters(num_days=30, data_frequency="daily", emission_rate="daily") cls.env = TradingEnvironment() cls.env.write_data(equities_identifiers=[1, 2, 3]) cls.sim_and_source = { "minute": ( minute_sim_ps, factory.create_minutely_trade_source(cls.sids, sim_params=minute_sim_ps, env=cls.env), ), "daily": ( daily_sim_ps, factory.create_trade_source( cls.sids, trade_time_increment=timedelta(days=1), sim_params=daily_sim_ps, env=cls.env ), ), }