virgo-modules 0.0.72__py3-none-any.whl → 0.0.74__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of virgo-modules might be problematic. Click here for more details.
- virgo_modules/src/re_utils.py +19 -3
- virgo_modules/src/ticketer_source.py +6 -6
- {virgo_modules-0.0.72.dist-info → virgo_modules-0.0.74.dist-info}/METADATA +20 -18
- virgo_modules-0.0.74.dist-info/RECORD +12 -0
- {virgo_modules-0.0.72.dist-info → virgo_modules-0.0.74.dist-info}/WHEEL +1 -1
- virgo_modules-0.0.72.dist-info/RECORD +0 -12
- {virgo_modules-0.0.72.dist-info → virgo_modules-0.0.74.dist-info}/LICENSE +0 -0
- {virgo_modules-0.0.72.dist-info → virgo_modules-0.0.74.dist-info}/top_level.txt +0 -0
virgo_modules/src/re_utils.py
CHANGED
|
@@ -611,6 +611,23 @@ class produce_plotly_plots:
|
|
|
611
611
|
ma1 = self.settings['settings'][spread_column]['ma1']
|
|
612
612
|
ma2 = self.settings['settings'][spread_column]['ma2']
|
|
613
613
|
hmm_n_clust = self.settings['settings']['hmm']['n_clusters']
|
|
614
|
+
|
|
615
|
+
def return_FeatureSingal_lists(feature, feature_2):
|
|
616
|
+
signal_up_list = [f'signal_up_{feature}', f'signal_up_{feature_2}']
|
|
617
|
+
signal_low_list = [f'signal_low_{feature}', f'signal_low_{feature_2}']
|
|
618
|
+
norm_list = [f'norm_{feature}', f'z_{feature}', feature]
|
|
619
|
+
return norm_list, signal_up_list, signal_low_list
|
|
620
|
+
|
|
621
|
+
# feature_list corrector
|
|
622
|
+
new_feature_list = list()
|
|
623
|
+
for feature in feature_list:
|
|
624
|
+
norm_list, _ , _ = return_FeatureSingal_lists(feature, '')
|
|
625
|
+
for norm_feat in norm_list:
|
|
626
|
+
if norm_feat in df.columns:
|
|
627
|
+
new_feature_list.append(feature)
|
|
628
|
+
break
|
|
629
|
+
|
|
630
|
+
feature_list = new_feature_list
|
|
614
631
|
feature_rows = len(feature_list)
|
|
615
632
|
|
|
616
633
|
rows_subplot = feature_rows + 1
|
|
@@ -627,9 +644,8 @@ class produce_plotly_plots:
|
|
|
627
644
|
### signal plots
|
|
628
645
|
for row_i, feature in enumerate(feature_list,start=1):
|
|
629
646
|
feature_2 = 'nan'
|
|
630
|
-
signal_up_list =
|
|
631
|
-
|
|
632
|
-
norm_list = [f'norm_{feature}', f'z_{feature}', feature]
|
|
647
|
+
norm_list, signal_up_list, signal_low_list = return_FeatureSingal_lists(feature, feature_2)
|
|
648
|
+
|
|
633
649
|
# signal
|
|
634
650
|
for norm_feat in norm_list:
|
|
635
651
|
if norm_feat in df.columns:
|
|
@@ -874,7 +874,7 @@ class stock_eda_panel(object):
|
|
|
874
874
|
def rsi_feature_improved(self, window, threshold, plot = False, save_features = False):
|
|
875
875
|
feature_name = 'RSI'
|
|
876
876
|
rsi = RSIIndicator(close = self.df['Close'], window = window).rsi()
|
|
877
|
-
self.df[feature_name] = rsi
|
|
877
|
+
self.df[feature_name] = rsi.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
|
|
878
878
|
self.compute_clip_bands(feature_name,threshold)
|
|
879
879
|
|
|
880
880
|
if save_features:
|
|
@@ -1050,7 +1050,7 @@ class stock_eda_panel(object):
|
|
|
1050
1050
|
def roc_feature(self, window, threshold, plot = False, save_features = False):
|
|
1051
1051
|
feature_name = 'ROC'
|
|
1052
1052
|
roc = ROCIndicator(close = self.df['Close'], window = window).roc()
|
|
1053
|
-
self.df[feature_name] = roc
|
|
1053
|
+
self.df[feature_name] = roc.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
|
|
1054
1054
|
self.compute_clip_bands(feature_name,threshold)
|
|
1055
1055
|
|
|
1056
1056
|
if save_features:
|
|
@@ -1062,7 +1062,7 @@ class stock_eda_panel(object):
|
|
|
1062
1062
|
def stoch_feature(self, window, smooth1, smooth2, threshold, plot = False, save_features = False):
|
|
1063
1063
|
feature_name = 'STOCH'
|
|
1064
1064
|
stoch = StochRSIIndicator(close = self.df['Close'], window = window, smooth1=smooth1, smooth2=smooth2).stochrsi()
|
|
1065
|
-
self.df[feature_name] = stoch
|
|
1065
|
+
self.df[feature_name] = stoch.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
|
|
1066
1066
|
self.compute_clip_bands(feature_name,threshold)
|
|
1067
1067
|
|
|
1068
1068
|
if save_features:
|
|
@@ -1074,7 +1074,7 @@ class stock_eda_panel(object):
|
|
|
1074
1074
|
def stochastic_feature(self, window, smooth, threshold, plot = False, save_features = False):
|
|
1075
1075
|
feature_name = 'STOCHOSC'
|
|
1076
1076
|
stochast = StochasticOscillator(close = self.df['Close'], high = self.df['High'], low = self.df['Low'], window = window,smooth_window=smooth).stoch()
|
|
1077
|
-
self.df[feature_name] = stochast
|
|
1077
|
+
self.df[feature_name] = stochast.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
|
|
1078
1078
|
self.compute_clip_bands(feature_name,threshold)
|
|
1079
1079
|
|
|
1080
1080
|
if save_features:
|
|
@@ -1086,7 +1086,7 @@ class stock_eda_panel(object):
|
|
|
1086
1086
|
def william_feature(self, lbp, threshold, plot = False, save_features = False):
|
|
1087
1087
|
feature_name = 'WILL'
|
|
1088
1088
|
will = WilliamsRIndicator(close = self.df['Close'], high = self.df['High'], low = self.df['Low'], lbp = lbp).williams_r()
|
|
1089
|
-
self.df[feature_name] = will
|
|
1089
|
+
self.df[feature_name] = will.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
|
|
1090
1090
|
self.compute_clip_bands(feature_name,threshold)
|
|
1091
1091
|
|
|
1092
1092
|
if save_features:
|
|
@@ -1098,7 +1098,7 @@ class stock_eda_panel(object):
|
|
|
1098
1098
|
def vortex_feature(self, window, threshold, plot = False, save_features = False):
|
|
1099
1099
|
feature_name = 'VORTEX'
|
|
1100
1100
|
vortex = VortexIndicator(close = self.df['Close'], high = self.df['High'], low = self.df['Low'], window = window).vortex_indicator_diff()
|
|
1101
|
-
self.df[feature_name] = vortex
|
|
1101
|
+
self.df[feature_name] = vortex.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
|
|
1102
1102
|
self.compute_clip_bands(feature_name,threshold)
|
|
1103
1103
|
|
|
1104
1104
|
if save_features:
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: virgo-modules
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.74
|
|
4
4
|
Summary: data processing and statistical modeling using stock market data
|
|
5
5
|
Home-page: https://github.com/miguelmayhem92/virgo_module
|
|
6
6
|
Author: Miguel Mayhuire
|
|
7
7
|
Author-email: miguelmayhem92@gmail.com
|
|
8
8
|
License: MIT
|
|
9
|
+
Platform: UNKNOWN
|
|
9
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
11
|
Classifier: Programming Language :: Python :: 3.9
|
|
11
12
|
Classifier: Operating System :: OS Independent
|
|
12
13
|
Requires-Python: >=3.9, <3.10
|
|
13
14
|
Description-Content-Type: text/markdown
|
|
14
15
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: feature-engine ==1.6.1
|
|
16
|
-
Requires-Dist: matplotlib ==3.6.3
|
|
17
|
-
Requires-Dist: mlflow ==2.1.1
|
|
18
|
-
Requires-Dist: numpy ==1.23.5
|
|
19
|
-
Requires-Dist: optuna ==3.1.0
|
|
20
|
-
Requires-Dist: pandas ==1.5.3
|
|
21
|
-
Requires-Dist: plotly ==5.15.0
|
|
22
|
-
Requires-Dist: rsa ==4.9
|
|
23
|
-
Requires-Dist: scikit-learn ==1.2.1
|
|
24
|
-
Requires-Dist: scipy ==1.10.0
|
|
25
|
-
Requires-Dist: seaborn ==0.12.2
|
|
26
|
-
Requires-Dist: starlette ==0.22.0
|
|
27
|
-
Requires-Dist: statsmodels ==0.13.5
|
|
28
|
-
Requires-Dist: ta ==0.10.2
|
|
29
|
-
Requires-Dist: yfinance ==0.2.9
|
|
30
|
-
Requires-Dist: hmmlearn ==0.3.0
|
|
16
|
+
Requires-Dist: feature-engine (==1.6.1)
|
|
17
|
+
Requires-Dist: matplotlib (==3.6.3)
|
|
18
|
+
Requires-Dist: mlflow (==2.1.1)
|
|
19
|
+
Requires-Dist: numpy (==1.23.5)
|
|
20
|
+
Requires-Dist: optuna (==3.1.0)
|
|
21
|
+
Requires-Dist: pandas (==1.5.3)
|
|
22
|
+
Requires-Dist: plotly (==5.15.0)
|
|
23
|
+
Requires-Dist: rsa (==4.9)
|
|
24
|
+
Requires-Dist: scikit-learn (==1.2.1)
|
|
25
|
+
Requires-Dist: scipy (==1.10.0)
|
|
26
|
+
Requires-Dist: seaborn (==0.12.2)
|
|
27
|
+
Requires-Dist: starlette (==0.22.0)
|
|
28
|
+
Requires-Dist: statsmodels (==0.13.5)
|
|
29
|
+
Requires-Dist: ta (==0.10.2)
|
|
30
|
+
Requires-Dist: yfinance (==0.2.9)
|
|
31
|
+
Requires-Dist: hmmlearn (==0.3.0)
|
|
31
32
|
Requires-Dist: boto3
|
|
32
33
|
Provides-Extra: dev
|
|
33
|
-
Requires-Dist: pytest >=7.0 ; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest (>=7.0) ; extra == 'dev'
|
|
34
35
|
|
|
35
36
|
# Virgo Package
|
|
36
37
|
|
|
@@ -51,3 +52,4 @@ obj = stock_eda_panel(stock_code = 'PEP', n_days = 20)
|
|
|
51
52
|
obj.get_data()
|
|
52
53
|
print(obj.df.shape)
|
|
53
54
|
```
|
|
55
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
virgo_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
virgo_modules/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
virgo_modules/src/aws_utils.py,sha256=GWmVdXM0mIJJPn-X-bEtM4KtNPCHM1D457hnuKxaM7E,1383
|
|
4
|
+
virgo_modules/src/edge_utils.py,sha256=Ihdmq7dyb8gOvG6CrDal7wsa15tqsdsFk6KINwM6578,7691
|
|
5
|
+
virgo_modules/src/pull_artifacts.py,sha256=5OPrgR7pcMSdpbevDRhf0ebk7g7ZRjff4NpTIIWAKjE,1989
|
|
6
|
+
virgo_modules/src/re_utils.py,sha256=IF0l8eduTgHLASyXcZu1TIazJVPt4vzw-CeDyw2YfdQ,53096
|
|
7
|
+
virgo_modules/src/ticketer_source.py,sha256=cduj-IhKavpSHEoZ2OSWNAalazTGXlcVDDLdpeT7r_E,105165
|
|
8
|
+
virgo_modules-0.0.74.dist-info/LICENSE,sha256=pNgFyCYgmimaw0o6V20JupZLROycAnOA_HDDh1tX2V4,1097
|
|
9
|
+
virgo_modules-0.0.74.dist-info/METADATA,sha256=QaYA8SGUqfHknR4_NTBNPJlEakgu7vGrqJZl46CEF2c,1484
|
|
10
|
+
virgo_modules-0.0.74.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
11
|
+
virgo_modules-0.0.74.dist-info/top_level.txt,sha256=ZjI-qEkDtT-8mFwGAWnXfqPOKEGlIhWRW1es1VyXc60,14
|
|
12
|
+
virgo_modules-0.0.74.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
virgo_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
virgo_modules/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
virgo_modules/src/aws_utils.py,sha256=GWmVdXM0mIJJPn-X-bEtM4KtNPCHM1D457hnuKxaM7E,1383
|
|
4
|
-
virgo_modules/src/edge_utils.py,sha256=Ihdmq7dyb8gOvG6CrDal7wsa15tqsdsFk6KINwM6578,7691
|
|
5
|
-
virgo_modules/src/pull_artifacts.py,sha256=5OPrgR7pcMSdpbevDRhf0ebk7g7ZRjff4NpTIIWAKjE,1989
|
|
6
|
-
virgo_modules/src/re_utils.py,sha256=LDI3sYAaNm3LO5gRul7PyCVbJrkT3PBihObkdVilVec,52428
|
|
7
|
-
virgo_modules/src/ticketer_source.py,sha256=ciMPObqntAFtnlY1IPt8-Y4mz6yuD1jy6gRQN109D4M,104837
|
|
8
|
-
virgo_modules-0.0.72.dist-info/LICENSE,sha256=pNgFyCYgmimaw0o6V20JupZLROycAnOA_HDDh1tX2V4,1097
|
|
9
|
-
virgo_modules-0.0.72.dist-info/METADATA,sha256=Txin9qouILtGSvPTQYcJPPkWXNry0JjI3sSfAMB0Cjg,1429
|
|
10
|
-
virgo_modules-0.0.72.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
11
|
-
virgo_modules-0.0.72.dist-info/top_level.txt,sha256=ZjI-qEkDtT-8mFwGAWnXfqPOKEGlIhWRW1es1VyXc60,14
|
|
12
|
-
virgo_modules-0.0.72.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|