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
7f437900
Commit
7f437900
authored
Dec 07, 2020
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
汇总数据
parent
97dc8fb0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
result_service_v2.py
app/service/result_service_v2.py
+8
-8
monthReportV2.html
app/templates/v2/monthReportV2.html
+8
-8
jinjia2html.py
app/utils/jinjia2html.py
+2
-0
No files found.
app/service/result_service_v2.py
View file @
7f437900
...
@@ -154,14 +154,14 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
...
@@ -154,14 +154,14 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
folio_report_data
[
"group_nav_info"
]
=
result_fund_nav_info
folio_report_data
[
"group_nav_info"
]
=
result_fund_nav_info
folio_report_data
[
"group_hoding_info"
]
=
result_fund_hoding_info
folio_report_data
[
"group_hoding_info"
]
=
result_fund_hoding_info
folio_report_data
[
"group_hoding_info_total"
]
=
\
folio_report_data
[
"group_hoding_info_total"
]
=
\
{
"total_cost"
:
total_cost
,
{
"total_cost"
:
round
(
total_cost
/
10000.0
,
2
)
,
"cur_month_profit"
:
cur_month_profit
,
"cur_month_profit"
:
round
(
cur_month_profit
/
10000.0
,
2
)
,
"cur_month_profit_ratio"
:
cur_month_profit_ratio
,
"cur_month_profit_ratio"
:
round
(
cur_month_profit_ratio
*
100
,
2
)
,
"ending_assets"
:
ending_assets
,
"ending_assets"
:
round
(
ending_assets
/
10000.0
,
2
)
,
"weight"
:
100
,
"weight"
:
100
,
"cumulative_profit"
:
cumulative_profit
,
"cumulative_profit"
:
round
(
cumulative_profit
/
10000.0
,
2
)
,
"cumulative_return"
:
cumulative_return
,
"cumulative_return"
:
round
((
cumulative_return
-
1
)
*
100
,
2
)
,
"return_ratio_year"
:
r
eturn_ratio_year
}
"return_ratio_year"
:
r
ound
(
return_ratio_year
*
100
,
2
)
}
# 对应指数数据
# 对应指数数据
index_df
=
self
.
get_customer_index_nav_data
()
index_df
=
self
.
get_customer_index_nav_data
()
...
@@ -385,7 +385,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
...
@@ -385,7 +385,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
# 累积年化收益率
# 累积年化收益率
cur_resample_df
=
resample_df
[[
row
[
"fund_id"
]]]
.
dropna
()
cur_resample_df
=
resample_df
[[
row
[
"fund_id"
]]]
.
dropna
()
return_ratio_year
=
annual_return
(
fund_hoding_info
[
"cum_profit_ratio"
]
/
100.0
,
cur_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
)
fund_hoding_info
[
"return_ratio_year"
]
=
round
(
float
(
return_ratio_year
)
*
100
,
2
)
group_fund_hoding_info
.
append
(
fund_hoding_info
)
group_fund_hoding_info
.
append
(
fund_hoding_info
)
return
group_fund_basic_info
,
group_fund_hoding_info
return
group_fund_basic_info
,
group_fund_hoding_info
...
...
app/templates/v2/monthReportV2.html
View file @
7f437900
...
@@ -1521,14 +1521,14 @@
...
@@ -1521,14 +1521,14 @@
{% endfor %}
{% endfor %}
<tr
class=
"gray"
>
<tr
class=
"gray"
>
<td
colspan=
"4"
>
总计
</td>
<td
colspan=
"4"
>
总计
</td>
<td
class=
"text_red"
>
0.40
</td>
<td
>
{{group_hoding_info_total["total_cost"]}}
</td>
<td
class=
"text_green"
>
0.40
</td>
<td
>
{{group_hoding_info_total["cur_month_profit"]}}
</td>
<td>
0.40
</td>
<td>
{{group_hoding_info_total["cur_month_profit_ratio"]}}
</td>
<td>
0.40
</td>
<td>
{{group_hoding_info_total["ending_assets"]}}
</td>
<td>
0.4
0
</td>
<td>
10
0
</td>
<td>
0.40
</td>
<td>
{{group_hoding_info_total["cumulative_profit"]}}
</td>
<td>
0.40
</td>
<td>
{{group_hoding_info_total["cumulative_return"]}}
</td>
<td>
0.40
</td>
<td>
{{group_hoding_info_total["return_ratio_year"]}}
</td>
</tr>
</tr>
</table>
</table>
</div>
</div>
...
...
app/utils/jinjia2html.py
View file @
7f437900
...
@@ -162,6 +162,7 @@ class DataIntegrate:
...
@@ -162,6 +162,7 @@ class DataIntegrate:
self
.
group_nav_info
=
group_result
[
"group_nav_info"
]
self
.
group_nav_info
=
group_result
[
"group_nav_info"
]
self
.
group_hoding_info
=
group_result
[
"group_hoding_info"
]
self
.
group_hoding_info
=
group_result
[
"group_hoding_info"
]
self
.
group_hoding_info_total
=
group_result
[
"group_hoding_info_total"
]
def
render_data
(
self
):
def
render_data
(
self
):
...
@@ -201,6 +202,7 @@ class DataIntegrate:
...
@@ -201,6 +202,7 @@ class DataIntegrate:
'monthly_table_return'
:
self
.
monthly_table_return
,
'monthly_table_return'
:
self
.
monthly_table_return
,
'group_nav_info'
:
self
.
group_nav_info
,
'group_nav_info'
:
self
.
group_nav_info
,
'group_hoding_info'
:
self
.
group_hoding_info
,
'group_hoding_info'
:
self
.
group_hoding_info
,
'group_hoding_info_total'
:
self
.
group_hoding_info_total
,
'old_evaluation'
:
self
.
old_evaluation
,
'old_evaluation'
:
self
.
old_evaluation
,
'contribution_decomposition'
:
self
.
contribution_decomposition
,
'contribution_decomposition'
:
self
.
contribution_decomposition
,
'single_fund_data_list'
:
self
.
single_fund_data_list
,
'single_fund_data_list'
:
self
.
single_fund_data_list
,
...
...
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