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

@@ -520,6 +520,53 @@ def produce_dashboard(data, columns , ticket_list, show_plot = True, nrows = 150
520
520
  # upload_file_to_aws(bucket = 'VIRGO_BUCKET', key = f'multi_dashboards/'+save_name+'.json',input_path = save_path+save_name+'.json')
521
521
  upload_file_to_aws(bucket = 'VIRGO_BUCKET', key = save_aws + save_name + '.json', input_path = save_path + save_name + '.json', aws_credentials = aws_credential)
522
522
 
523
+ def produce_edges_dashboard(dataframe, ticket_list, save_name, show_plot = False, save_path = False, save_aws = False, aws_credentials = False):
524
+ '''
525
+ produce dashboard using signals and list of assets
526
+
527
+ Parameters:
528
+ dataframe (pd.Dataframe): base data
529
+ ticket_list (list): list of assets
530
+ save_name (str): dashboad name resulting file
531
+ show_plot (boolean): if true, display plot
532
+ save_path (str): local path for saving e.g r'C:/path/to/the/file/'
533
+ save_aws (str): remote key in s3 bucket path e.g. 'path/to/file/'
534
+ aws_credential (dict): aws credentials
535
+
536
+ Returns:
537
+ None
538
+ '''
539
+ n_assets = len(ticket_list)
540
+
541
+ result_json_name = save_name
542
+ cols_length = 4
543
+ rows_length = math.ceil(n_assets/2)
544
+
545
+ subtitles = list()
546
+ for x in ticket_list:
547
+ subtitles.append(x)
548
+ subtitles.append(x + ' signal')
549
+
550
+ fig = make_subplots(rows=rows_length, cols=cols_length,vertical_spacing = 0.01, horizontal_spacing = 0.03, shared_xaxes=True, subplot_titles = subtitles)
551
+
552
+ for i,ticket in enumerate(ticket_list):
553
+ j = i%2*2 +1
554
+ i = i+1
555
+ i_r = math.ceil(i/2)
556
+
557
+ show_legend = True if i == 1 else False
558
+
559
+ df = dataframe[dataframe.asset == ticket]
560
+ fig.add_trace(go.Scatter(x=df['Date'], y=df['Close'],legendgroup="Close",showlegend = show_legend , mode='lines',name = 'Close', marker_color = 'blue'),col = j, row = i_r)
561
+ fig.add_trace(go.Scatter(x=df['Date'], y=df['proba_target_up'],legendgroup="proba",showlegend = show_legend , mode='lines',name = 'proba_target_up', marker_color = 'orange'),col = j+1, row = i_r)
562
+ fig.update_layout(height=rows_length*300, width=1500, title_text = f'dashboard top {n_assets} tickets')
563
+
564
+ if save_path:
565
+ fig.write_json(save_path+result_json_name)
566
+ if show_plot:
567
+ fig.show()
568
+ if save_path and save_aws:
569
+ upload_file_to_aws(bucket = 'VIRGO_BUCKET', key = save_aws + result_json_name, input_path = save_path + result_json_name, aws_credentials = aws_credentials)
523
570
 
524
571
  def rank_by_return(data, lag_days, top_n = 5):
525
572
  '''
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: virgo-modules
3
- Version: 0.0.78
3
+ Version: 0.0.79
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
@@ -3,10 +3,10 @@ virgo_modules/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
3
3
  virgo_modules/src/aws_utils.py,sha256=q0l7D7ofo09Lu1QQjv-esheQ06uiSy1Pdq3xMul8zvk,2571
4
4
  virgo_modules/src/edge_utils.py,sha256=ll5pRs9EE20IsE5A1vA589TKzobkeA-b0d68jNTsu1U,13268
5
5
  virgo_modules/src/pull_artifacts.py,sha256=5OPrgR7pcMSdpbevDRhf0ebk7g7ZRjff4NpTIIWAKjE,1989
6
- virgo_modules/src/re_utils.py,sha256=1nECCNs5Y0jhKfR1X2iYPCq2dB2TY7TuG9I-iDC4EhY,67272
6
+ virgo_modules/src/re_utils.py,sha256=Af2ktNS-Z3Pdnp5tUAq-3N6mr0MWMd3gfsY1lPYvQe0,69517
7
7
  virgo_modules/src/ticketer_source.py,sha256=4J0y51Tv0dGzFU7qZarGBIJSFsFWfY_NDNWZI6VN2Ws,142729
8
- virgo_modules-0.0.78.dist-info/LICENSE,sha256=pNgFyCYgmimaw0o6V20JupZLROycAnOA_HDDh1tX2V4,1097
9
- virgo_modules-0.0.78.dist-info/METADATA,sha256=6FLuFG4Cu7PJzIGNRn5zwoProYuPR_qTch741pmGE_A,1429
10
- virgo_modules-0.0.78.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
11
- virgo_modules-0.0.78.dist-info/top_level.txt,sha256=ZjI-qEkDtT-8mFwGAWnXfqPOKEGlIhWRW1es1VyXc60,14
12
- virgo_modules-0.0.78.dist-info/RECORD,,
8
+ virgo_modules-0.0.79.dist-info/LICENSE,sha256=pNgFyCYgmimaw0o6V20JupZLROycAnOA_HDDh1tX2V4,1097
9
+ virgo_modules-0.0.79.dist-info/METADATA,sha256=OcsRxZIrV4o_tqiJ4Gb49UN4Z2iU9rlTJPc_a3I16S0,1429
10
+ virgo_modules-0.0.79.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
11
+ virgo_modules-0.0.79.dist-info/top_level.txt,sha256=ZjI-qEkDtT-8mFwGAWnXfqPOKEGlIhWRW1es1VyXc60,14
12
+ virgo_modules-0.0.79.dist-info/RECORD,,