Commit 5c95206a authored by 吕先亚's avatar 吕先亚

update

parent 49454519
......@@ -69,8 +69,8 @@ def load_report(max_date=prev_workday(dt.date.today()), min_date=None, combo: Ro
datas.set_index('date', inplace=True)
datas = datas['acc_av']
returns = round(datas.pct_change(), 5)
roi = round(annual_return(returns), 1) * 100
risk = round(annual_volatility(returns), 1) * 100
roi = round(annual_return(returns) * 100, 1)
risk = round(annual_volatility(returns) * 100, 1)
cp = roi / risk
return cp, roi, risk
......@@ -132,4 +132,4 @@ async def startup_event():
if __name__ == "__main__":
uvicorn.run("robo_controller:app", host="0.0.0.0", port=get_config('web.port'))
\ No newline at end of file
uvicorn.run("robo_controller:app", host="0.0.0.0", port=get_config('web.port'))
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