Commit 3168831f authored by 吕先亚's avatar 吕先亚

bugfix 回报日期不含当天

parent b4974223
......@@ -69,7 +69,7 @@ def judgement(id, type, predict):
elif type == 'FUND':
navs = get_fund_list(fund_ids=id, min_date=start, limit=predict_term + 1)
navs = [nav['rfn_nav_cal'] for nav in navs]
if len(navs) == predict_term:
if len(navs) == predict_term + 1:
upper = True if navs[-1] >= navs[0] else False
result = {}
for k, v, in predict.items():
......
......@@ -107,7 +107,7 @@ def is_right(id, type, start, predict):
elif type == 'FUND':
navs = get_fund_list(fund_ids=id, min_date=start, limit=predict_term + 1)
navs = [nav['rfn_nav_cal'] for nav in navs]
if len(navs) == predict_term:
if len(navs) == predict_term + 1:
rtn = navs[-1] / navs[0] - 1
real = map_to_label(rtn)
result = True if predict == real or (rtn < 0 and predict < 0) or (rtn > 0 and predict > 0) else False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment