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
c3f325e8
Commit
c3f325e8
authored
Dec 04, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
3c728683
ca9d8dbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
result_service_v2.py
app/service/result_service_v2.py
+10
-10
No files found.
app/service/result_service_v2.py
View file @
c3f325e8
...
...
@@ -320,7 +320,7 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
index_result
=
self
.
signal_fund_profit_result
(
index_df
[
index_df
.
index
>=
pd
.
to_datetime
(
first_trade_date
)],
"index"
)
report_data
[
"index_result"
]
=
index_result
self
.
__month_return
(
cur_folio_result_cnav_data
,
fund_id_list
)
#
self.__month_return(cur_folio_result_cnav_data, fund_id_list)
self
.
total_result_data
=
report_data
return
report_data
...
...
@@ -514,12 +514,12 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
def
get_group_data
(
self
):
return
self
.
group_result_data
def
__month_return
(
self
,
folio_cnav_data
):
# 月度回报
def
year_month
(
x
):
a
=
x
.
year
b
=
x
.
month
return
str
(
a
)
+
"-"
+
str
(
b
)
p_folio_cnav_data
=
folio_cnav_data
.
copy
()
p_folio_cnav_data
[
"date"
]
=
p_folio_cnav_data
.
index
grouped_data
=
p_folio_cnav_data
.
groupby
(
p_folio_cnav_data
[
"date"
]
.
apply
(
year_month
))
#
def __month_return(self, folio_cnav_data):
#
# 月度回报
#
def year_month(x):
#
a = x.year
#
b = x.month
#
return str(a) + "-" + str(b)
#
p_folio_cnav_data = folio_cnav_data.copy()
#
p_folio_cnav_data["date"] = p_folio_cnav_data.index
#
grouped_data = p_folio_cnav_data.groupby(p_folio_cnav_data["date"].apply(year_month))
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