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
06ecd2b6
Commit
06ecd2b6
authored
Dec 09, 2020
by
李宗熹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改异常
parent
2d9f3ed0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
179 additions
and
166 deletions
+179
-166
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+179
-166
No files found.
app/service/portfolio_diagnose.py
View file @
06ecd2b6
...
@@ -752,7 +752,7 @@ class PortfolioDiagnose(object):
...
@@ -752,7 +752,7 @@ class PortfolioDiagnose(object):
return
ret
return
ret
def
new_evaluation
(
self
,
group_name
,
group_result
,
data_adaptor
):
def
new_evaluation
(
self
,
group_name
,
group_result
,
data_adaptor
):
try
:
group_result_data
=
group_result
[
group_name
]
group_result_data
=
group_result
[
group_name
]
hold_info
=
group_result_data
[
"group_hoding_info"
]
hold_info
=
group_result_data
[
"group_hoding_info"
]
hold_info_df
=
pd
.
DataFrame
(
hold_info
)
hold_info_df
=
pd
.
DataFrame
(
hold_info
)
...
@@ -908,6 +908,9 @@ class PortfolioDiagnose(object):
...
@@ -908,6 +908,9 @@ class PortfolioDiagnose(object):
whole_sentence
=
","
.
join
(
sentence
)
.
lstrip
(
","
)
+
"。"
whole_sentence
=
","
.
join
(
sentence
)
.
lstrip
(
","
)
+
"。"
return
suggestions_result
,
suggestions_result_asset
,
return_compare_result
,
indicator_compare
,
whole_sentence
return
suggestions_result
,
suggestions_result_asset
,
return_compare_result
,
indicator_compare
,
whole_sentence
except
Exception
as
e
:
repr
(
e
)
return
None
def
single_evaluation
(
self
,
fund_id
):
def
single_evaluation
(
self
,
fund_id
):
"""
"""
...
@@ -1041,6 +1044,7 @@ class PortfolioDiagnose(object):
...
@@ -1041,6 +1044,7 @@ class PortfolioDiagnose(object):
return
evaluation_dict
return
evaluation_dict
def
old_portfolio_evaluation
(
self
,
):
def
old_portfolio_evaluation
(
self
,
):
try
:
result
=
[]
result
=
[]
for
fund
in
self
.
portfolio
:
for
fund
in
self
.
portfolio
:
try
:
try
:
...
@@ -1048,12 +1052,21 @@ class PortfolioDiagnose(object):
...
@@ -1048,12 +1052,21 @@ class PortfolioDiagnose(object):
except
IndexError
:
except
IndexError
:
continue
continue
return
result
return
result
except
Exception
as
e
:
repr
(
e
)
return
None
def
propose_fund_evaluation
(
self
,
):
def
propose_fund_evaluation
(
self
,
):
try
:
result
=
[]
result
=
[]
for
fund
in
self
.
proposal_fund
:
for
fund
in
self
.
proposal_fund
:
result
.
append
(
self
.
single_evaluation
(
fund
))
result
.
append
(
self
.
single_evaluation
(
fund
))
return
result
return
result
except
Exception
as
e
:
repr
(
e
)
return
None
def
single_fund_radar
(
self
):
def
single_fund_radar
(
self
):
radar_data
=
[]
radar_data
=
[]
...
...
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