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
e799e713
Commit
e799e713
authored
Dec 02, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
105ee636
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
240 additions
and
7 deletions
+240
-7
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+3
-0
draw.py
app/utils/draw.py
+7
-7
tamp_course_order.log
logs/tamp_course_order.log
+230
-0
No files found.
app/service/portfolio_diagnose.py
View file @
e799e713
...
...
@@ -622,5 +622,8 @@ portfolio_diagnose = PortfolioDiagnose(client_type=1, portfolio=portfolio, inves
portfolio_diagnose
.
optimize
()
if
__name__
==
'__main__'
:
# 相关性
print
(
portfolio_diagnose
.
old_correlation
)
# 个基点评
# print(portfolio_diagnose.single_fund_radar())
# print(portfolio_diagnose.propose_fund_evaluation())
app/utils/draw.py
View file @
e799e713
...
...
@@ -105,7 +105,7 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
fontsize
=
22
# 初始化
fig
=
plt
.
figure
(
figsize
=
figsize
)
ax1
=
fig
.
add_subplot
(
111
)
ax1
=
fig
.
add_subplot
()
ax2
=
ax1
.
twiny
()
max_x_count
=
max
([
x
[
'data'
]
.
size
for
x
in
product_list
])
loc
=
np
.
arange
(
max_x_count
)
# the x locations for the groups
...
...
@@ -145,12 +145,12 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
ax2
.
plot
(
loc
,
cumulative
[
'data'
],
color
=
'#C6A774'
,
marker
=
''
,
linewidth
=
3
,
label
=
cumulative
[
'name'
])
ax2
.
legend
(
loc
=
'upper left'
,
fontsize
=
fontsize
)
#
plt.show()
imgdata
=
BytesIO
()
fig
.
savefig
(
imgdata
,
format
=
'png'
)
imgdata
.
seek
(
0
)
# rewind the data
month_return_img
=
'data:image/png;base64,'
+
base64
.
b64encode
(
imgdata
.
getvalue
())
.
decode
(
'utf-8'
)
return
month_return_img
plt
.
show
()
#
imgdata = BytesIO()
#
fig.savefig(imgdata, format='png')
#
imgdata.seek(0) # rewind the data
#
month_return_img = 'data:image/png;base64,' + base64.b64encode(imgdata.getvalue()).decode('utf-8')
#
return month_return_img
def
draw_comment_chart
(
xlabels
,
source_prod
,
target_prod
):
...
...
logs/tamp_course_order.log
View file @
e799e713
This diff is collapsed.
Click to expand it.
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