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
4da54d37
Commit
4da54d37
authored
Oct 22, 2024
by
stephen.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix,計算投組比例時,用當前份額和比例
parent
387e28cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
holder.py
portfolios/holder.py
+2
-1
No files found.
portfolios/holder.py
View file @
4da54d37
...
...
@@ -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
)
...
...
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