Spaces:
Running
Running
Commit
•
7dba1d1
1
Parent(s):
d9c0bcf
Update app.py
Browse files
app.py
CHANGED
@@ -67,6 +67,10 @@ def plot_distributions(bootstrap_simulations, data, thresholds, bootstrap_probab
|
|
67 |
fig.add_annotation(x=median_bootstrap_price, y=median_y_pos, text=f'Median: {median_bootstrap_price:.2f}', showarrow=False)
|
68 |
fig.add_annotation(x=latest_price, y=latest_y_pos, text=f'Latest: {latest_price:.2f}', showarrow=False)
|
69 |
|
|
|
|
|
|
|
|
|
70 |
textstr = f'P(>{thresholds[1]:.2f}): {bootstrap_probabilities["above"]:.2%}<br>' + \
|
71 |
f'P(<{thresholds[0]:.2f}): {bootstrap_probabilities["below"]:.2%}<br>' + \
|
72 |
f'P({thresholds[0]:.2f} - {thresholds[1]:.2f}): {bootstrap_probabilities["between"]:.2%}'
|
|
|
67 |
fig.add_annotation(x=median_bootstrap_price, y=median_y_pos, text=f'Median: {median_bootstrap_price:.2f}', showarrow=False)
|
68 |
fig.add_annotation(x=latest_price, y=latest_y_pos, text=f'Latest: {latest_price:.2f}', showarrow=False)
|
69 |
|
70 |
+
fig.add_vline(x=mean_bootstrap_price, line=dict(color='red', dash='dash'), name='Mean', showlegend=True)
|
71 |
+
fig.add_vline(x=median_bootstrap_price, line=dict(color='orange', dash='dash'), name='Median', showlegend=True)
|
72 |
+
fig.add_vline(x=latest_price, line=dict(color='green', dash='dash'), name='Latest Price', showlegend=True)
|
73 |
+
|
74 |
textstr = f'P(>{thresholds[1]:.2f}): {bootstrap_probabilities["above"]:.2%}<br>' + \
|
75 |
f'P(<{thresholds[0]:.2f}): {bootstrap_probabilities["below"]:.2%}<br>' + \
|
76 |
f'P({thresholds[0]:.2f} - {thresholds[1]:.2f}): {bootstrap_probabilities["between"]:.2%}'
|