QuantumLearner commited on
Commit
d9c0bcf
1 Parent(s): 52450fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -71,7 +71,7 @@ def plot_distributions(bootstrap_simulations, data, thresholds, bootstrap_probab
71
  f'P(<{thresholds[0]:.2f}): {bootstrap_probabilities["below"]:.2%}<br>' + \
72
  f'P({thresholds[0]:.2f} - {thresholds[1]:.2f}): {bootstrap_probabilities["between"]:.2%}'
73
  fig.add_annotation(xref='paper', yref='paper', x=0.98, y=0.02, text=textstr, showarrow=False,
74
- bordercolor="black", borderwidth=1, borderpad=4, bgcolor="white", opacity=0.4)
75
 
76
  fig.update_layout(title='Bootstrapping Simulation', xaxis_title='Final Price', yaxis_title='Frequency', showlegend=True)
77
  return fig, mean_bootstrap_price, median_bootstrap_price, ci_68_bootstrap, ci_95_bootstrap, latest_price
@@ -102,7 +102,7 @@ def plot_price_with_cones(data, bootstrap_percentiles, days, thresholds, bootstr
102
  f'Between {thresholds[0]} and {thresholds[1]}: {bootstrap_probabilities["between"]:.2%}<br>' + \
103
  f'Above {thresholds[1]}: {bootstrap_probabilities["above"]:.2%}'
104
  fig.add_annotation(xref='paper', yref='paper', x=0.98, y=0.02, text=textstr_bootstrap, showarrow=False,
105
- bordercolor="black", borderwidth=1, borderpad=4, bgcolor="white", opacity=0.4)
106
 
107
  fig.update_layout(title='Bootstrapping Simulation Cone', xaxis_title='Date', yaxis_title='Price', showlegend=True)
108
  fig.update_xaxes(type='date')
 
71
  f'P(<{thresholds[0]:.2f}): {bootstrap_probabilities["below"]:.2%}<br>' + \
72
  f'P({thresholds[0]:.2f} - {thresholds[1]:.2f}): {bootstrap_probabilities["between"]:.2%}'
73
  fig.add_annotation(xref='paper', yref='paper', x=0.98, y=0.02, text=textstr, showarrow=False,
74
+ bordercolor="black", borderwidth=1, borderpad=4, bgcolor="white", opacity=0.4, font=dict(color="black"))
75
 
76
  fig.update_layout(title='Bootstrapping Simulation', xaxis_title='Final Price', yaxis_title='Frequency', showlegend=True)
77
  return fig, mean_bootstrap_price, median_bootstrap_price, ci_68_bootstrap, ci_95_bootstrap, latest_price
 
102
  f'Between {thresholds[0]} and {thresholds[1]}: {bootstrap_probabilities["between"]:.2%}<br>' + \
103
  f'Above {thresholds[1]}: {bootstrap_probabilities["above"]:.2%}'
104
  fig.add_annotation(xref='paper', yref='paper', x=0.98, y=0.02, text=textstr_bootstrap, showarrow=False,
105
+ bordercolor="black", borderwidth=1, borderpad=4, bgcolor="white", opacity=0.4, font=dict(color="black"))
106
 
107
  fig.update_layout(title='Bootstrapping Simulation Cone', xaxis_title='Date', yaxis_title='Price', showlegend=True)
108
  fig.update_xaxes(type='date')