Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
alpha-mind
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dr.李
alpha-mind
Commits
7048ef8d
Commit
7048ef8d
authored
Sep 22, 2017
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary dependency on industry
parent
729a28af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
baseexecutor.py
alphamind/execution/baseexecutor.py
+0
-1
No files found.
alphamind/execution/baseexecutor.py
View file @
7048ef8d
...
@@ -25,6 +25,5 @@ class ExecutorBase(metaclass=abc.ABCMeta):
...
@@ -25,6 +25,5 @@ class ExecutorBase(metaclass=abc.ABCMeta):
def
calc_turn_over
(
target_pos
:
pd
.
DataFrame
,
current_pos
:
pd
.
DataFrame
)
->
float
:
def
calc_turn_over
(
target_pos
:
pd
.
DataFrame
,
current_pos
:
pd
.
DataFrame
)
->
float
:
pos_merged
=
pd
.
merge
(
target_pos
,
current_pos
,
on
=
[
'code'
],
how
=
'outer'
)
pos_merged
=
pd
.
merge
(
target_pos
,
current_pos
,
on
=
[
'code'
],
how
=
'outer'
)
pos_merged
.
fillna
(
0
,
inplace
=
True
)
pos_merged
.
fillna
(
0
,
inplace
=
True
)
pos_merged
[
'industry'
]
=
pos_merged
[
'industry_x'
]
.
where
(
pos_merged
[
'industry_x'
]
!=
0
,
pos_merged
[
'industry_y'
])
turn_over
=
np
.
abs
(
pos_merged
.
weight_x
-
pos_merged
.
weight_y
)
.
sum
()
turn_over
=
np
.
abs
(
pos_merged
.
weight_x
-
pos_merged
.
weight_y
)
.
sum
()
return
turn_over
return
turn_over
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