Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,9 +55,8 @@ with st.sidebar.expander("Input Parameters", expanded=True):
|
|
| 55 |
ticker = st.text_input('Enter Stock Ticker', 'SAP.DE', help="Enter the stock symbol for the analysis.")
|
| 56 |
|
| 57 |
# Date range selection
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
end_date = st.date_input('End Date', pd.to_datetime(datetime.today() + timedelta(days=1)), help="Select the end date for historical data (default is today + 1 day).")
|
| 61 |
|
| 62 |
# Fetch data to set default values
|
| 63 |
if 'data' not in st.session_state:
|
|
@@ -70,13 +69,12 @@ with st.sidebar.expander("Input Parameters", expanded=True):
|
|
| 70 |
default_down_target = default_initial_price - 10
|
| 71 |
|
| 72 |
# Analysis parameters
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
down_target = st.number_input('Down Target', value=default_down_target, help="Enter the target price for a downward move.")
|
| 78 |
|
| 79 |
-
#
|
| 80 |
with st.sidebar.expander("How to Use", expanded=True):
|
| 81 |
st.markdown("""
|
| 82 |
### How to Use
|
|
|
|
| 55 |
ticker = st.text_input('Enter Stock Ticker', 'SAP.DE', help="Enter the stock symbol for the analysis.")
|
| 56 |
|
| 57 |
# Date range selection
|
| 58 |
+
start_date = st.date_input('Start Date', pd.to_datetime('2020-01-01'), help="Select the start date for historical data.")
|
| 59 |
+
end_date = st.date_input('End Date', pd.to_datetime(datetime.today() + timedelta(days=1)), help="Select the end date for historical data (default is today + 1 day).")
|
|
|
|
| 60 |
|
| 61 |
# Fetch data to set default values
|
| 62 |
if 'data' not in st.session_state:
|
|
|
|
| 69 |
default_down_target = default_initial_price - 10
|
| 70 |
|
| 71 |
# Analysis parameters
|
| 72 |
+
n_days = st.slider('Number of Days', min_value=1, max_value=100, value=30, step=1, help="Number of days over which to calculate the percentage change.")
|
| 73 |
+
initial_price = st.number_input('Initial Price', value=default_initial_price, help="Enter the initial price for the analysis.")
|
| 74 |
+
up_target = st.number_input('Up Target', value=default_up_target, help="Enter the target price for an upward move.")
|
| 75 |
+
down_target = st.number_input('Down Target', value=default_down_target, help="Enter the target price for a downward move.")
|
|
|
|
| 76 |
|
| 77 |
+
# Instructions in sidebar
|
| 78 |
with st.sidebar.expander("How to Use", expanded=True):
|
| 79 |
st.markdown("""
|
| 80 |
### How to Use
|