1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-19 10:24:35 +08:00

Add more friendly index range by timing

This commit is contained in:
Young
2021-07-13 14:46:53 +00:00
parent 4c4b30ebec
commit 9b38e62f21
5 changed files with 189 additions and 32 deletions

View File

@@ -372,7 +372,7 @@ class Indicator:
raise NotImplementedError(f"This type of input is not supported")
# if there is no stock data during the time period
if(price_s is None):
if price_s is None:
return None, None
# NOTE: there are some zeros in the trading price. These cases are known meaningless
@@ -456,7 +456,7 @@ class Indicator:
trade_exchange=trade_exchange,
pa_config=pa_config,
)
if((bp_tmp is not None) and (bv_tmp is not None)):
if (bp_tmp is not None) and (bv_tmp is not None):
bp_new[inst], bv_new[inst] = bp_tmp, bv_tmp
else:
bp_new[inst], bv_new[inst] = pr, v