Commit b4c62e45 authored by wenwen.tang's avatar wenwen.tang 😕

配息记录若无则填充0

parent 4594dd01
......@@ -203,7 +203,7 @@ class DividendPortfoliosHolder(PortfoliosHolder):
dividend = navs.pivot_table(index='nav_date', columns='fund_id', values='dividend')
navs = navs.pivot_table(index='nav_date', columns='fund_id', values='av')
navs.fillna(method='ffill', inplace=True)
dividend.fillna(method='ffill', inplace=True)
dividend.fillna(value=0, inplace=True)
return dict(navs.iloc[-1]), dict(dividend.iloc[-1])
def clear(self, day=None, risk: PortfoliosRisk = None):
......
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