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
c0cfc2ab
Commit
c0cfc2ab
authored
Jan 01, 2021
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复策略名,1月1日没收益
parent
015b6122
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
result_service_v2.py
app/service/result_service_v2.py
+9
-2
No files found.
app/service/result_service_v2.py
View file @
c0cfc2ab
...
...
@@ -139,7 +139,10 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
if
len
(
last_profit_ratio
)
<=
0
:
cur_year_profit_ratio
=
cur_profit_ratio
[
-
1
]
-
1
else
:
cur_year_profit_ratio
=
(
cur_profit_ratio
[
-
1
]
-
last_profit_ratio
[
-
1
])
/
last_profit_ratio
[
-
1
]
if
len
(
cur_profit_ratio
)
<
1
:
cur_year_profit_ratio
=
0
else
:
cur_year_profit_ratio
=
(
cur_profit_ratio
[
-
1
]
-
last_profit_ratio
[
-
1
])
/
last_profit_ratio
[
-
1
]
folio_report_data
[
"cur_year_profit_ratio"
]
=
float
(
cur_year_profit_ratio
)
# 累积收益率
...
...
@@ -302,7 +305,10 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
if
len
(
last_profit_ratio
)
<=
0
:
cur_year_profit_ratio
=
cur_profit_ratio
[
-
1
]
-
1
else
:
cur_year_profit_ratio
=
(
cur_profit_ratio
[
-
1
]
-
last_profit_ratio
[
-
1
])
/
last_profit_ratio
[
-
1
]
if
len
(
cur_profit_ratio
)
<
1
:
cur_year_profit_ratio
=
0.0
else
:
cur_year_profit_ratio
=
(
cur_profit_ratio
[
-
1
]
-
last_profit_ratio
[
-
1
])
/
last_profit_ratio
[
-
1
]
report_data
[
"cur_year_profit_ratio"
]
=
float
(
cur_year_profit_ratio
)
# 月度回报
...
...
@@ -434,6 +440,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
# 基金持仓数据
total_market_values
=
p_sum_profit
+
p_total_amount
# 月末总市值
fund_strategy_name
=
dict_substrategy
[
int
(
row
[
"substrategy"
])]
if
"长富"
in
row
[
"fund_name"
]
or
"盈沛"
in
row
[
"fund_name"
]:
fund_strategy_name
=
"FOF"
fund_hoding_info
=
{
"fund_strategy_name"
:
fund_strategy_name
,
"fund_name"
:
row
[
"fund_name"
]}
...
...
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