def main(): config = Config(load_from_yaml("../../config/live_ib.yaml"), load_from_yaml("../../config/down2%.yaml")) app_context = ApplicationContext(config=config) ATSRunner().start(app_context)
def main(): config = Config(load_from_yaml("../../config/backtest.yaml"), load_from_yaml("../../config/down2%.yaml")) app_context = ApplicationContext(config=config) BacktestRunner().start(app_context)
def create_app_context(self, override): return ApplicationContext(config=Config( load_from_yaml("../config/backtest.yaml"), load_from_yaml("../config/down2%.yaml"), test_override, StrategyPersistenceTest.stg_override, override))
def create_app_context(self, conf): return ApplicationContext(config=Config( load_from_yaml("../config/backtest.yaml"), load_from_yaml("../config/down2%.yaml"), test_override, { "Application": { "ceateAtStart": True, "deleteDBAtStop": False, "persistenceMode": "RealTime" } }, conf))
def main(): config = Config(load_from_yaml("../../config/data_import.yaml"), {"Application": { "feedId": "Yahoo" }}) app_context = ApplicationContext(config=config) MktDataImporter().start(app_context)
# from algotrader.utils import logger # def app_context(): # persistence_config = PersistenceConfig(None, # DataStore.Mongo, PersistenceMode.RealTime, # DataStore.Mongo, PersistenceMode.RealTime, # DataStore.Mongo, PersistenceMode.RealTime, # DataStore.Mongo, PersistenceMode.RealTime) # app_config = ApplicationConfig(id=None, ref_data_mgr_type=RefDataManager.DB, clock_type=Clock.RealTime, # persistence_config=persistence_config, # provider_configs=[MongoDBConfig(), IBConfig(client_id=2, use_gevent=True)]) # app_context = ApplicationContext(app_config=app_config) # # return app_context config = Config(load_from_yaml("../config/data_import.yaml")) app_context = ApplicationContext(config=config) def init_ib(app_context): app_context.start() broker = app_context.provider_mgr.get(Broker.IB) broker.start(app_context) return broker def import_inst_from_ib(broker, symbol, sec_type='STK',
def test_multiple(self): config = Config( load_from_yaml("../config/backtest.yaml"), load_from_yaml("../config/down2%.yaml")) self.assertEquals(1, config.get_strategy_config("down2%", "qty"))