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

update exchange

This commit is contained in:
wangwenxi.handsome
2021-08-15 12:45:29 +00:00
committed by you-n-g
parent 2da6a8c770
commit f67b99a30e
4 changed files with 150 additions and 13 deletions

View File

@@ -389,6 +389,9 @@ class Indicator:
if price_s is None:
return None, None
if isinstance(price_s, (int, float)):
price_s = pd.Series(price_s, index=[trade_start_time])
# NOTE: there are some zeros in the trading price. These cases are known meaningless
# for aligning the previous logic, remove it.
price_s = price_s[~(price_s < 1e-08)] # remove zero and negative values.