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]