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
733f1845
Commit
733f1845
authored
Dec 26, 2020
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freq nan
parent
aa00a077
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+4
-1
No files found.
app/service/portfolio_diagnose.py
View file @
733f1845
...
@@ -593,7 +593,8 @@ class PortfolioDiagnose(object):
...
@@ -593,7 +593,8 @@ class PortfolioDiagnose(object):
temp
.
sort_index
(
inplace
=
True
)
temp
.
sort_index
(
inplace
=
True
)
temp
.
ffill
(
inplace
=
True
)
temp
.
ffill
(
inplace
=
True
)
temp
=
resample
(
temp
,
get_trade_cal
(),
min
(
self
.
freq_list
))
temp
=
resample
(
temp
,
get_trade_cal
(),
min
(
self
.
freq_list
))
if
"cal_date"
in
temp
.
columns
:
temp
.
drop
(
labels
=
[
'cal_date'
,
'end_date'
],
axis
=
1
,
inplace
=
True
)
self
.
new_correlation
=
cal_correlation
(
temp
)
self
.
new_correlation
=
cal_correlation
(
temp
)
judge_correlation
=
self
.
new_correlation
.
fillna
(
0
)
judge_correlation
=
self
.
new_correlation
.
fillna
(
0
)
...
@@ -843,6 +844,8 @@ class PortfolioDiagnose(object):
...
@@ -843,6 +844,8 @@ class PortfolioDiagnose(object):
group_order_start_date
=
pd
.
to_datetime
(
group_order_df
[
"confirm_share_date"
]
.
min
())
group_order_start_date
=
pd
.
to_datetime
(
group_order_df
[
"confirm_share_date"
]
.
min
())
freq_max
=
group_order_df
[
"freq"
]
.
max
()
freq_max
=
group_order_df
[
"freq"
]
.
max
()
if
math
.
isnan
(
freq_max
):
freq_max
=
1
n_freq
=
freq_days
(
int
(
freq_max
))
n_freq
=
freq_days
(
int
(
freq_max
))
old_return_df
=
group_result_data
[
"return_df"
]
old_return_df
=
group_result_data
[
"return_df"
]
...
...
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