def update_system_backtests(): ## function if called from script with dataBlob(log_name="Update-System_Backtest") as data: list_of_strategies = get_list_of_strategies_for_process( data, process_name) for strategy_name in list_of_strategies: system_backtest_runner = strategyRunner(data, strategy_name, process_name, backtest_function) system_backtest_runner.run_strategy_method()
def get_list_of_backtest_timer_functions_for_strategies(data): list_of_strategy_names = get_list_of_strategies_for_process( data, process_name) list_of_timer_names_and_functions = [] for strategy_name in list_of_strategy_names: # we add a method to the class with the strategy name, that just calls run_strategy_backtest with the current # strategy setattr(strategyRunner, strategy_name, backtest_function_to_be_renamed) object = strategyRunner(data, strategy_name, process_name, backtest_function) strategy_tuple = (strategy_name, object) list_of_timer_names_and_functions.append(strategy_tuple) return list_of_timer_names_and_functions
def update_system_backtests(): ## function if called from script with dataBlob(log_name="Update-System_Backtest") as data: list_of_strategies = get_list_of_strategies_for_process(data, process_name) ALL = "ALL" print("Which strategy?") strategy_name = print_menu_of_values_and_get_response(list_of_strategies, default_str=ALL) if not strategy_name == ALL: list_of_strategies = [strategy_name] for strategy_name in list_of_strategies: system_backtest_runner = strategyRunner(data, strategy_name, process_name, backtest_function) system_backtest_runner.run_strategy_method()
def update_strategy_orders(): ## function if called from script with dataBlob(log_name="Update-Strategy-Orders") as data: list_of_strategies = get_list_of_strategies_for_process( data, process_name) ALL = "ALL" print("Which strategy?") strategy_name = print_menu_of_values_and_get_response( list_of_strategies, default_str=ALL) if not strategy_name == ALL: list_of_strategies = [strategy_name] for strategy_name in list_of_strategies: strategy_order_generator = strategyRunner( data, strategy_name, process_name, name_of_main_generator_method) strategy_order_generator.run_strategy_method()