Commit e8de612e authored by stephen.wang's avatar stephen.wang

Merge remote-tracking branch 'origin/dev-recommend' into dev-recommend

parents 1d38db45 c5a086a7
......@@ -29,7 +29,8 @@ class FundSelectionProcessReportor(RoboReportor):
def load_report(self, max_date=dt.today(), min_date=None) -> List[dict]:
day = prev_workday(filter_weekend(max_date))
funds = self._datum.get_datums(type=DatumType.FUND)
fund_ids = [fund['id'] for fund in funds]
funds_dict = {fund['id']: fund['chineseName'] for fund in funds}
fund_ids = list(funds_dict.keys())
pct_change = pd.DataFrame(self._optimize.get_pct_change(fund_ids, day))
pct_change.set_index('date', inplace=True)
pct_change = pct_change.truncate(before=(day - relativedelta(
......
......@@ -84,7 +84,7 @@ def load_report(max_date=None, min_date=None, combo: RoboReportor = None):
@app.get("/franklin/recommend")
async def recommend():
sig = get_last_signal()
sig = get_today_rec()
if sig:
if not fund_infos:
get_fund_infos()
......
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