Commit 16682aa7 authored by 吕先亚's avatar 吕先亚

update

parent c846a38e
......@@ -84,7 +84,11 @@ async def recommend():
funds = json.loads(sig['portfolio'])
rec_list = []
portfolios = {'recomm_guid': REC_GID}
last_year = dt.datetime(dt.date.today().year - 1, 12, 31)
# 二月更新数据
if dt.date.today().month < 2:
last_year = dt.datetime(dt.date.today().year - 2, 12, 31)
else:
last_year = dt.datetime(dt.date.today().year - 1, 12, 31)
load_report(max_date=last_year, min_date=last_year - relativedelta(years=10))
data = {'recomm_guid': REC_GID, 'data_date': sig['create_time'].strftime('%Y-%m-%d'),
'funds': [{'weight': round(weight * 100), 'fund_id': id_ticker_map[key]['ftTicker']} for key, weight in
......
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