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
5aa6dde5
Commit
5aa6dde5
authored
Nov 27, 2020
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改市值数据
parent
29f5f360
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
result_service.py
app/service/result_service.py
+1
-1
jinjia2html.py
jinjia2html.py
+4
-0
No files found.
app/service/result_service.py
View file @
5aa6dde5
...
...
@@ -280,7 +280,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
fund_hoding_info
=
{
"fund_strategy_name"
:
dict_substrategy
[
int
(
row
[
"substrategy"
])],
"fund_name"
:
row
[
"fund_name"
]}
fund_hoding_info
[
"confirm_date"
]
=
row
[
"confirm_share_date"
]
fund_hoding_info
[
"weight"
]
=
round
(
float
(
row
[
"confirm_amount"
])
/
p_total_amount
*
100
,
2
)
fund_hoding_info
[
"market_values"
]
=
round
(
float
(
row
[
"confirm_share"
])
*
(
fund_basic_info
[
"cur_cnav"
]
-
confirm_cnav
)
+
float
(
row
[
"confirm_amount"
]
)
/
10000
,
2
)
fund_hoding_info
[
"market_values"
]
=
round
(
(
float
(
row
[
"confirm_share"
])
*
(
fund_basic_info
[
"cur_cnav"
]
-
confirm_cnav
)
+
float
(
row
[
"confirm_amount"
])
)
/
10000
,
2
)
fund_hoding_info
[
"cost"
]
=
round
(
float
(
row
[
"confirm_amount"
])
/
10000
,
2
)
fund_hoding_info
[
"profit"
]
=
round
(
float
(
row
[
"confirm_share"
])
*
(
fund_basic_info
[
"cur_cnav"
]
-
confirm_cnav
)
/
10000
,
2
)
# fund_hoding_info["ykb"] = fund_hoding_info["profit"] / fund_hoding_info["cost"]
...
...
jinjia2html.py
View file @
5aa6dde5
...
...
@@ -46,6 +46,8 @@ index_volatility = round(group_result["index_result"]["volatility"]*100, 2)
index_max_withdrawal
=
round
(
group_result
[
"index_result"
][
"max_drawdown"
][
0
]
*
100
,
2
)
index_sharpe_ratio
=
round
(
group_result
[
"index_result"
][
"sharpe"
],
2
)
group_nav_info
=
group_result
[
"group_nav_info"
]
group_hoding_info
=
group_result
[
"group_hoding_info"
]
# 全部数据
data
=
{
'customer_name'
:
'成龙'
,
'customer_gender'
:
'女'
,
...
...
@@ -66,6 +68,8 @@ data = {'customer_name':'成龙', 'customer_gender':'女',
'index_comparison_500'
:{
'section_return'
:
index_section_return
,
'annualized_returns'
:
index_annualised_return
,
'volatility'
:
index_volatility
,
'max_withdrawal'
:
index_max_withdrawal
,
'sharpe_ratio'
:
index_sharpe_ratio
},
'monthly_return_performance_pic'
:
monthly_return_performance_pic
,
'group_nav_info'
:
group_nav_info
,
'group_hoding_info'
:
group_hoding_info
}
...
...
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