Skip to content

Commit ced3451

Browse files
committed
Remove unused imports
1 parent ce34fca commit ced3451

File tree

4 files changed

+449
-548
lines changed

4 files changed

+449
-548
lines changed

investing_algorithm_framework/indicators/advanced.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
if importlib.util.find_spec("scipy") is None \
44
or importlib.util.find_spec("tulipy") is None \
5-
or importlib.util.find_spec("numpy") is None \
6-
or importlib.util.find_spec("collections") is None:
7-
raise ImportError("You have not installed the the indicators package")
8-
5+
or importlib.util.find_spec("numpy") is None:
6+
raise ImportError("You have not installed the indicators package")
97

108
from scipy.signal import argrelextrema
119
from collections import deque
@@ -114,21 +112,23 @@ def get_lower_lows(data: np.array, order=5, K=2):
114112
Must not be exceeded within the number of periods indicated by the width
115113
parameter for the value to be confirmed.
116114
117-
params:
118-
119-
order : int, optional
120-
How many points on each side to use for the comparison
121-
to consider ``comparator(n, n+x)`` to be True.
122-
123-
K : int, optional
124-
How many consecutive lows need to be lower. This means that for
125-
a given low, the next
126-
K lows must be lower than the k lows before. So say K=2, then
127-
the low at index i must be lower than the low at
128-
index i-2 and i-1. If this
129-
condition is met, then the low at index i is considered a
130-
lower low. If the condition is not met, then the low at
131-
index i is not considered a lower low.
115+
Parameters:
116+
117+
order (optional): int - How many points on each
118+
side to use for the comparison to
119+
consider ``comparator(n, n+x)`` to be True.
120+
K (optional): int - How many consecutive lows need
121+
to be lower. This means that for a given low,
122+
the next K lows must be lower than the k lows
123+
before. So say K=2, then the low at index i must
124+
be lower than the low at index i-2 and i-1. If this
125+
condition is met, then the low at index i is considered a
126+
lower low. If the condition is not met, then the low at
127+
index i is not considered a lower low.
128+
129+
Returns:
130+
extrema: list - A list of lists containing the indices of the
131+
consecutive lower lows in the data array.
132132
'''
133133
# Get lows
134134
low_idx = argrelextrema(data, np.less, order=order)[0]

investing_algorithm_framework/indicators/trend.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
if importlib.util.find_spec("scipy") is None \
1111
or importlib.util.find_spec("tulipy") is None \
12-
or importlib.util.find_spec("numpy") is None \
13-
or importlib.util.find_spec("collections") is None:
12+
or importlib.util.find_spec("numpy") is None:
1413
raise ImportError(
15-
"You have not installed the the indicators package"
14+
"You have not installed the indicators package"
1615
)
1716

1817
"""

0 commit comments

Comments
 (0)