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 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 ), ), }