Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
R
robo-dividend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenwen.tang
robo-dividend
Commits
9d788e07
Commit
9d788e07
authored
Oct 23, 2023
by
wenwen.tang
😕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配息记录若无则填充0
parent
b4c62e45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
holder.py
portfolios/holder.py
+1
-0
No files found.
portfolios/holder.py
View file @
9d788e07
...
...
@@ -204,6 +204,7 @@ class DividendPortfoliosHolder(PortfoliosHolder):
navs
=
navs
.
pivot_table
(
index
=
'nav_date'
,
columns
=
'fund_id'
,
values
=
'av'
)
navs
.
fillna
(
method
=
'ffill'
,
inplace
=
True
)
dividend
.
fillna
(
value
=
0
,
inplace
=
True
)
dividend
=
dividend
.
reindex
(
pd
.
date_range
(
start
=
dividend
.
index
.
min
(),
end
=
day
,
freq
=
'D'
),
fill_value
=
0
)
return
dict
(
navs
.
iloc
[
-
1
]),
dict
(
dividend
.
iloc
[
-
1
])
def
clear
(
self
,
day
=
None
,
risk
:
PortfoliosRisk
=
None
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment