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
b5418fb8
Commit
b5418fb8
authored
May 10, 2020
by
Dr.李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEST: fixed bad test cases
parent
889f2a47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
18 deletions
+2
-18
test_rank.py
alphamind/tests/data/test_rank.py
+2
-2
test_allocations.py
alphamind/tests/portfolio/test_allocations.py
+0
-16
No files found.
alphamind/tests/data/test_rank.py
View file @
b5418fb8
...
...
@@ -23,14 +23,14 @@ class TestRank(unittest.TestCase):
sorted_array
=
np
.
zeros_like
(
self
.
x
)
for
i
in
range
(
self
.
x
.
shape
[
0
]):
for
j
in
range
(
self
.
x
.
shape
[
1
]):
sorted_array
[
data_rank
[
i
,
j
]
,
j
]
=
self
.
x
[
i
,
j
]
sorted_array
[
int
(
data_rank
[
i
,
j
])
,
j
]
=
self
.
x
[
i
,
j
]
arr_diff
=
np
.
diff
(
sorted_array
,
axis
=
0
)
np
.
testing
.
assert_array_less
(
0
,
arr_diff
)
def
test_rank_with_groups
(
self
):
data
=
pd
.
DataFrame
(
data
=
{
'raw'
:
self
.
x
.
tolist
()},
index
=
self
.
groups
)
data
[
'rank'
]
=
rank
(
data
[
'raw'
],
groups
=
data
.
index
)
data
[
'rank'
]
=
rank
(
data
[
'raw'
]
.
values
,
groups
=
data
.
index
)
groups
=
dict
(
list
(
data
[
'rank'
]
.
groupby
(
level
=
0
)))
ret
=
[]
for
index
in
range
(
10
):
...
...
alphamind/tests/portfolio/test_allocations.py
deleted
100644 → 0
View file @
889f2a47
# -*- coding: utf-8 -*-
"""
Created on 2018-2-7
@author: cheng.li
"""
import
unittest
from
alphamind.portfolio.allocations
import
Asset
from
alphamind.portfolio.allocations
import
Portfolio
from
alphamind.portfolio.allocations
import
Positions
from
alphamind.portfolio.allocations
import
Execution
class
TestAllocation
(
unittest
.
TestCase
):
pass
\ No newline at end of file
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