virgo-modules 0.0.86__tar.gz → 0.0.87__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 (17) hide show
  1. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/PKG-INFO +1 -1
  2. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/setup.py +1 -1
  3. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules/src/re_utils.py +7 -2
  4. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules.egg-info/PKG-INFO +1 -1
  5. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/LICENSE +0 -0
  6. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/README.md +0 -0
  7. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/setup.cfg +0 -0
  8. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules/__init__.py +0 -0
  9. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules/src/__init__.py +0 -0
  10. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules/src/aws_utils.py +0 -0
  11. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules/src/edge_utils.py +0 -0
  12. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules/src/pull_artifacts.py +0 -0
  13. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules/src/ticketer_source.py +0 -0
  14. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules.egg-info/SOURCES.txt +0 -0
  15. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules.egg-info/dependency_links.txt +0 -0
  16. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/virgo_app/virgo_modules.egg-info/requires.txt +0 -0
  17. {virgo_modules-0.0.86 → virgo_modules-0.0.87}/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.0.86
3
+ Version: 0.0.87
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.0.86",
8
+ version="0.0.87",
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"),
@@ -1028,7 +1028,6 @@ class produce_plotly_plots:
1028
1028
  if len(states_subtitles)%2 == 1:
1029
1029
  states_subtitles = states_subtitles + [None]
1030
1030
 
1031
-
1032
1031
  fig = make_subplots(
1033
1032
  rows= rows_subplot, cols=2,
1034
1033
  specs = [[{"type": "scatter"},{"type": "scatter"}]]*state_rows,
@@ -1107,6 +1106,11 @@ class produce_plotly_plots:
1107
1106
  df_ = df[['Date','hmm_feature','Close',"chain_return"]].sort_values('Date')
1108
1107
  df_['Daily_Returns'] = df['Close'].pct_change(7)
1109
1108
 
1109
+ df_agg_returns = df_.groupby('hmm_feature', as_index = False).agg(median =('Daily_Returns','median')).copy()
1110
+ current_state = df_.iloc[-1,:].hmm_feature
1111
+ medain_state_return = df_agg_returns[ df_agg_returns.hmm_feature == current_state]['median'].values[0]
1112
+ type_state = 'low state' if medain_state_return < 0 else 'high state'
1113
+
1110
1114
  for state in states:
1111
1115
  dfi = df_[df_.hmm_feature == state]
1112
1116
  fig.add_trace(go.Box(y = dfi.chain_return, name=str(state),showlegend=False, marker_color = color_map[state] ),row=1, col=1)
@@ -1151,7 +1155,6 @@ class produce_plotly_plots:
1151
1155
  fig.add_trace(go.Box(x = dfi.importance, name=str(feature),showlegend=False ),row=2, col=2)
1152
1156
  fig.update_yaxes(visible=False, title="feature",row=2, col=2)
1153
1157
 
1154
-
1155
1158
  fig.update_layout(height=height_plot, width=1600, title_text = f'State model analysis: {self.ticket_name}', coloraxis=dict(colorbar_len=0.50))
1156
1159
 
1157
1160
  date_execution = datetime.datetime.today().strftime('%Y-%m-%d')
@@ -1165,6 +1168,7 @@ class produce_plotly_plots:
1165
1168
  'current state':message1,
1166
1169
  'current step in state': message2,
1167
1170
  'execution date':message3,
1171
+ 'type state':type_state,
1168
1172
  }
1169
1173
 
1170
1174
  if self.show_plot:
@@ -1196,6 +1200,7 @@ class produce_plotly_plots:
1196
1200
 
1197
1201
  if self.return_figs:
1198
1202
  return fig, messages
1203
+
1199
1204
  def produce_forecasting_plot(self,predictions):
1200
1205
  """
1201
1206
  display forecasting plots
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: virgo-modules
3
- Version: 0.0.86
3
+ Version: 0.0.87
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