Skip to content

Commit 7afe428

Browse files
committed
Add indicators library
1 parent 03054ab commit 7afe428

File tree

4 files changed

+69
-22
lines changed

4 files changed

+69
-22
lines changed

investing_algorithm_framework/indicators/advanced.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
import importlib.util
2-
3-
if importlib.util.find_spec("scipy") is None \
4-
or importlib.util.find_spec("tulipy") is None \
5-
or importlib.util.find_spec("numpy") is None:
6-
raise ImportError("You have not installed the indicators package")
7-
81
from scipy.signal import argrelextrema
92
from collections import deque
103
import numpy as np

investing_algorithm_framework/indicators/trend.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import importlib.util
21
import pandas as pd
32
from typing import Union, List
43
from datetime import timedelta
@@ -7,13 +6,6 @@
76
from investing_algorithm_framework.domain import OperationalException, \
87
DateRange
98

10-
if importlib.util.find_spec("scipy") is None \
11-
or importlib.util.find_spec("tulipy") is None \
12-
or importlib.util.find_spec("numpy") is None:
13-
raise ImportError(
14-
"You have not installed the indicators package"
15-
)
16-
179
"""
1810
This module contains functions for trend analysis. Trend analysis is
1911
the process of analyzing the direction of the price of an asset.

poetry.lock

Lines changed: 66 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ tqdm = "^4.66.1"
2323
tabulate = "^0.9.0"
2424
polars = { version = "^0.20.10", extras = ["numpy", "pandas"] }
2525
jupyter = "^1.0.0"
26-
27-
[tool.poetry.extras]
28-
indicators = ["numpy", "scipy", "tulipy", "collections"]
26+
numpy = "^2.1.3"
27+
scipy = "^1.14.1"
28+
tulipy = "^0.4.0"
2929

3030
[tool.poetry.group.test.dependencies]
3131
coverage= "7.4.2"

0 commit comments

Comments
 (0)