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
ba4371dc
Commit
ba4371dc
authored
Dec 04, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新模版2
parent
47199025
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
300 additions
and
955 deletions
+300
-955
fund_report.iml
.idea/fund_report.iml
+1
-1
misc.xml
.idea/misc.xml
+1
-1
cover-back.png
app/html/v2/img/cover-back.png
+0
-0
logo.png
app/html/v2/img/logo.png
+0
-0
scene.png
app/html/v2/img/scene.png
+0
-0
team.png
app/html/v2/img/team.png
+0
-0
monthReport.html
app/templates/monthReport.html
+1
-87
monthReportV2.html
app/templates/v2/monthReportV2.html
+216
-843
draw.py
app/utils/draw.py
+42
-7
html_to_pdf.py
app/utils/html_to_pdf.py
+6
-6
jinjia2html.py
app/utils/jinjia2html.py
+33
-10
No files found.
.idea/fund_report.iml
View file @
ba4371dc
...
...
@@ -2,7 +2,7 @@
<module
type=
"PYTHON_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.
8
"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.
7
"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
<component
name=
"TestRunnerService"
>
...
...
.idea/misc.xml
View file @
ba4371dc
...
...
@@ -3,5 +3,5 @@
<component
name=
"JavaScriptSettings"
>
<option
name=
"languageLevel"
value=
"ES6"
/>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.
8
"
project-jdk-type=
"Python SDK"
/>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.
7
"
project-jdk-type=
"Python SDK"
/>
</project>
\ No newline at end of file
app/html/v2/img/cover-back.png
0 → 100644
View file @
ba4371dc
257 KB
app/html/v2/img/logo.png
0 → 100644
View file @
ba4371dc
6.92 KB
app/html/v2/img/scene.png
0 → 100644
View file @
ba4371dc
285 KB
app/html/v2/img/team.png
0 → 100644
View file @
ba4371dc
109 KB
app/templates/monthReport.html
View file @
ba4371dc
...
...
@@ -2561,8 +2561,6 @@
<th>
优化前(万元)
</th>
<th>
优化后(万元)
</th>
</tr>
<!-- <dl>-->
{% for key, value in suggestions_result.items() %}
{% for i in range(value|length) %}
<tr>
...
...
@@ -2574,9 +2572,7 @@
<td
class=
"font_green"
>
{{value[i]["after_optimization"]}}
</td>
</tr>
{% endfor %}
{% endfor %}
{% endfor %}
<tr>
<td
colspan=
"2"
class=
"back_gray font_bold"
>
总市值(万元)
</td>
<td
class=
"font_bold"
>
{{suggestions_result_asset["before"]}}
</td>
...
...
@@ -2816,88 +2812,6 @@
</div>
</div>
<!-- 新组合对比 -->
<div
class=
"mr_block6-1 have_sub_tb"
>
<!--标题-->
<div
class=
"head_wrap clearfix"
>
<div
class=
"head_title fl"
>
新组合对比
</div>
<div
class=
"head_logo_wrap fr"
>
<img
src=
"./img/logo-blue.png"
alt=
""
>
<span
class=
"com_brand_line"
></span>
<span
class=
"com_brand_name"
>
飞度工作室
</span>
</div>
</div>
<div
class=
"new_compare_content"
>
<div
class=
"profit_chart margin0"
>
<div
class=
"profit_chart_item"
style=
"width: 100%;"
>
<div
class=
"profit_chart_title"
>
【收益比较】
</div>
<div
class=
"profit_chart_graphic"
>
<img
src=
"./img/logo-blue.png"
alt=
""
class=
"profit_chart_img"
>
</div>
</div>
</div>
<div
class=
"aim_table"
>
<div
class=
"aim_head clearfix"
>
<div
class=
"aim_title fl"
>
【指标对比】
</div>
<div
class=
"aim_time fr"
>
截止日:最新净值日(2020-11-05)
</div>
</div>
<table
border=
"1"
>
<tr>
<th>
类型
</th>
<th>
区间收益(%)
</th>
<th>
年化收益(%)
</th>
<th>
波动率(%)
</th>
<th>
最大回撤(%)
</th>
<th>
夏普比率
</th>
</tr>
<tr
class=
"back_yellow1"
>
<td>
建议优化组合
</td>
<td>
5.75
</td>
<td>
0.40
</td>
<td>
2.29
</td>
<td>
2.15
</td>
<td>
3.05
</td>
</tr>
<tr
class=
"back_yellow2"
>
<td>
建议优化组合
</td>
<td>
5.75
</td>
<td>
0.40
</td>
<td>
2.29
</td>
<td>
2.15
</td>
<td>
3.05
</td>
</tr>
<tr>
<td>
现有持仓组合
</td>
<td>
5.75
</td>
<td>
0.40
</td>
<td>
2.29
</td>
<td>
2.15
</td>
<td>
3.05
</td>
</tr>
</table>
<div
class=
"aim_foot"
>
注:以上指标自持仓首日开始计算,结果仅供参考,如果持仓时间过短会造成指标失真的情况。
</div>
</div>
</div>
</div>
<!-- 尾部 -->
<div
class=
"mr_block_end have_sub_tb"
>
<!--标题-->
...
...
app/templates/v2/monthReportV2.html
View file @
ba4371dc
...
...
@@ -1064,7 +1064,7 @@
组合月度及累计回报率曲线
</div>
<div
class=
"tss2_content"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"tss2_img"
>
<img
src=
{{monthly_return_performance_pic}}
alt=
""
class=
"tss2_img"
>
</div>
</div>
...
...
@@ -1327,7 +1327,7 @@
收益比较
</div>
<div
class=
"par_content"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"par_img"
>
<img
src=
{{old_return_compare_pic}}
alt=
""
class=
"par_img"
>
</div>
</div>
<div
class=
"par_item fr"
>
...
...
@@ -1337,129 +1337,72 @@
<div
class=
"par_content relative_chart"
>
<div
class=
"rc_chart clearfix"
>
<div
class=
"rcc_left fl"
>
<table
border=
"1"
style=
"border-color: transparent;margin-right: 20px;"
>
<tr>
<td>
<span
class=
"rcc_index"
>
1
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
2
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
3
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
4
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
5
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
6
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
7
</span>
</td>
</tr>
</table>
<table
border=
"1"
style=
"border-color: transparent;margin-right: 20px;"
>
{% for correlation in old_correlation %}
<tr>
<td>
<span
class=
"rcc_index"
>
{{correlation[0]}}
</span>
</td>
</tr>
{% endfor %}
</table>
</div>
<div
class=
"rcc_right fr"
>
<table
border=
"1"
>
<tr>
<td>
<span
class=
"rcc_index"
>
1
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
<td
class=
"level_color4"
>
0.56
</td>
<td
class=
"level_color5"
>
0.56
</td>
<td
class=
"level_color6"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
2
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
<td
class=
"level_color4"
>
0.56
</td>
<td
class=
"level_color5"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
3
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
<td
class=
"level_color4"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
4
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
5
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
6
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
7
</span>
</td>
</tr>
</table>
<table
border=
"1"
>
{% for correlation in old_correlation %}
<tr>
{% for i in range(correlation[2]|length) %}
{% if i == correlation[0] - 1 %}
<td>
<span
class=
"rcc_index"
>
{{correlation[0]}}
</span>
</td>
{% elif -1
<
=
correlation
[
2
][
i
]
<
-0
.
5
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif -1
<
=
correlation
[
2
][
i
]
<
-0
.
5
%}
<
td
class=
"level_color6"
>
{{correlation[2][i]}}
</td>
{% elif -0.5
<
=
correlation
[
2
][
i
]
<
-0
.
25
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif -0.5
<
=
correlation
[
2
][
i
]
<
-0
.
25
%}
<
td
class=
"level_color5"
>
{{correlation[2][i]}}
</td>
{% elif -0.25
<
=
correlation
[
2
][
i
]
<
0
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif -0.25
<
=
correlation
[
2
][
i
]
<
0
%}
<
td
class=
"level_color4"
>
{{correlation[2][i]}}
</td>
{% elif 0
<
=
correlation
[
2
][
i
]
<
0
.
25
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif 0
<
=
correlation
[
2
][
i
]
<
0
.
25
%}
<
td
class=
"level_color3"
>
{{correlation[2][i]}}
</td>
{% elif 0.25
<
=
correlation
[
2
][
i
]
<
0
.
5
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif 0.25
<
=
correlation
[
2
][
i
]
<
0
.
5
%}
<
td
class=
"level_color2"
>
{{correlation[2][i]}}
</td>
{% elif 0.5
<
=
correlation
[
2
][
i
]
<=
1
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif 0.5
<
=
correlation
[
2
][
i
]
<=
1
%}
<
td
class=
"level_color1"
>
{{correlation[2][i]}}
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
<div
class=
"rc_tooltip"
>
<div
class=
"rct_color clearfix"
>
<div
class=
"rct_color_item fl level_color1"
></div>
...
...
@@ -1482,62 +1425,16 @@
</div>
</div>
<div
class=
"rc_label clearfix"
>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
1
</div>
<div
class=
"rcl_item_name"
>
基金名称1
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
2
</div>
<div
class=
"rcl_item_name"
>
基金名称2
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
3
</div>
<div
class=
"rcl_item_name"
>
基金名称3
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
4
</div>
<div
class=
"rcl_item_name"
>
基金名称4
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
5
</div>
<div
class=
"rcl_item_name"
>
基金名称5
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
6
</div>
<div
class=
"rcl_item_name"
>
基金名称6
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
7
</div>
<div
class=
"rcl_item_name"
>
基金名称7
{% for correlation in old_correlation %}
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
{{correlation[0]}}
</div>
<div
class=
"rcl_item_name"
>
{{correlation[1]}}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
...
...
@@ -1731,20 +1628,22 @@
<th>
今年以来
</th>
<th>
成立以来
</th>
</tr>
<tr>
<td>
1.半夏宏观对冲
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
<td>
5.75
</td>
</tr>
{% for nav_info in group_nav_info %}
<tr>
<td>
{{nav_info['fund_name']}}
</td>
<td>
{{nav_info['confirm_nav']}}
</td>
<td>
{{nav_info['cur_nav']}}
</td>
<td>
{{nav_info['cur_cnav']}}
</td>
<td>
{{nav_info['ret_1w']}}
</td>
<td>
{{nav_info['ret_after_confirm']}}
</td>
<td>
{{nav_info['ret_cum_1m']}}
</td>
<td>
{{nav_info['ret_cum_6m']}}
</td>
<td>
{{nav_info['ret_cum_1y']}}
</td>
<td>
{{nav_info['ret_cum_ytd']}}
</td>
<td>
{{nav_info['ret_cum_incep']}}
</td>
<td>
{{nav_info['distribution']}}
</td>
</tr>
{% endfor %}
</table>
</div>
...
...
@@ -1754,7 +1653,7 @@
贡献分解
</div>
<div
class=
"tss2_content"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"tss2_img"
>
<img
src=
{{contribution_decomposition}}
alt=
""
class=
"tss2_img"
>
</div>
</div>
...
...
@@ -1786,8 +1685,8 @@
</div>
<div
class=
"box5_content"
>
<div
class=
"geji_list_wrap"
>
{% for single_fund in propose_fund_data_list %}
<div
class=
"self_item"
>
<table>
<tr>
...
...
@@ -1795,226 +1694,36 @@
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
远澜银杏 1 号
{{single_fund.fund_name}}
</div>
<div
class=
"self_type fl"
>
保留
</div>
</div>
<div
class=
"self_description"
>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
1、该基金整体表现
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
风险收益比例
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
2、在收益方面,该基金年化收益能力
<span
class=
"self_description_red"
>
高于
</span>
/
<span
class=
"self_description_green"
>
持平
</span>
/
<span
class=
"self_description_green"
>
低于
</span>
,
同类基金平均水平,有x%区间跑赢大盘/指数,绝对收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
3、在风险方面,该基金抵御风险能力优秀,在同类基金中处于中等水平,最大回撤为x%,低于同类基金平均水平;
</div>
</div>
</div>
</div>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"self_img"
>
</div>
</td>
</tr>
</table>
</div>
<div
class=
"self_item"
>
<table>
<tr>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
远澜银杏 1 号
</div>
<div
class=
"self_type fl red"
>
增仓
{{single_fund.status}}
</div>
</div>
<div
class=
"self_description"
>
{% for one in single_fund.evaluation %}
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
1、该基金整体表现
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
风险收益比例
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
2、在收益方面,该基金年化收益能力
<span
class=
"self_description_red"
>
高于
</span>
/
<span
class=
"self_description_green"
>
持平
</span>
/
<span
class=
"self_description_green"
>
低于
</span>
,
同类基金平均水平,有x%区间跑赢大盘/指数,绝对收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
3、在风险方面,该基金抵御风险能力优秀,在同类基金中处于中等水平,最大回撤为x%,低于同类基金平均水平;
{{one}}
</div>
</div>
{% endfor %}
</div>
</div>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"self_img"
>
</div>
</td>
</tr>
</table>
</div>
<div
class=
"self_item"
>
<table>
<tr>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
远澜银杏 1 号
</div>
<div
class=
"self_type fl green"
>
减仓
</div>
</div>
<div
class=
"self_description"
>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
1、该基金整体表现
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
风险收益比例
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
2、在收益方面,该基金年化收益能力
<span
class=
"self_description_red"
>
高于
</span>
/
<span
class=
"self_description_green"
>
持平
</span>
/
<span
class=
"self_description_green"
>
低于
</span>
,
同类基金平均水平,有x%区间跑赢大盘/指数,绝对收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
3、在风险方面,该基金抵御风险能力优秀,在同类基金中处于中等水平,最大回撤为x%,低于同类基金平均水平;
</div>
</div>
</div>
</div>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"self_img"
>
<img
src=
{{single_fund.radar_chart_path}}
alt=
""
class=
"self_img"
>
</div>
</td>
</tr>
</table>
</div>
{% endfor %}
</div>
<!-- 持仓点评 -->
<div
class=
"target_comment"
>
<div
class=
"comment_title"
>
...
...
@@ -2022,35 +1731,14 @@
<div
class=
"comment_tri"
></div>
</div>
<div
class=
"comment_content"
>
<div
class=
"comment_item"
>
<div
class=
"comment_dot"
></div>
<div
class=
"comment_text"
>
1、组合构建于XXXX年XX月,至今已运行XX个月。投入成本为XXXX万元,截止XXXX年XX月XX日,整体盈利XX万元,整体表现
<span
class=
"comment_tag_red"
>
优秀
</span>
/
<span
class=
"comment_tag_red"
>
良好
</span>
/
<span
class=
"comment_tag_green"
>
一般
</span>
/
<span
class=
"comment_tag_green"
>
合格
</span>
/
<span
class=
"comment_tag_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"comment_tag_red"
>
优秀
</span>
/
<span
class=
"comment_tag_red"
>
良好
</span>
/
<span
class=
"comment_tag_green"
>
一般
</span>
/
<span
class=
"comment_tag_green"
>
合格
</span>
/
<span
class=
"comment_tag_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"comment_item"
>
<div
class=
"comment_dot"
></div>
<div
class=
"comment_text"
>
2、组合共持有7只基金,XX和XX两只产品收益稳健,对组合的收益率贡献明显,6只基金取得正收益【根据情况变化】,2只基金综合得分较低建议更换,1只基金因为成立时间较短,暂不做评价;
</div>
</div>
<div
class=
"comment_item"
>
<div
class=
"comment_dot"
></div>
<div
class=
"comment_text"
>
3、策略角度来看,组合涵盖了管理期货及全市场套利策略【说明:二级分类】,以管理期货【说明:二级分类】为主,策略上有一定分散【根据情况变化】,从组合的相关性矩阵来看,XX和XX相关性较高,建议调整组合配比;
{% for eval in old_evaluation %}
<div
class=
"comment_item"
>
<div
class=
"comment_dot"
></div>
<div
class=
"comment_text"
>
{{eval}}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
...
...
@@ -2097,21 +1785,22 @@
<th>
优化前(万元)
</th>
<th>
优化后(万元)
</th>
</tr>
<tr>
<td
rowspan=
"2"
>
宏观策略
</td>
<td>
半夏宏观对冲
</td>
<td>
200
</td>
<td
class=
"text_red"
>
1000
</td>
</tr>
<tr>
<td>
丹羿-锐进1号
</td>
<td>
200
</td>
<td
class=
"text_green"
>
1000
</td>
</tr>
{% for key, value in suggestions_result.items() %}
{% for i in range(value|length) %}
<tr>
{% if i == 0%}
<td
rowspan=
{{value|length
}}
>
{{key}}
</td>
{% endif %}
<td>
{{value[i]["fund_name"]}}
</td>
<td
class=
"font_red"
>
{{value[i]["before_optimization"]}}
</td>
<td
class=
"font_green"
>
{{value[i]["after_optimization"]}}
</td>
</tr>
{% endfor %}
{% endfor %}
<tr>
<td
colspan=
"2"
class=
"gray"
>
总市值(万元)
</td>
<td
class=
"summary"
>
1200
</td>
<td
class=
"summary"
>
1200
</td>
<td
class=
"summary"
>
{{suggestions_result_asset["before"]}}
</td>
<td
class=
"summary"
>
{{suggestions_result_asset["after"]}}
</td>
</tr>
</table>
</div>
...
...
@@ -2135,28 +1824,28 @@
<th>
最大回撤(%)
</th>
<th>
夏普比率
</th>
</tr>
<tr
class=
"yellow"
>
<td>
现有持仓组合
</td>
<td>
5.75
</td>
<td>
0.40
</td>
<td>
2.29
</td>
<td>
2.15
</td>
<td>
3.05
</td>
</tr>
<tr>
<td>
中证500
</td>
<td>
5.75
</td>
<td>
0.40
</td>
<td>
2.29
</td>
<td>
2.15
</td>
<td>
3.05
</td>
</tr>
{%for i in range(indicator_compare|length)%}
{%if i
<
(
indicator_compare
|
length
)
-1
%}
{%
if
i
%
2=
=0
%}
<
tr
>
{%endif%}
{%if i%2==1 %}
<tr
class=
"yellow"
>
{%endif%}
{%endif%}
<td>
{{indicator_compare[i]["group_name"]}}
</td>
<td>
{{indicator_compare[i]["return_ratio"]}}
</td>
<td>
{{indicator_compare[i]["return_ratio_year"]}}
</td>
<td>
{{indicator_compare[i]["volatility"]}}
</td>
<td>
{{indicator_compare[i]["max_drawdown"]}}
</td>
<td>
{{indicator_compare[i]["sharpe"]}}
</td>
</tr>
{% endfor %}
</table>
<div
class=
"tss3_tip"
>
注:以上指标自持仓首日开始计算,结果仅供参考,如果持仓时间过短会造成指标失真的情况。
</div>
</div>
<!-- 收益比较、相关性分析 -->
<div
class=
"par clearfix"
cellpadding=
"38"
>
<div
class=
"par_item fl"
>
...
...
@@ -2164,7 +1853,7 @@
收益比较
</div>
<div
class=
"par_content"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"par_img"
>
<img
src=
{{return_compare_pic}}
alt=
""
class=
"par_img"
>
</div>
</div>
<div
class=
"par_item fr"
>
...
...
@@ -2174,129 +1863,72 @@
<div
class=
"par_content relative_chart"
>
<div
class=
"rc_chart clearfix"
>
<div
class=
"rcc_left fl"
>
<table
border=
"1"
style=
"border-color: transparent;margin-right: 20px;"
>
<tr>
<td>
<span
class=
"rcc_index"
>
1
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
2
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
3
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
4
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
5
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
6
</span>
</td>
</tr>
<tr>
<td>
<span
class=
"rcc_index"
>
7
</span>
</td>
</tr>
</table>
<table
border=
"1"
style=
"border-color: transparent;margin-right: 20px;"
>
{% for correlation in new_correlation %}
<tr>
<td>
<span
class=
"rcc_index"
>
{{correlation[0]}}
</span>
</td>
</tr>
{% endfor %}
</table>
</div>
<div
class=
"rcc_right fr"
>
<table
border=
"1"
>
<tr>
<td>
<span
class=
"rcc_index"
>
1
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
<td
class=
"level_color4"
>
0.56
</td>
<td
class=
"level_color5"
>
0.56
</td>
<td
class=
"level_color6"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
2
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
<td
class=
"level_color4"
>
0.56
</td>
<td
class=
"level_color5"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
3
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
<td
class=
"level_color4"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
4
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
<td
class=
"level_color3"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
5
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
<td
class=
"level_color2"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
6
</span>
</td>
<td
class=
"level_color1"
>
0.56
</td>
</tr>
<tr>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
0.56
</td>
<td>
<span
class=
"rcc_index"
>
7
</span>
</td>
</tr>
</table>
<table
border=
"1"
>
{% for correlation in new_correlation %}
<tr>
{% for i in range(correlation[2]|length) %}
{% if i == correlation[0] - 1 %}
<td>
<span
class=
"rcc_index"
>
{{correlation[0]}}
</span>
</td>
{% elif -1
<
=
correlation
[
2
][
i
]
<
-0
.
5
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif -1
<
=
correlation
[
2
][
i
]
<
-0
.
5
%}
<
td
class=
"level_color6"
>
{{correlation[2][i]}}
</td>
{% elif -0.5
<
=
correlation
[
2
][
i
]
<
-0
.
25
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif -0.5
<
=
correlation
[
2
][
i
]
<
-0
.
25
%}
<
td
class=
"level_color5"
>
{{correlation[2][i]}}
</td>
{% elif -0.25
<
=
correlation
[
2
][
i
]
<
0
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif -0.25
<
=
correlation
[
2
][
i
]
<
0
%}
<
td
class=
"level_color4"
>
{{correlation[2][i]}}
</td>
{% elif 0
<
=
correlation
[
2
][
i
]
<
0
.
25
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif 0
<
=
correlation
[
2
][
i
]
<
0
.
25
%}
<
td
class=
"level_color3"
>
{{correlation[2][i]}}
</td>
{% elif 0.25
<
=
correlation
[
2
][
i
]
<
0
.
5
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif 0.25
<
=
correlation
[
2
][
i
]
<
0
.
5
%}
<
td
class=
"level_color2"
>
{{correlation[2][i]}}
</td>
{% elif 0.5
<
=
correlation
[
2
][
i
]
<=
1
and
i
<
correlation
[
0
]
-
1
%}
<
td
>
{{correlation[2][i]}}
</td>
{% elif 0.5
<
=
correlation
[
2
][
i
]
<=
1
%}
<
td
class=
"level_color1"
>
{{correlation[2][i]}}
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
<div
class=
"rc_tooltip"
>
<div
class=
"rct_color clearfix"
>
<div
class=
"rct_color_item fl level_color1"
></div>
...
...
@@ -2319,62 +1951,16 @@
</div>
</div>
<div
class=
"rc_label clearfix"
>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
1
</div>
<div
class=
"rcl_item_name"
>
基金名称1
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
2
</div>
<div
class=
"rcl_item_name"
>
基金名称2
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
3
</div>
<div
class=
"rcl_item_name"
>
基金名称3
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
4
</div>
<div
class=
"rcl_item_name"
>
基金名称4
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
5
</div>
<div
class=
"rcl_item_name"
>
基金名称5
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
6
</div>
<div
class=
"rcl_item_name"
>
基金名称6
</div>
</div>
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
7
</div>
<div
class=
"rcl_item_name"
>
基金名称7
{% for correlation in new_correlation %}
<div
class=
"rcl_item fl"
>
<div
class=
"rcl_item_number"
>
{{correlation[0]}}
</div>
<div
class=
"rcl_item_name"
>
{{correlation[1]}}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
...
...
@@ -2410,6 +1996,7 @@
<div
class=
"box7_content"
>
<div
class=
"geji_list_wrap"
>
{% for single_fund in propose_fund_data_list %}
<div
class=
"self_item"
>
<table>
<tr>
...
...
@@ -2417,224 +2004,33 @@
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
远澜银杏 1 号
</div>
<div
class=
"self_type fl"
>
保留
{{single_fund.fund_name}}
</div>
<!-- <div class="self_type fl">-->
<!-- {{single_fund.status}}-->
<!-- </div>-->
</div>
<div
class=
"self_description"
>
{% for one in single_fund.evaluation %}
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
1、该基金整体表现
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
风险收益比例
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
2、在收益方面,该基金年化收益能力
<span
class=
"self_description_red"
>
高于
</span>
/
<span
class=
"self_description_green"
>
持平
</span>
/
<span
class=
"self_description_green"
>
低于
</span>
,
同类基金平均水平,有x%区间跑赢大盘/指数,绝对收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
3、在风险方面,该基金抵御风险能力优秀,在同类基金中处于中等水平,最大回撤为x%,低于同类基金平均水平;
{{one}}
</div>
</div>
{% endfor %}
</div>
</div>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"self_img"
>
</div>
</td>
</tr>
</table>
</div>
<div
class=
"self_item"
>
<table>
<tr>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
远澜银杏 1 号
</div>
<div
class=
"self_type fl red"
>
增仓
</div>
</div>
<div
class=
"self_description"
>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
1、该基金整体表现
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
风险收益比例
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
2、在收益方面,该基金年化收益能力
<span
class=
"self_description_red"
>
高于
</span>
/
<span
class=
"self_description_green"
>
持平
</span>
/
<span
class=
"self_description_green"
>
低于
</span>
,
同类基金平均水平,有x%区间跑赢大盘/指数,绝对收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
3、在风险方面,该基金抵御风险能力优秀,在同类基金中处于中等水平,最大回撤为x%,低于同类基金平均水平;
</div>
</div>
</div>
</div>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"self_img"
>
</div>
</td>
</tr>
</table>
</div>
<div
class=
"self_item"
>
<table>
<tr>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
远澜银杏 1 号
</div>
<div
class=
"self_type fl green"
>
减仓
</div>
</div>
<div
class=
"self_description"
>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
1、该基金整体表现
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
,
风险收益比例
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
2、在收益方面,该基金年化收益能力
<span
class=
"self_description_red"
>
高于
</span>
/
<span
class=
"self_description_green"
>
持平
</span>
/
<span
class=
"self_description_green"
>
低于
</span>
,
同类基金平均水平,有x%区间跑赢大盘/指数,绝对收益能力
<span
class=
"self_description_red"
>
优秀
</span>
/
<span
class=
"self_description_red"
>
良好
</span>
/
<span
class=
"self_description_green"
>
一般
</span>
/
<span
class=
"self_description_green"
>
合格
</span>
/
<span
class=
"self_description_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
3、在风险方面,该基金抵御风险能力优秀,在同类基金中处于中等水平,最大回撤为x%,低于同类基金平均水平;
</div>
</div>
</div>
</div>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<img
src=
"./img/logo.png"
alt=
""
class=
"self_img"
>
<img
src=
{{single_fund.radar_chart_path}}
alt=
""
class=
"self_img"
>
</div>
</td>
</tr>
</table>
</div>
{% endfor %}
</div>
<!-- 持仓点评 -->
...
...
@@ -2647,30 +2043,7 @@
<div
class=
"comment_item"
>
<div
class=
"comment_dot"
></div>
<div
class=
"comment_text"
>
1、组合构建于XXXX年XX月,至今已运行XX个月。投入成本为XXXX万元,截止XXXX年XX月XX日,整体盈利XX万元,整体表现
<span
class=
"comment_tag_red"
>
优秀
</span>
/
<span
class=
"comment_tag_red"
>
良好
</span>
/
<span
class=
"comment_tag_green"
>
一般
</span>
/
<span
class=
"comment_tag_green"
>
合格
</span>
/
<span
class=
"comment_tag_green"
>
较差
</span>
,
回撤控制能力
<span
class=
"comment_tag_red"
>
优秀
</span>
/
<span
class=
"comment_tag_red"
>
良好
</span>
/
<span
class=
"comment_tag_green"
>
一般
</span>
/
<span
class=
"comment_tag_green"
>
合格
</span>
/
<span
class=
"comment_tag_green"
>
较差
</span>
;
</div>
</div>
<div
class=
"comment_item"
>
<div
class=
"comment_dot"
></div>
<div
class=
"comment_text"
>
2、组合共持有7只基金,XX和XX两只产品收益稳健,对组合的收益率贡献明显,6只基金取得正收益【根据情况变化】,2只基金综合得分较低建议更换,1只基金因为成立时间较短,暂不做评价;
</div>
</div>
<div
class=
"comment_item"
>
<div
class=
"comment_dot"
></div>
<div
class=
"comment_text"
>
3、策略角度来看,组合涵盖了管理期货及全市场套利策略【说明:二级分类】,以管理期货【说明:二级分类】为主,策略上有一定分散【根据情况变化】,从组合的相关性矩阵来看,XX和XX相关性较高,建议调整组合配比;
{{new_group_evaluation}}
</div>
</div>
</div>
...
...
app/utils/draw.py
View file @
ba4371dc
...
...
@@ -253,8 +253,47 @@ def draw_comment_chart(xlabels, source_prod, target_prod):
plt
.
show
()
def
draw_old_combination_chart
(
xlabels
,
origin_combination
,
index
):
"""旧组合对比图"""
figsize
=
(
20
,
12
)
# 标签文字大小
fontsize
=
22
# 初始化
fig
=
plt
.
figure
(
figsize
=
figsize
)
ax1
=
fig
.
add_subplot
(
111
)
ax3
=
ax1
.
twiny
()
# ax = plt.gca() # gca:get current axis得到当前轴
# ax.spines['bottom'].set_position(('data', 0)) # data表示通过值来设置x轴的位置,将x轴绑定在y=0的位置
product_list
=
[
origin_combination
,
index
]
max_x_count
=
max
([
x
[
'data'
]
.
size
for
x
in
product_list
])
loc
=
np
.
arange
(
max_x_count
)
# the x locations for the groups
# 坐标轴
ax1
.
tick_params
(
labelsize
=
fontsize
)
ax3
.
tick_params
(
labelsize
=
fontsize
)
ax1
.
set_xticks
(
loc
)
ax1
.
set_xticklabels
(
xlabels
)
ax1
.
yaxis
.
set_major_formatter
(
FuncFormatter
(
to_percent
))
ax3
.
set_xticks
([])
# 新组合折线图
ax1
.
plot
(
loc
,
origin_combination
[
'data'
],
color
=
'#C6A774'
,
marker
=
''
,
linewidth
=
3
,
label
=
origin_combination
[
'name'
])
ax1
.
legend
(
loc
=
'upper left'
,
fontsize
=
fontsize
)
# 指数折线图
ax3
.
plot
(
loc
,
index
[
'data'
],
color
=
'black'
,
marker
=
''
,
linewidth
=
3
,
label
=
index
[
'name'
])
ax3
.
legend
(
loc
=
'upper right'
,
fontsize
=
fontsize
)
# plt.show()
imgdata
=
BytesIO
()
fig
.
savefig
(
imgdata
,
format
=
'png'
,
bbox_inches
=
'tight'
)
imgdata
.
seek
(
0
)
# rewind the data
return_compare_img
=
'data:image/png;base64,'
+
base64
.
b64encode
(
imgdata
.
getvalue
())
.
decode
(
'utf-8'
)
return
return_compare_img
def
draw_combination_chart
(
xlabels
,
new_combination
,
origin_combination
,
index
):
"""组合对比图"""
"""
新
组合对比图"""
figsize
=
(
20
,
12
)
# 标签文字大小
fontsize
=
22
...
...
@@ -280,11 +319,11 @@ def draw_combination_chart(xlabels, new_combination, origin_combination, index):
ax3
.
set_xticks
([])
# 新组合折线图
ax1
.
plot
(
loc
,
new_combination
[
'data'
],
color
=
'#C6A774'
,
marker
=
''
,
linewidth
=
3
,
label
=
origin
_combination
[
'name'
])
ax1
.
plot
(
loc
,
new_combination
[
'data'
],
color
=
'#C6A774'
,
marker
=
''
,
linewidth
=
3
,
label
=
new
_combination
[
'name'
])
ax1
.
legend
(
loc
=
'upper left'
,
fontsize
=
fontsize
)
# 原组合折线图
ax2
.
plot
(
loc
,
origin_combination
[
'data'
],
color
=
'#222A77'
,
marker
=
''
,
linewidth
=
3
,
label
=
new
_combination
[
'name'
])
ax2
.
plot
(
loc
,
origin_combination
[
'data'
],
color
=
'#222A77'
,
marker
=
''
,
linewidth
=
3
,
label
=
origin
_combination
[
'name'
])
ax2
.
legend
(
loc
=
'upper center'
,
fontsize
=
fontsize
)
# 指数折线图
...
...
@@ -298,10 +337,6 @@ def draw_combination_chart(xlabels, new_combination, origin_combination, index):
return_compare_img
=
'data:image/png;base64,'
+
base64
.
b64encode
(
imgdata
.
getvalue
())
.
decode
(
'utf-8'
)
return
return_compare_img
def
draw_correlation_chart
():
"""相关性分析图"""
pass
if
__name__
==
'__main__'
:
# xlabels = ('2020-1', '2020-2', '2020-3', '2020-4', '2020-5', '2020-6', '2020-7', '2020-8', '2020-9', '2020-10', '2020-11', '2020-12')
...
...
app/utils/html_to_pdf.py
View file @
ba4371dc
...
...
@@ -9,6 +9,7 @@
import
pdfkit
from
PyPDF2
import
PdfFileMerger
,
PdfFileReader
,
PdfFileWriter
import
uuid
def
html_to_pdf
(
source_path
,
target_path
):
options
=
{
...
...
@@ -16,16 +17,15 @@ def html_to_pdf(source_path, target_path):
'encoding'
:
"utf-8"
,
# 'page-size': 'A5',
# 'page-width': '300mm',
# 'page-height': '
200mm
',
# 'page-height': '
auto
',
'margin-top'
:
'0mm'
,
'margin-right'
:
'0mm'
,
'margin-bottom'
:
'0mm'
,
'margin-left'
:
'0mm'
}
url1
=
'http://www.qimontech.com'
# pdfkit.from_url(url1, '/Users/pengxiong/Desktop/out5.pdf', options=options)
pdfkit
.
from_string
(
source_path
,
target_path
,
options
=
options
)
# pdfkit.from_file(source_path, target_path, options=options)
# pdfkit.from_string(source_path, target_path, options=options)
pdfkit
.
from_file
(
source_path
,
target_path
,
options
=
options
)
def
merge_pdf
(
pdfFiles
,
target_file
=
'/Users/pengxiong/Desktop/combine.pdf'
):
""""""
merger
=
PdfFileMerger
()
...
...
@@ -40,5 +40,5 @@ def merge_pdf(pdfFiles, target_file='/Users/pengxiong/Desktop/combine.pdf'):
if
__name__
==
'__main__'
:
html_to_pdf
()
html_to_pdf
(
'/Users/pengxiong/Desktop/fund_report/app/templates/v2/monthReportV2.html'
,
'/Users/pengxiong/Desktop/fund_report/app/pdf/
%
s.pdf'
%
str
(
uuid
.
uuid4
())
)
# merge_pdf(['/Users/pengxiong/Desktop/out1.pdf', '/Users/pengxiong/Desktop/out.pdf'])
app/utils/jinjia2html.py
View file @
ba4371dc
...
...
@@ -7,7 +7,8 @@ from app.service.result_service import UserCustomerResultAdaptor
import
numpy
as
np
# 准备数据
from
app.utils.draw
import
draw_month_return_chart
,
draw_contribution_chart
,
draw_combination_chart
from
app.utils.draw
import
draw_month_return_chart
,
draw_contribution_chart
,
draw_combination_chart
,
\
draw_old_combination_chart
from
app.utils.radar_chart
import
gen_radar_chart
...
...
@@ -30,10 +31,15 @@ class DataIntegrate:
self
.
single_fund_comment
()
# 旧相关性
self
.
get_old_correlation
()
# 新相关性
self
.
get_new_correlation
()
# 新增基金
self
.
propose_fund
()
# 目标与业绩
self
.
objectives_performance
(
self
.
group_result
)
# 旧收益比较
self
.
get_old_compare_pic
()
# 新收益比较
self
.
get_transfer_suggestions
()
# 渲染模版
self
.
render_data
()
...
...
@@ -74,14 +80,16 @@ class DataIntegrate:
'radar_chart_path'
:
gen_radar_chart
(
radar_chart_data
[
i
])
})
# 调仓建议
def
get_transfer_suggestions
(
self
):
self
.
suggestions_result
,
self
.
suggestions_result_asset
,
return_compare_data
,
\
def
get_old_compare_pic
(
self
):
"""旧收益比较"""
self
.
suggestions_result
,
self
.
suggestions_result_asset
,
self
.
return_compare_data
,
\
self
.
indicator_compare
,
self
.
new_group_evaluation
=
portfolio_diagnose
.
new_evaluation
(
"default"
,
self
.
d
,
self
.
user_customer
)
self
.
return_compare_pic
=
draw_combination_chart
(
return_compare_data
[
"xlabels"
],
return_compare_data
[
"new_combination"
],
return_compare_data
[
"origin_combination"
],
return_compare_data
[
"index"
])
self
.
old_return_compare_pic
=
draw_old_combination_chart
(
self
.
return_compare_data
[
"xlabels"
],
self
.
return_compare_data
[
"origin_combination"
],
self
.
return_compare_data
[
"index"
])
# 收益比较
def
get_transfer_suggestions
(
self
):
"""新收益比较,调仓建议"""
self
.
return_compare_pic
=
draw_combination_chart
(
self
.
return_compare_data
[
"xlabels"
],
self
.
return_compare_data
[
"new_combination"
],
self
.
return_compare_data
[
"origin_combination"
],
self
.
return_compare_data
[
"index"
])
def
get_old_correlation
(
self
):
...
...
@@ -92,6 +100,14 @@ class DataIntegrate:
self
.
old_correlation
=
list
(
zip
(
range
(
1
,
len
(
old_correlation_columns
)
+
1
),
old_correlation_columns
,
old_correlation_values
))
def
get_new_correlation
(
self
):
"""新相关性分析."""
new_correlation
=
portfolio_diagnose
.
new_correlation
new_correlation_columns
=
new_correlation
.
columns
.
tolist
()
new_correlation_values
=
new_correlation
.
values
.
tolist
()
self
.
new_correlation
=
list
(
zip
(
range
(
1
,
len
(
new_correlation_columns
)
+
1
),
new_correlation_columns
,
new_correlation_values
))
def
propose_fund
(
self
):
"""新增基金"""
# 优化组合建议1 -- 新增基金
...
...
@@ -101,7 +117,7 @@ class DataIntegrate:
for
i
in
range
(
len
(
propose_fund_evaluation
)):
self
.
propose_fund_data_list
.
append
({
'fund_name'
:
propose_fund_evaluation
[
i
][
'name'
],
'status'
:
'
保留
'
,
'status'
:
'
增仓
'
,
'evaluation'
:
propose_fund_evaluation
[
i
][
'data'
],
'radar_chart_path'
:
gen_radar_chart
(
propose_radar_chart_data
[
i
])
})
...
...
@@ -162,9 +178,11 @@ class DataIntegrate:
'contribution_decomposition'
:
self
.
contribution_decomposition
,
'single_fund_data_list'
:
self
.
single_fund_data_list
,
'old_correlation'
:
self
.
old_correlation
,
'new_correlation'
:
self
.
new_correlation
,
'propose_fund_data_list'
:
self
.
propose_fund_data_list
,
'suggestions_result'
:
self
.
suggestions_result
,
'suggestions_result_asset'
:
self
.
suggestions_result_asset
,
'old_return_compare_pic'
:
self
.
old_return_compare_pic
,
'return_compare_pic'
:
self
.
return_compare_pic
,
'indicator_compare'
:
self
.
indicator_compare
,
'new_group_evaluation'
:
self
.
new_group_evaluation
...
...
@@ -172,11 +190,16 @@ class DataIntegrate:
}
# 开始渲染html模板
env
=
Environment
(
loader
=
PackageLoader
(
'app'
,
'templates'
))
# 创建一个包加载器对象
template
=
env
.
get_template
(
'monthReport.html'
)
# 获取一个模板文件
# template = env.get_template('monthReport.html') # 获取一个模板文件
template
=
env
.
get_template
(
'/v2/monthReportV2.html'
)
# 获取一个模板文件
monthReport_html
=
template
.
render
(
data
)
# 渲染
# 保存 monthReport_html
save_file
=
"app/html/monthReport.html"
# save_file = "app/html/monthReport.html"
# with open(save_file, 'w', encoding="utf-8") as f:
# f.write(monthReport_html)
save_file
=
"app/html/v2/monthReportV2.html"
with
open
(
save_file
,
'w'
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
monthReport_html
)
...
...
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