2fe76817c66940c4ce2a8eb08eebec1108512527,QUANTAXIS/QAUtil/QADate_trade.py,,QA_util_get_next_trade_date,#Any#Any#,7680

Before Change


    cursor_date = QA_util_format_date2str(cursor_date)
    if cursor_date in trade_date_sse:
        // 如果指定日期为交易日
        return QA_util_date_gap(cursor_date, n, "gt")
    real_pre_trade_date = QA_util_get_real_date(cursor_date)
    return QA_util_date_gap(real_pre_trade_date, n, "gt")

After Change


    if not cursor_date:
        cursor_date = datetime.date.today().strftime("%Y-%m-%d")
    else:
        cursor_date = pd.Timestamp(cursor_date).strftime("%Y-%m-%d")
    if cursor_date in trade_date_sse:
        // 如果指定日期为交易日
        return trade_date_sse[trade_date_sse.index(cursor_date) + 1]
    real_trade_date = QA_util_get_real_date(cursor_date, towards=-1)
    return trade_date_sse[trade_date_sse.index(real_trade_date) + 1]

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 2fe76817c66940c4ce2a8eb08eebec1108512527
Time: 2020-12-26
Author: nehcuh@szu.edu.cn
File Name: QUANTAXIS/QAUtil/QADate_trade.py
Class Name:
Method Name: QA_util_get_next_trade_date


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 7cbf66006434c859e4ba7f0d4de816fce1532d72
Time: 2018-06-01
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAData/base_datastruct.py
Class Name: _quotation_base
Method Name: get_bar


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 2fe76817c66940c4ce2a8eb08eebec1108512527
Time: 2020-12-26
Author: nehcuh@szu.edu.cn
File Name: QUANTAXIS/QAUtil/QADate_trade.py
Class Name:
Method Name: QA_util_get_pre_trade_date