Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -260,7 +260,7 @@ with market_analysis:
|
|
| 260 |
|
| 261 |
with news_analysis:
|
| 262 |
st.header("News Analysis")
|
| 263 |
-
st.write("This module provides news impact for the following day based on the current date.")
|
| 264 |
|
| 265 |
# Load data
|
| 266 |
data_file_path = r"Events_SameDay.csv" # Update this with your file path
|
|
@@ -293,7 +293,7 @@ with news_analysis:
|
|
| 293 |
# hoverlabel=dict(font=dict(color=events
|
| 294 |
# ['FeatureSentiment'].apply(lambda x: 'red' if x == 'Negative' else 'blue' if x == 'Neutral' else 'green'))), # Customize the line style, color, and width
|
| 295 |
)
|
| 296 |
-
title = 'OGDCL Close Price
|
| 297 |
layout = go.Layout(
|
| 298 |
title=title,
|
| 299 |
xaxis=dict(
|
|
@@ -304,7 +304,7 @@ with news_analysis:
|
|
| 304 |
# tickvals=list(range(dateA, dateB, 3)),
|
| 305 |
),
|
| 306 |
yaxis=dict(
|
| 307 |
-
title='
|
| 308 |
# gridcolor='lightgray',
|
| 309 |
range=[90, 120],
|
| 310 |
tickvals=list(range(90, 120, 5)),
|
|
@@ -314,10 +314,10 @@ with news_analysis:
|
|
| 314 |
# Add all traces to the figure
|
| 315 |
figure = go.Figure(data=[line_stock], layout=layout)
|
| 316 |
figure.add_scatter(x=plot_sub_pos['Date'], y=plot_sub_pos['Price'], mode='markers',
|
| 317 |
-
marker=dict(symbol='triangle-up', size=10, color=cs.pos_impacts_color), name='
|
| 318 |
customdata=events['Feature'], hovertemplate='%{x}<br>Close: %{y}<br>Feature: %{customdata}<br>')
|
| 319 |
figure.add_scatter(x=plot_sub_neg['Date'], y=plot_sub_neg['Price'], mode='markers',
|
| 320 |
-
marker=dict(symbol='triangle-down', size=10, color=cs.neg_impacts_color), name='
|
| 321 |
customdata=events['Feature'], hovertemplate='%{x}<br>Close: %{y}<br>Feature: %{customdata}<br>',)
|
| 322 |
figure.update_layout(
|
| 323 |
title={
|
|
|
|
| 260 |
|
| 261 |
with news_analysis:
|
| 262 |
st.header("News Analysis")
|
| 263 |
+
st.write("This module provides news based event impact for the following day based on the current date.")
|
| 264 |
|
| 265 |
# Load data
|
| 266 |
data_file_path = r"Events_SameDay.csv" # Update this with your file path
|
|
|
|
| 293 |
# hoverlabel=dict(font=dict(color=events
|
| 294 |
# ['FeatureSentiment'].apply(lambda x: 'red' if x == 'Negative' else 'blue' if x == 'Neutral' else 'green'))), # Customize the line style, color, and width
|
| 295 |
)
|
| 296 |
+
title = 'OGDCL Close Price vs News Impact'
|
| 297 |
layout = go.Layout(
|
| 298 |
title=title,
|
| 299 |
xaxis=dict(
|
|
|
|
| 304 |
# tickvals=list(range(dateA, dateB, 3)),
|
| 305 |
),
|
| 306 |
yaxis=dict(
|
| 307 |
+
title='Price in Rs.',
|
| 308 |
# gridcolor='lightgray',
|
| 309 |
range=[90, 120],
|
| 310 |
tickvals=list(range(90, 120, 5)),
|
|
|
|
| 314 |
# Add all traces to the figure
|
| 315 |
figure = go.Figure(data=[line_stock], layout=layout)
|
| 316 |
figure.add_scatter(x=plot_sub_pos['Date'], y=plot_sub_pos['Price'], mode='markers',
|
| 317 |
+
marker=dict(symbol='triangle-up', size=10, color=cs.pos_impacts_color), name='Positive Impact',
|
| 318 |
customdata=events['Feature'], hovertemplate='%{x}<br>Close: %{y}<br>Feature: %{customdata}<br>')
|
| 319 |
figure.add_scatter(x=plot_sub_neg['Date'], y=plot_sub_neg['Price'], mode='markers',
|
| 320 |
+
marker=dict(symbol='triangle-down', size=10, color=cs.neg_impacts_color), name='Negative Impact',
|
| 321 |
customdata=events['Feature'], hovertemplate='%{x}<br>Close: %{y}<br>Feature: %{customdata}<br>',)
|
| 322 |
figure.update_layout(
|
| 323 |
title={
|