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
7ebc83ed
Commit
7ebc83ed
authored
Dec 04, 2020
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月度回报表格数据模板联调2
parent
ca9d8dbf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
30 deletions
+38
-30
result_service_v2.py
app/service/result_service_v2.py
+1
-1
monthReportV2.html
app/templates/v2/monthReportV2.html
+31
-29
jinjia2html.py
app/utils/jinjia2html.py
+6
-0
No files found.
app/service/result_service_v2.py
View file @
7ebc83ed
...
...
@@ -296,7 +296,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
now_year
=
datetime
.
datetime
.
now
()
.
year
month_return_data_dict
=
{}
for
i
in
range
(
now_year
-
start_year
+
1
):
month_return_data_dict
[
start_year
+
i
]
=
{
j
+
1
:
{
"profit"
:
0
,
"net_amount"
:
0
}
for
j
in
range
(
1
2
)}
month_return_data_dict
[
start_year
+
i
]
=
{
j
+
1
:
{
"profit"
:
0
,
"net_amount"
:
0
}
for
j
in
range
(
1
3
)}
for
d_index
,
d_row
in
month_sum
.
items
():
cur_year
=
int
(
d_index
[:
4
])
cur_month
=
int
(
d_index
[
5
:])
...
...
app/templates/v2/monthReportV2.html
View file @
7ebc83ed
...
...
@@ -1123,97 +1123,99 @@
累计/月均
</th>
</tr>
{%for key, value in monthly_table_return.items() %}
<tr
class=
"yellow"
>
<td
rowspan=
"2"
class=
"gray"
>
2020
{{key}}
</td>
<td>
盈亏
</td>
<td
class=
"text_red"
>
4.34
{{value[1]["profit"]}}
</td>
<td
class=
"text_green"
>
4.34
{{value[2]["profit"]}}
</td>
<td>
4.34
{{value[3]["profit"]}}
</td>
<td>
4.34
{{value[4]["profit"]}}
</td>
<td>
4.34
{{value[5]["profit"]}}
</td>
<td>
4.34
{{value[6]["profit"]}}
</td>
<td>
4.34
{{value[7]["profit"]}}
</td>
<td>
4.34
{{value[8]["profit"]}}
</td>
<td>
4.34
{{value[9]["profit"]}}
</td>
<td>
4.34
{{value[10]["profit"]}}
</td>
<td>
4.34
{{value[11]["profit"]}}
</td>
<td>
4.34
{{value[12]["profit"]}}
</td>
<td>
4.34
{{value[13]["profit"]}}
</td>
</tr>
<tr>
<td>
期末资产
</td>
<td>
4.34
<td
class=
"text_red"
>
{{value[1]["net_amount"]}}
</td>
<td>
4.34
<td
class=
"text_green"
>
{{value[2]["net_amount"]}}
</td>
<td>
4.34
{{value[3]["net_amount"]}}
</td>
<td>
4.34
{{value[4]["net_amount"]}}
</td>
<td>
4.34
{{value[5]["net_amount"]}}
</td>
<td>
4.34
{{value[6]["net_amount"]}}
</td>
<td>
4.34
{{value[7]["net_amount"]}}
</td>
<td>
4.34
{{value[8]["net_amount"]}}
</td>
<td>
4.34
{{value[9]["net_amount"]}}
</td>
<td>
4.34
{{value[10]["net_amount"]}}
</td>
<td>
4.34
{{value[11]["net_amount"]}}
</td>
<td>
4.34
{{value[12]["net_amount"]}}
</td>
<td>
4.34
{{value[13]["net_amount"]}}
</td>
</tr>
{%endfor%}
</table>
</div>
...
...
app/utils/jinjia2html.py
View file @
7ebc83ed
...
...
@@ -24,6 +24,8 @@ class DataIntegrate:
self
.
get_summarize
()
# 月度回报
self
.
get_month_return
()
# 月度回报表格
self
.
get_month_table_return
()
# 旧持仓组合点评
self
.
comments_on_position_portfolio
()
# 贡献分解
...
...
@@ -59,6 +61,9 @@ class DataIntegrate:
xlabels
,
product_list
,
cumulative
=
self
.
user_customer
.
get_month_return_chart
()
self
.
monthly_return_performance_pic
=
draw_month_return_chart
(
xlabels
,
product_list
,
cumulative
)
def
get_month_table_return
(
self
):
self
.
monthly_table_return
=
self
.
df
[
"month_return_data_dict"
]
def
comments_on_position_portfolio
(
self
):
"""旧持仓组合点评."""
self
.
old_evaluation
=
portfolio_diagnose
.
old_evaluation
(
'default'
,
self
.
d
,
self
.
user_customer
)
...
...
@@ -183,6 +188,7 @@ class DataIntegrate:
'volatility'
:
self
.
index_volatility
,
'max_withdrawal'
:
self
.
index_max_withdrawal
,
'sharpe_ratio'
:
self
.
index_sharpe_ratio
},
'monthly_return_performance_pic'
:
self
.
monthly_return_performance_pic
,
'monthly_table_return'
:
self
.
monthly_table_return
,
'group_nav_info'
:
self
.
group_nav_info
,
'group_hoding_info'
:
self
.
group_hoding_info
,
'old_evaluation'
:
self
.
old_evaluation
,
...
...
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