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
93c8ce6f
Commit
93c8ce6f
authored
Jan 22, 2021
by
pengxiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/manage' into manage
parents
d208cfdb
78b2c84d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+2
-1
jinjia2html_v2.py
app/utils/jinjia2html_v2.py
+6
-3
No files found.
app/service/portfolio_diagnose.py
View file @
93c8ce6f
...
...
@@ -757,7 +757,7 @@ class PortfolioDiagnose(object):
self
.
new_correlation
.
index
=
self
.
new_correlation
.
index
.
map
(
lambda
x
:
get_fund_name
(
x
)
.
values
[
0
][
0
])
end4
=
time
.
time
()
print
(
"模型计算一次时间:"
,
end4
-
end3
)
print
(
"模型计算一次时间:"
,
end4
-
start
)
# S = np.asmatrix(S)
# w_origin = np.asarray([i for i in w_origin.values()])
# risk_target = np.asarray([1 / len(w_origin)] * len(w_origin))
...
...
@@ -1324,6 +1324,7 @@ class PortfolioDiagnose(object):
return
result
except
Exception
as
e
:
repr
(
e
)
raise
e
return
None
def
single_fund_radar
(
self
):
...
...
app/utils/jinjia2html_v2.py
View file @
93c8ce6f
...
...
@@ -193,9 +193,12 @@ class DataIntegrate:
propose_fund_data_list
=
[]
propose_fund_evaluation
=
portfolio_diagnose
.
propose_fund_evaluation
()
propose_radar_chart_data
=
portfolio_diagnose
.
propose_fund_radar
()
with
futures
.
ProcessPoolExecutor
(
os
.
cpu_count
())
as
executor
:
res
=
executor
.
map
(
gen_radar_chart
,
propose_radar_chart_data
)
res
=
list
(
res
)
# with futures.ProcessPoolExecutor(os.cpu_count()) as executor:
# res = executor.map(gen_radar_chart, propose_radar_chart_data)
res
=
[]
for
chart_data
in
propose_radar_chart_data
:
r
=
draw_index_combination_chart
(
chart_data
)
res
.
append
(
r
)
for
i
in
range
(
len
(
propose_fund_evaluation
)):
propose_fund_data_list
.
append
({
'fund_name'
:
propose_fund_evaluation
[
i
][
'name'
],
...
...
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