Quant0 commited on
Commit
2ad656a
路
verified 路
1 Parent(s): cab8011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -53,7 +53,7 @@ def parse_opciones_table(df):
53
 
54
  return df_clean
55
 
56
- def plot_opciones(df_put, df_call, spot_price):
57
 
58
  puts_itm = df_put[df_put['strike'] > spot_price]
59
  puts_otm = df_put[df_put['strike'] <= spot_price]
@@ -82,7 +82,7 @@ def plot_opciones(df_put, df_call, spot_price):
82
  ))
83
 
84
 
85
- fig.update_layout(title='Distribuci贸n de Volumen de Opciones PUT y CALL',
86
  xaxis_title='Strike',
87
  yaxis_title='Volumen',
88
  barmode='stack',
@@ -203,8 +203,8 @@ with gr.Blocks(title="An谩lisis de Opciones") as demo:
203
  inputs=[ticker_input, expiration_date, size_of_the_window],
204
  outputs=[output_df_put, output_df_call, df_put_state, df_call_state]
205
  ).then(
206
- fn=plot_opciones_con_ticker,
207
- inputs=[df_put_state, df_call_state, ticker_input],
208
  outputs=output_plot
209
  )
210
 
 
53
 
54
  return df_clean
55
 
56
+ def plot_opciones(df_put, df_call, spot_price, ticker_input, expiration_date):
57
 
58
  puts_itm = df_put[df_put['strike'] > spot_price]
59
  puts_otm = df_put[df_put['strike'] <= spot_price]
 
82
  ))
83
 
84
 
85
+ fig.update_layout(title=f"Options Volume Ditr {ticker_input}, {expiration_date}",
86
  xaxis_title='Strike',
87
  yaxis_title='Volumen',
88
  barmode='stack',
 
203
  inputs=[ticker_input, expiration_date, size_of_the_window],
204
  outputs=[output_df_put, output_df_call, df_put_state, df_call_state]
205
  ).then(
206
+ fn=plot_opciones,
207
+ inputs=[df_put_state, df_call_state, price, ticker_input, expiration_date],
208
  outputs=output_plot
209
  )
210