Commit 4da54d37 authored by stephen.wang's avatar stephen.wang

bugfix,計算投組比例時,用當前份額和比例

parent 387e28cf
......@@ -347,7 +347,8 @@ class InvTrustPortfoliosHolder(DividendPortfoliosHolder):
nav = round(sum([nav_cals[x] * y for x, y in share_nodiv_nav.items()]), 4)
fund_nav = round(sum([navs[x] * y for x, y in share_nav.items()]), 4)
weight = {x: round(y * navs[x] / fund_av, 2) for x, y in share.items()}
weight_nodiv_nav = {x: round(y * nav_cals[x] / nav, 2) for x, y in share_nav.items()}
nodiv_nav = round(sum([nav_cals[x] * y for x, y in share_nav.items()]), 4)
weight_nodiv_nav = {x: round(y * nav_cals[x] / nodiv_nav, 2) for x, y in share_nav.items()}
weight_nav = {x: round(y * navs[x] / fund_av, 2) for x, y in share_nav.items()}
weight = format_weight(weight)
weight_nav = format_weight(weight_nav)
......
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