virgo-modules 0.2.6__tar.gz → 0.2.8__tar.gz

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.

Files changed (20) hide show
  1. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/PKG-INFO +1 -1
  2. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/setup.py +1 -1
  3. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/re_utils.py +8 -4
  4. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules.egg-info/PKG-INFO +1 -1
  5. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/LICENSE +0 -0
  6. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/README.md +0 -0
  7. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/setup.cfg +0 -0
  8. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/__init__.py +0 -0
  9. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/__init__.py +0 -0
  10. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/aws_utils.py +0 -0
  11. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/backtester.py +0 -0
  12. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/edge_utils.py +0 -0
  13. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/hmm_utils.py +0 -0
  14. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/pull_artifacts.py +0 -0
  15. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/ticketer_source.py +0 -0
  16. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules/src/transformer_utils.py +0 -0
  17. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules.egg-info/SOURCES.txt +0 -0
  18. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules.egg-info/dependency_links.txt +0 -0
  19. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules.egg-info/requires.txt +0 -0
  20. {virgo_modules-0.2.6 → virgo_modules-0.2.8}/virgo_app/virgo_modules.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: virgo_modules
3
- Version: 0.2.6
3
+ Version: 0.2.8
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
@@ -5,7 +5,7 @@ with open("virgo_app/README.md", "r") as f:
5
5
 
6
6
  setup(
7
7
  name="virgo_modules",
8
- version="0.2.6",
8
+ version="0.2.8",
9
9
  description="data processing and statistical modeling using stock market data",
10
10
  package_dir={"": "virgo_app"},
11
11
  packages=find_packages(where="virgo_app"),
@@ -907,7 +907,7 @@ class produce_plotly_plots:
907
907
  self.aws_credentials = aws_credentials
908
908
  self.return_figs = return_figs
909
909
 
910
- def plot_asset_signals(self, feature_list,spread_column, date_intervals = False):
910
+ def plot_asset_signals(self, feature_list,spread_column, date_intervals = False, look_back = 800):
911
911
  """
912
912
  Display signals and hmm states over closing prices and feature time series
913
913
 
@@ -923,6 +923,8 @@ class produce_plotly_plots:
923
923
  """
924
924
  result_json_name = 'panel_signals.json'
925
925
  df = self.data_frame
926
+ if look_back:
927
+ df = df.iloc[-look_back:,:]
926
928
  ma1 = self.settings['settings'][spread_column]['ma1']
927
929
  ma2 = self.settings['settings'][spread_column]['ma2']
928
930
  hmm_n_clust = self.settings['settings']['hmm']['n_clusters']
@@ -1092,7 +1094,7 @@ class produce_plotly_plots:
1092
1094
  states = list(df.hmm_feature.unique())
1093
1095
  states.sort()
1094
1096
  ### expand hmm analysis
1095
- hmm_titles = ['Transition matrix heatmap' , 'state return (base first observation)','length chains dist']
1097
+ hmm_titles = ['state return (base first observation)','Transition matrix heatmap','length chains dist']
1096
1098
 
1097
1099
  fig = make_subplots(
1098
1100
  rows= rows_subplot, cols=2,
@@ -1121,7 +1123,8 @@ class produce_plotly_plots:
1121
1123
  for state in states:
1122
1124
  dfi = df_[df_.hmm_feature == state]
1123
1125
  fig.add_trace(go.Box(y = dfi.chain_return, name=str(state),showlegend=False, marker_color = color_map[state] ),row=1, col=1)
1124
-
1126
+ fig.add_hline(y=0, line_width=2, line_dash="dash", line_color="grey",row=1, col=1)
1127
+
1125
1128
  ## lengths chains by state dist
1126
1129
  if 'hmm_chain_order' in df.columns:
1127
1130
  df_agg = df.groupby(['hmm_feature','chain_id'],as_index = False).agg(length_by_chain = ('hmm_chain_order','max'))
@@ -1268,6 +1271,7 @@ class produce_plotly_plots:
1268
1271
  df = prediction[prediction.ExecutionDate == last_date]
1269
1272
  fig.add_trace(go.Scatter(x=df.Date, y=df.log_return, mode='lines',marker_color ='#ff7f0e',showlegend=False),row=1, col=1)
1270
1273
  fig.add_trace(go.Scatter(x=df.Date, y=df.log_return, mode='markers',marker_color ='#ff7f0e',showlegend=False),row=1, col=1)
1274
+ fig.add_hline(y=0, line_width=2, line_dash="dash", line_color="grey",col = 1, row = 1)
1271
1275
 
1272
1276
  ## closing prices
1273
1277
 
@@ -1292,7 +1296,7 @@ class produce_plotly_plots:
1292
1296
  upload_file_to_aws(bucket = 'VIRGO_BUCKET', key = self.save_aws + result_json_name, input_path = self.save_path + result_json_name, aws_credentials = self.aws_credentials)
1293
1297
  if self.return_figs:
1294
1298
  return fig
1295
-
1299
+
1296
1300
  def plot_hmm_analysis_logger(data_frame,test_data_size, save_path = False, show_plot = True):
1297
1301
  '''
1298
1302
  display box plots train and test of hmm state returns
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: virgo-modules
3
- Version: 0.2.6
3
+ Version: 0.2.8
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
File without changes
File without changes
File without changes