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
90a538eb
Commit
90a538eb
authored
Dec 04, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新模版8
parent
f1613008
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
81 deletions
+16
-81
result_service_v2.py
app/service/result_service_v2.py
+1
-1
monthReportV2.html
app/templates/v2/monthReportV2.html
+14
-79
jinjia2html.py
app/utils/jinjia2html.py
+1
-1
No files found.
app/service/result_service_v2.py
View file @
90a538eb
...
...
@@ -360,7 +360,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
fund_hoding_info
[
"cum_profit_ratio"
]
=
round
((
fund_basic_info
[
"cur_cnav"
]
-
confirm_cnav
)
/
confirm_cnav
*
100
,
2
)
# 累积年化收益率
cur_resample_df
=
resample_df
[[
row
[
"fund_id"
]]]
.
dropna
()
return_ratio_year
=
annual_return
(
fund_hoding_info
[
"cum_profit_ratio"
]
/
100.0
,
resample_df
,
n_freq
)
return_ratio_year
=
annual_return
(
fund_hoding_info
[
"cum_profit_ratio"
]
/
100.0
,
cur_
resample_df
,
n_freq
)
fund_hoding_info
[
"return_ratio_year"
]
=
float
(
return_ratio_year
)
group_fund_hoding_info
.
append
(
fund_hoding_info
)
return
group_fund_basic_info
,
group_fund_hoding_info
...
...
app/templates/v2/monthReportV2.html
View file @
90a538eb
...
...
@@ -1504,87 +1504,22 @@
<th>
累计收益率
</th>
<th>
年化收益率
</th>
</tr>
{% for one in group_hoding_info %}
<tr>
<td
rowspan=
"2"
>
宏观策略
</td>
<td>
1.半夏宏观对冲
</td>
<td
class=
"text_red"
>
0.40
</td>
<td
class=
"text_green"
>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
</tr>
<tr>
<td>
2.丹羿-锐进1号
</td>
<td
class=
"text_red"
>
0.40
</td>
<td
class=
"text_green"
>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
</tr>
</table>
</div>
<div
style=
"position: relative;"
>
<div
class=
"tss3_tag"
>
公募基金
<div
class=
"tss3_tri"
></div>
</div>
<table
border=
"1"
style=
"margin: 0;"
>
<tr>
<th
colspan=
"5"
>
投资本金
</th>
<th
colspan=
"4"
>
10月业绩
</th>
<th
colspan=
"3"
>
累计业绩
</th>
</tr>
<tr>
<th>
投资策略
</th>
<th>
基金简称
</th>
<th>
买入时间
</th>
<th>
存续年数
</th>
<th>
投资本金 (万元)
</th>
<th>
当月收益
</th>
<th>
当月收益率
</th>
<th>
月末市值 (万元)
</th>
<th>
月末占比
</th>
<th>
累计收益
</th>
<th>
累计收益率
</th>
<th>
年化收益率
</th>
</tr>
<tr>
<td
rowspan=
"2"
>
宏观策略
</td>
<td>
1.半夏宏观对冲
</td>
<td
class=
"text_red"
>
0.40
</td>
<td
class=
"text_green"
>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
</tr>
<tr>
<td>
2.丹羿-锐进1号
</td>
<td
class=
"text_red"
>
0.40
</td>
<td
class=
"text_green"
>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td>
0.40
</td>
<td
rowspan=
"1"
>
{{one.fund_strategy_name}}
</td>
<td>
{{one.fund_name}}
</td>
<td
class=
"text_red"
>
{{one.confirm_date}}
</td>
<td
class=
"text_green"
>
{{one.hold_year}}
</td>
<td>
{{one.cost}}
</td>
<td>
{{one.profit}}
</td>
<td>
{{one.month_return_ratio}}
</td>
<td>
{{one.market_values}}
</td>
<td>
{{one.weight}}
</td>
<td>
{{one.cum_profit}}
</td>
<td>
{{one.cum_profit_ratio}}
</td>
<td>
{{one.return_ratio_year}}
</td>
</tr>
{% endfor %}
<tr
class=
"gray"
>
<td
colspan=
"4"
>
总计
</td>
<td
class=
"text_red"
>
0.40
</td>
...
...
app/utils/jinjia2html.py
View file @
90a538eb
...
...
@@ -3,7 +3,7 @@ import time
from
jinja2
import
PackageLoader
,
Environment
from
app.service.portfolio_diagnose
import
portfolio_diagnose
from
app.service.result_service
import
UserCustomerResultAdaptor
from
app.service.result_service
_v2
import
UserCustomerResultAdaptor
import
numpy
as
np
# 准备数据
...
...
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