示例#1
0
def strategy_report(data):

    strategy_name = get_valid_strategy_name_from_user(data=data, allow_all=True, all_code="ALL")
    if strategy_name!="ALL":
        data_backtests = dataBacktest(data)
        timestamp = data_backtests.interactively_choose_timestamp(strategy_name)
    else:
        timestamp = arg_not_supplied

    report_config = email_or_print(strategy_report_config)
    report_config.modify_kwargs(strategy_name = strategy_name,
                                timestamp = timestamp)
    run_report(report_config, data = data)
def get_output_for_single_strategy(data,
                                   strategy_name,
                                   timestamp=arg_not_supplied):
    strategy_reporting_function = get_reporting_function_instance_for_strategy_name(
        data, strategy_name)
    data_backtest = dataBacktest(data)
    if timestamp is arg_not_supplied:
        backtest = data_backtest.get_most_recent_backtest(strategy_name)
    else:
        backtest = data_backtest.load_backtest(strategy_name, timestamp)

    strategy_format_output_list = strategy_reporting_function(data, backtest)

    return strategy_format_output_list
示例#3
0
def backtest_plot(data):
    data_backtests = dataBacktest(data)
    data_backtests.plot_data_loop()
    return None
示例#4
0
def backtest_html(data):
    data_backtests = dataBacktest(data)
    data_backtests.html_data_loop()
    return None
示例#5
0
def backtest_python(data):
    data_backtests = dataBacktest(data)
    data_backtests.eval_loop()
    return None