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
bdb494df
Commit
bdb494df
authored
Dec 03, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
持仓组合点评
parent
29d64420
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+6
-6
jinjia2html.py
jinjia2html.py
+2
-2
No files found.
app/service/portfolio_diagnose.py
View file @
bdb494df
...
...
@@ -573,14 +573,14 @@ class PortfolioDiagnose(object):
z_score_evaluate
=
evaluate_enum
[
0
][
z_score_level
]
drawdown_evaluate
=
evaluate_enum
[
1
][
drawdown_level
]
if
z_score_evaluate
in
[
"优秀"
,
"良好"
]:
z_score_evaluate
=
"""<span class="
self_description
_red">{}</span>"""
.
format
(
z_score_evaluate
)
z_score_evaluate
=
"""<span class="
comment_tag
_red">{}</span>"""
.
format
(
z_score_evaluate
)
else
:
z_score_evaluate
=
"""<span class="
self_description
_green">{}</span>"""
.
format
(
z_score_evaluate
)
z_score_evaluate
=
"""<span class="
comment_tag
_green">{}</span>"""
.
format
(
z_score_evaluate
)
if
drawdown_evaluate
in
[
"优秀"
,
"良好"
]:
drawdown_evaluate
=
"""<span class="
self_description
_red">{}</span>"""
.
format
(
drawdown_evaluate
)
drawdown_evaluate
=
"""<span class="
comment_tag
_red">{}</span>"""
.
format
(
drawdown_evaluate
)
else
:
drawdown_evaluate
=
"""<span class="
self_description
_green">{}</span>"""
.
format
(
drawdown_evaluate
)
drawdown_evaluate
=
"""<span class="
comment_tag
_green">{}</span>"""
.
format
(
drawdown_evaluate
)
sentence
=
{
1
:
"1、组合构建于{}年{}月,至今已运行{}个月。投入成本为{}万元,截止{}年{}月{}日,整体盈利{}万元,整体表现{},回撤控制能力{};
\n
"
,
...
...
@@ -746,10 +746,10 @@ portfolio = ['HF00002JJ2', 'HF00005DBQ', 'HF0000681Q', 'HF00006693', 'HF00006AZF
portfolio_diagnose
=
PortfolioDiagnose
(
client_type
=
1
,
portfolio
=
portfolio
,
invest_amount
=
10000000
)
portfolio_diagnose
.
optimize
()
if
__name__
==
'__main__'
:
print
(
portfolio_diagnose
.
single_fund_radar
())
#
print(portfolio_diagnose.single_fund_radar())
# print(portfolio_diagnose.propose_fund_radar())
# print(portfolio_diagnose.old_portfolio_evaluation())
# print('旧组合相关性:', portfolio_diagnose.old_correlation)
# print('新组合相关性:', portfolio_diagnose.new_correlation)
# print('旧组合个基评价:', portfolio_diagnose.old_portfolio_evaluation())
#
print('新组合个基评价:', portfolio_diagnose.propose_fund_evaluation())
print
(
'新组合个基评价:'
,
portfolio_diagnose
.
propose_fund_evaluation
())
jinjia2html.py
View file @
bdb494df
...
...
@@ -34,9 +34,9 @@ monthly_return_performance_pic = draw_month_return_chart(xlabels, product_list,
# 组合数据
group_result
=
d
[
"default"
]
print
(
group_result
)
# 持仓组合点评
old_evaluation
=
portfolio_diagnose
.
old_evaluation
(
'default'
,
group_result
,
user_customer
)
old_evaluation
=
portfolio_diagnose
.
old_evaluation
(
'default'
,
d
,
user_customer
)
# 贡献分解
g_data
=
group_result
[
"contribution_decomposition"
]
...
...
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