virgo-modules 0.2.9__py3-none-any.whl → 0.2.10__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.

@@ -1287,7 +1287,7 @@ class stock_eda_panel(object):
1287
1287
 
1288
1288
  setattr(self,f'settings_{name_attr}_pricefeature' , {'type_func': type_func, 'window': window, 'distance': distance})
1289
1289
 
1290
- def pair_index_feature(self, pair_symbol, feature_label, window, threshold, plot = False, save_features = False):
1290
+ def pair_index_feature(self, pair_symbol, feature_label,threshold, window = None,ta_method='ROC',param_set=False,plot = False, save_features = False):
1291
1291
  """
1292
1292
  perform additional asset ROC feature, then a new feature is created in the main dataframe
1293
1293
 
@@ -1295,8 +1295,10 @@ class stock_eda_panel(object):
1295
1295
  ----------
1296
1296
  pair_symbol (str): symbol of the asset to extract the data
1297
1297
  feature_label (str): name of the resulting feature
1298
- window (int): window to apply to the feature
1298
+ window (int): window to apply to the feature as default (this parameter is going to be deprecated)
1299
1299
  threshold (float): alpha or z thrsholds for the normalized feature
1300
+ param_set (dict): parameter set in case ta_method is other than ROC
1301
+ ta_method (str): method to use, available RSI, ROC, VORTEX, STOCH
1300
1302
  plot (boolean): True to display plot
1301
1303
  save_features (boolean): True to save feature configuration and feature names
1302
1304
 
@@ -1326,7 +1328,20 @@ class stock_eda_panel(object):
1326
1328
  self.pair_index_df = self.pair_index_df.fillna(method = 'bfill')
1327
1329
  self.pair_index_df = self.pair_index_df.fillna(method = 'ffill')
1328
1330
 
1329
- self.pair_index_df[feature_label] = ROCIndicator(close = self.pair_index_df['Close'], window = window).roc()
1331
+ if ta_method == 'ROC':
1332
+ window = window if window else param_set.get('window')
1333
+ roc = ROCIndicator(close = self.pair_index_df['Close'], window = window).roc()
1334
+ self.pair_index_df[feature_label] = roc.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
1335
+ elif ta_method == 'RSI':
1336
+ rsi = RSIIndicator(close = self.pair_index_df['Close'], **param_set).rsi()
1337
+ self.pair_index_df[feature_label] = rsi.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
1338
+ elif ta_method == 'VORTEX':
1339
+ vortex = VortexIndicator(close = self.pair_index_df['Close'], high = self.pair_index_df['High'], low = self.pair_index_df['Low'], **param_set).vortex_indicator_diff()
1340
+ self.pair_index_df[feature_label] = vortex.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
1341
+ elif ta_method == 'STOCH':
1342
+ stoch = StochRSIIndicator(close = self.pair_index_df['Close'], **param_set).stochrsi()
1343
+ self.pair_index_df[feature_label] = stoch.replace([np.inf, -np.inf], 0).fillna(method = 'ffill')
1344
+
1330
1345
  df_to_merge = self.pair_index_df[['Date',feature_label]]
1331
1346
  self.df = self.df.merge(df_to_merge, on ='Date',how = 'left')
1332
1347
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: virgo-modules
3
- Version: 0.2.9
3
+ Version: 0.2.10
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
@@ -12,23 +12,6 @@ Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.9, <3.10
13
13
  Description-Content-Type: text/markdown
14
14
  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
31
- Requires-Dist: boto3
32
15
  Provides-Extra: dev
33
16
  Requires-Dist: pytest >=7.0 ; extra == 'dev'
34
17
 
@@ -6,10 +6,10 @@ virgo_modules/src/edge_utils.py,sha256=XN2oEOwADXF9IGNUGx0Ai8B1yDAiU2WDateLnEJh5
6
6
  virgo_modules/src/hmm_utils.py,sha256=fFWxmh9q3rjiKRHnxNk9k7O4fDrxVxkmp3pbpLvktjc,21116
7
7
  virgo_modules/src/pull_artifacts.py,sha256=5OPrgR7pcMSdpbevDRhf0ebk7g7ZRjff4NpTIIWAKjE,1989
8
8
  virgo_modules/src/re_utils.py,sha256=PoHFqYiccUrKZJ2wvDbisrK1Uo9ekX8laAeGc2XxLxY,74852
9
- virgo_modules/src/ticketer_source.py,sha256=joJUoaga5M0OOAiOJ8TFR_sGd6eckbHlN1fxLIklXSM,98785
9
+ virgo_modules/src/ticketer_source.py,sha256=4vT8YweRtS28Zs66DBUG2rZ5EcFk9S0hiqNS_fz_I1c,100017
10
10
  virgo_modules/src/transformer_utils.py,sha256=LLwKYZRq5hrPVimnq3taD0Lh-q3Bq21fy1I4Icbnxi8,7677
11
- virgo_modules-0.2.9.dist-info/LICENSE,sha256=pNgFyCYgmimaw0o6V20JupZLROycAnOA_HDDh1tX2V4,1097
12
- virgo_modules-0.2.9.dist-info/METADATA,sha256=3ldgs_EMHB6fhrfWq2Z3AKk-BBz3jKIW83q24D7KlTc,1428
13
- virgo_modules-0.2.9.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
14
- virgo_modules-0.2.9.dist-info/top_level.txt,sha256=ZjI-qEkDtT-8mFwGAWnXfqPOKEGlIhWRW1es1VyXc60,14
15
- virgo_modules-0.2.9.dist-info/RECORD,,
11
+ virgo_modules-0.2.10.dist-info/LICENSE,sha256=pNgFyCYgmimaw0o6V20JupZLROycAnOA_HDDh1tX2V4,1097
12
+ virgo_modules-0.2.10.dist-info/METADATA,sha256=-9U5ff9siZLh3T97ZAieJooEJKYfTVMpIM3nw7PiZeA,884
13
+ virgo_modules-0.2.10.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
14
+ virgo_modules-0.2.10.dist-info/top_level.txt,sha256=ZjI-qEkDtT-8mFwGAWnXfqPOKEGlIhWRW1es1VyXc60,14
15
+ virgo_modules-0.2.10.dist-info/RECORD,,