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
b884adf3
Commit
b884adf3
authored
Nov 02, 2023
by
wenwen.tang
😕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回测nav的计算用复权净值
parent
64080a96
Show 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 @
b884adf3
...
...
@@ -279,9 +279,10 @@ class InvTrustPortfoliosHolder(DividendPortfoliosHolder):
funds
=
self
.
_datum
.
get_datums
(
type
=
DatumType
.
FUND
)
funds_subscription_rate
=
{
fund
[
'id'
]:
fund
.
get
(
'subscriptionRate'
,
0
)
for
fund
in
funds
}
share
=
{
x
:
(
1
-
funds_subscription_rate
[
x
])
*
(
fund_av
*
w
)
/
navs
[
x
]
for
x
,
w
in
weight
.
items
()}
nav_cals
=
fund_div_tuple
[
2
]
share_nav
=
share
# 不考虑配息
share_nodiv_nav
=
share
share_nodiv_nav
=
{
x
:
(
1
-
funds_subscription_rate
[
x
])
*
(
fund_av
*
w
)
/
nav_cals
[
x
]
for
x
,
w
in
weight
.
items
()}
# 初始买入扣手续费
fee
=
sum
(
funds_subscription_rate
[
x
]
*
(
fund_av
*
w
)
for
x
,
w
in
weight
.
items
())
fund_av
=
fund_av
-
fee
...
...
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