Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
4c1ceda0
Commit
4c1ceda0
authored
Feb 25, 2021
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suggest
parent
245cf95b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+5
-5
No files found.
app/service/portfolio_diagnose.py
View file @
4c1ceda0
...
...
@@ -1125,7 +1125,7 @@ class PortfolioDiagnose(object):
propose_fund_asset
=
[
round
(
self
.
new_weights
[
i
]
*
total_asset
,
2
)
for
i
in
range
(
len
(
propose_fund_id_name_list
))]
propose_info
=
{
propose_fund_id_
strategy_name_
list
[
i
]:
propose_info
=
{
propose_fund_id_list
[
i
]:
{
"fund_name"
:
propose_fund_id_name_list
[
i
],
"substrategy"
:
propose_fund_id_strategy_name_list
[
i
],
"asset"
:
propose_fund_asset
[
i
],
...
...
@@ -1155,19 +1155,19 @@ class PortfolioDiagnose(object):
for
key
,
value
in
propose_info
.
items
():
if
value
[
"fund_name"
]
not
in
old_hold_fund_name_list
:
suggestions
=
{}
if
key
not
in
suggestions_result
.
keys
():
suggestions_result
[
key
]
=
{}
if
value
[
"substrategy"
]
not
in
suggestions_result
.
keys
():
suggestions_result
[
value
[
"substrategy"
]
]
=
{}
suggestions
[
"fund_strategy_name"
]
=
value
[
"substrategy"
]
suggestions
[
"fund_name"
]
=
value
[
"fund_name"
]
suggestions
[
"before_optimization"
]
=
0
suggestions
[
"after_optimization"
]
=
value
[
"asset"
]
suggestions
[
"fund_id"
]
=
value
[
"fund_id"
]
suggestions
[
"fund_type"
]
=
value
[
"fund_type"
]
suggestions_result
[
key
][
suggestions
[
"fund_name"
]]
=
suggestions
suggestions_result
[
value
[
"substrategy"
]
][
suggestions
[
"fund_name"
]]
=
suggestions
else
:
if
default
>
0
:
continue
suggestions_result
[
key
][
value
[
"fund_name"
]][
"after_optimization"
]
=
value
[
"asset"
]
suggestions_result
[
value
[
"substrategy"
]
][
value
[
"fund_name"
]][
"after_optimization"
]
=
value
[
"asset"
]
for
key
,
value
in
suggestions_result
.
items
():
suggestions_result
[
key
]
=
list
(
value
.
values
())
...
...
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