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
629ec9aa
Commit
629ec9aa
authored
Jan 27, 2021
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
5e5724c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+5
-2
jinjia2html_v2.py
app/utils/jinjia2html_v2.py
+1
-1
No files found.
app/service/portfolio_diagnose.py
View file @
629ec9aa
...
...
@@ -755,6 +755,8 @@ class PortfolioDiagnose(object):
self
.
new_correlation
=
self
.
new_correlation
.
fillna
(
1
)
.
round
(
2
)
self
.
new_correlation
.
columns
=
self
.
new_correlation
.
columns
.
map
(
lambda
x
:
get_fund_name
(
x
)
.
values
[
0
][
0
])
self
.
new_correlation
.
index
=
self
.
new_correlation
.
index
.
map
(
lambda
x
:
get_fund_name
(
x
)
.
values
[
0
][
0
])
self
.
proposal_fund
=
list
(
set
(
list
(
max_sharp_weights
.
keys
()))
-
(
set
(
list
(
max_sharp_weights
.
keys
()))
&
set
(
list
(
self
.
portfolio_dict
.
keys
()))))
end4
=
time
.
time
()
print
(
"模型计算一次时间:"
,
end4
-
start
)
...
...
@@ -996,8 +998,9 @@ class PortfolioDiagnose(object):
# 建议基金数据
index_return
,
propose_fund_return
=
self
.
return_compare
()
propose_fund_id_list
=
list
(
propose_fund_return
.
columns
)
propose_fund_id_list
.
remove
(
"return"
)
# propose_fund_id_list = list(propose_fund_return.columns)
propose_fund_id_list
=
list
(
self
.
proposal_fund
)
# propose_fund_id_list.remove("return")
with
TAMP_SQL
(
tamp_product_engine
)
as
tamp_product
:
tamp_product_session
=
tamp_product
.
session
sql_product
=
"select distinct `id`, `fund_short_name`, `nav_frequency`, `substrategy` from `fund_info`"
...
...
app/utils/jinjia2html_v2.py
View file @
629ec9aa
...
...
@@ -198,7 +198,7 @@ class DataIntegrate:
# res = executor.map(gen_radar_chart, propose_radar_chart_data)
res
=
[]
for
fund_id
in
portfolio_diagnose
.
propose_portfolio
.
columns
:
r
=
fund_index_compare
(
fund_id
)
r
=
fund_index_compare
(
fund_id
,
portfolio_diagnose
.
portfolio_dict
.
get
(
fund_id
,
2
)
)
res
.
append
(
r
)
for
i
in
range
(
len
(
propose_fund_evaluation
)):
propose_fund_data_list
.
append
({
...
...
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