Пример #1
0
def trade_report(data):
    start_date, end_date, calendar_days = get_report_dates(data)
    report_config = email_or_print(trade_report_config)
    report_config.modify_kwargs(calendar_days_back = calendar_days,
                                start_date = start_date,
                                end_date = end_date)
    run_report(report_config, data = data)
def email_daily_pandl_report():

    pandl_report_config = report_config(
        title="One day P&L report",
        function="sysproduction.diagnostic.profits.pandl_info",
        output="email")

    run_report(pandl_report_config, calendar_days_back=1)
Пример #3
0
def email_status_report():
    """

    Print and email information about current system status

    :return: None, but print results
    """

    config = status_report_config.new_config_with_modified_output("email")
    run_report(config)
Пример #4
0
def get_roll_info(instrument_code: str = "ALL"):
    """

    Print information about whether futures contracts should be rolled

    :param instrument_code: The instrument code, for example 'AUD', 'CRUDE_W'. Specify ALL for everything
    :return: None, but print results
    """

    run_report(roll_report_config, instrument_code=instrument_code)
def interactive_roll_info(instrument_code: str = "ALL"):
    """

    Print information about whether futures contracts should be rolled

    :param instrument_code: The instrument code, for example 'AUD', 'CRUDE_W'. Specify ALL for everything
    :return: None, but print results
    """

    config = roll_report_config.new_config_with_modified_output("console")
    config.modify_kwargs(instrument_code=instrument_code)
    run_report(roll_report_config)
Пример #6
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)
Пример #7
0
def strategy_report(data):

    strategy_name = get_valid_strategy_name_from_user(data=data,
                                                      allow_all=True,
                                                      all_code=ALL_STRATEGIES)
    if strategy_name != ALL_STRATEGIES:
        timestamp = interactively_choose_timestamp(strategy_name=strategy_name,
                                                   data=data)
    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)
Пример #8
0
def email_roll_report():
    """

    Print information about whether futures contracts should be rolled

    :param instrument_code: The instrument code, for example 'AUD', 'CRUDE_W'. Specify ALL for everything
    :return: None, but print results
    """

    roll_report_config = report_config(
        title="Roll report",
        function="sysproduction.diagnostic.rolls.roll_info",
        output="email")

    run_report(roll_report_config, instrument_code="ALL")
Пример #9
0
    def email_trades_report(self):

        run_report(self.config, data=self.data)
Пример #10
0
def reconcile_report(data):
    report_config = email_or_print(reconcile_report_config)
    run_report(report_config, data = data)
Пример #11
0
def status_report(data):
    report_config = email_or_print(status_report_config)
    run_report(report_config, data = data)
Пример #12
0
def roll_report(data):
    instrument_code = get_valid_instrument_code_from_user(data, allow_all=True)
    report_config = email_or_print(roll_report_config)
    report_config.modify_kwargs(instrument_code = instrument_code)
    run_report(report_config, data = data)
def risk_report(data):
    report_config = email_or_print(risk_report_config)
    run_report(report_config, data=data)
def email_reconcile_report():

    config = reconcile_report_config.new_config_with_modified_output("email")
    run_report(config)
Пример #15
0
def email_trades_report():


    config = trade_report_config.new_config_with_modified_output("email")
    config.modify_kwargs(calendar_days_back = 1)
    run_report(config)