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
92f5f387
Commit
92f5f387
authored
Dec 02, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://47.100.44.39:10001/pengxiong/fund_report
into dev
parents
e799e713
33df3fe6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
result_service.py
app/service/result_service.py
+10
-6
No files found.
app/service/result_service.py
View file @
92f5f387
...
@@ -379,16 +379,20 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
...
@@ -379,16 +379,20 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
return
str
(
a
)
+
"/"
+
str
(
b
)
return
str
(
a
)
+
"/"
+
str
(
b
)
profit_df_cp
=
signal_fund_cum_weight
.
copy
()
profit_df_cp
=
signal_fund_cum_weight
.
copy
()
profit_df_cp
[
"date"
]
=
profit_df_cp
.
index
profit_df_cp
[
"date"
]
=
list
(
profit_df_cp
.
index
)
grouped
=
profit_df_cp
.
groupby
(
profit_df_cp
[
"date"
]
.
apply
(
year_month
))
grouped
=
profit_df_cp
.
groupby
(
profit_df_cp
[
"date"
]
.
apply
(
year_month
))
month_signal_fund_cum
=
grouped
.
last
()
.
sort_values
(
by
=
"date"
)
month_signal_fund_cum
=
grouped
.
last
()
del
month_signal_fund_cum
[
"date"
]
month_signal_fund_cum
.
rename
(
columns
=
{
"date"
:
"datetime"
},
inplace
=
True
)
month_signal_fund_cum
.
sort_values
(
by
=
"datetime"
,
inplace
=
True
)
del
month_signal_fund_cum
[
"datetime"
]
p_cum_df
=
cum_return_ratio_df
.
copy
()
p_cum_df
=
cum_return_ratio_df
.
copy
()
p_cum_df
[
"date"
]
=
p_cum_df
.
index
p_cum_df
[
"date"
]
=
list
(
p_cum_df
.
index
)
cum_grouped
=
p_cum_df
.
groupby
(
p_cum_df
[
"date"
]
.
apply
(
year_month
))
cum_grouped
=
p_cum_df
.
groupby
(
p_cum_df
[
"date"
]
.
apply
(
year_month
))
month_fund_cum
=
cum_grouped
.
last
()
.
sort_values
(
by
=
"date"
)
month_fund_cum
=
cum_grouped
.
last
()
del
month_fund_cum
[
"date"
]
month_fund_cum
.
rename
(
columns
=
{
"date"
:
"datetime"
},
inplace
=
True
)
month_fund_cum
.
sort_values
(
by
=
"datetime"
,
inplace
=
True
)
del
month_fund_cum
[
"datetime"
]
return
cum_return_ratio_df
,
month_fund_cum
,
month_signal_fund_cum
return
cum_return_ratio_df
,
month_fund_cum
,
month_signal_fund_cum
...
...
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