virgo-modules 0.0.68__tar.gz → 0.0.69__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.
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/PKG-INFO +1 -1
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/setup.py +1 -1
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/src/re_utils.py +13 -6
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules.egg-info/PKG-INFO +1 -1
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/LICENSE +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/README.md +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/setup.cfg +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/__init__.py +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/src/__init__.py +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/src/aws_utils.py +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/src/edge_utils.py +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/src/pull_artifacts.py +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/src/ticketer_source.py +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules.egg-info/SOURCES.txt +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules.egg-info/dependency_links.txt +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules.egg-info/requires.txt +0 -0
- {virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules.egg-info/top_level.txt +0 -0
|
@@ -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.
|
|
8
|
+
version="0.0.69",
|
|
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"),
|
|
@@ -584,7 +584,7 @@ def call_ml_objects(stock_code, client, call_models = False):
|
|
|
584
584
|
return objects
|
|
585
585
|
|
|
586
586
|
class produce_plotly_plots:
|
|
587
|
-
def __init__(self,ticket_name, data_frame,settings, save_path = False, save_aws = False, show_plot= True, aws_credentials = False):
|
|
587
|
+
def __init__(self,ticket_name, data_frame,settings, save_path = False, save_aws = False, show_plot= True, aws_credentials = False, return_figs = False):
|
|
588
588
|
"""
|
|
589
589
|
ticket_name: str asset name
|
|
590
590
|
data_frame: pandas df
|
|
@@ -602,6 +602,7 @@ class produce_plotly_plots:
|
|
|
602
602
|
self.save_aws = save_aws
|
|
603
603
|
self.show_plot = show_plot
|
|
604
604
|
self.aws_credentials = aws_credentials
|
|
605
|
+
self.return_figs = return_figs
|
|
605
606
|
|
|
606
607
|
def plot_asset_signals(self, feature_list,spread_column, date_intervals = False):
|
|
607
608
|
|
|
@@ -674,7 +675,9 @@ class produce_plotly_plots:
|
|
|
674
675
|
if self.save_path and self.save_aws:
|
|
675
676
|
# upload_file_to_aws(bucket = 'VIRGO_BUCKET', key = f'market_plots/{self.ticket_name}/'+result_json_name ,input_path = self.save_path+result_json_name)
|
|
676
677
|
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)
|
|
677
|
-
|
|
678
|
+
if self.return_figs:
|
|
679
|
+
return fig
|
|
680
|
+
|
|
678
681
|
def explore_states_ts(self):
|
|
679
682
|
result_json_name = 'ts_hmm.json'
|
|
680
683
|
df = self.data_frame
|
|
@@ -720,8 +723,10 @@ class produce_plotly_plots:
|
|
|
720
723
|
if self.save_path and self.save_aws:
|
|
721
724
|
# upload_file_to_aws(bucket = 'VIRGO_BUCKET', key = f'market_plots/{self.ticket_name}/'+result_json_name ,input_path = self.save_path+result_json_name)
|
|
722
725
|
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)
|
|
723
|
-
|
|
724
|
-
|
|
726
|
+
if self.return_figs:
|
|
727
|
+
return fig
|
|
728
|
+
|
|
729
|
+
def plot_hmm_analysis(self,settings, t_matrix, model = False):
|
|
725
730
|
result_json_name = 'hmm_analysis.json'
|
|
726
731
|
df = self.data_frame
|
|
727
732
|
hmm_n_clust = self.settings['settings']['hmm']['n_clusters']
|
|
@@ -744,7 +749,7 @@ class produce_plotly_plots:
|
|
|
744
749
|
|
|
745
750
|
### transition probabilities
|
|
746
751
|
row_i = 1
|
|
747
|
-
t_matrix = (hmm_model._model_impl['hmm'].transmat_)*100
|
|
752
|
+
# t_matrix = (hmm_model._model_impl['hmm'].transmat_)*100
|
|
748
753
|
fig.add_trace(go.Heatmap(z = t_matrix, text = np.round(t_matrix,2),texttemplate="%{text}",coloraxis='coloraxis'),row=row_i, col=2)
|
|
749
754
|
fig.update_xaxes(title_text='State To', row=row_i, col=2)
|
|
750
755
|
fig.update_yaxes(title_text='State From', row=row_i, col=2)
|
|
@@ -839,7 +844,9 @@ class produce_plotly_plots:
|
|
|
839
844
|
|
|
840
845
|
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)
|
|
841
846
|
upload_file_to_aws(bucket = 'VIRGO_BUCKET', key = self.save_aws + 'market_message.json', input_path = self.save_path + 'market_message.json', aws_credentials = self.aws_credentials)
|
|
842
|
-
|
|
847
|
+
|
|
848
|
+
if self.return_figs:
|
|
849
|
+
return fig, messages
|
|
843
850
|
def produce_forecasting_plot(self,predictions):
|
|
844
851
|
result_json_name = 'forecast_plot.json'
|
|
845
852
|
hmm_n_clust = self.settings['settings']['hmm']['n_clusters']
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules/src/ticketer_source.py
RENAMED
|
File without changes
|
|
File without changes
|
{virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{virgo_modules-0.0.68 → virgo_modules-0.0.69}/virgo_app/virgo_modules.egg-info/top_level.txt
RENAMED
|
File without changes
|