QuantumLearner commited on
Commit
76cf431
·
verified ·
1 Parent(s): 54ea77d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import pandas as pd
3
  import numpy as np
4
  import yfinance as yf
5
  import plotly.graph_objs as go
 
6
 
7
  # Set Streamlit page configuration
8
  st.set_page_config(page_title="EMA Envelope Strategy Optimization", layout="wide")
@@ -30,7 +31,7 @@ st.sidebar.title("Input Parameters")
30
  with st.sidebar.expander("Asset Settings", expanded=True):
31
  ticker = st.text_input("Asset Symbol", value="GOOGL", help="Ticker symbol (e.g., GOOGL, AAPL)")
32
  start_date = st.date_input("Start Date", value=pd.to_datetime("2020-01-01"), help="Select the start date for historical data.")
33
- end_date = st.date_input("End Date", value=pd.to_datetime("today"), help="Select the end date for historical data.")
34
 
35
  # Function to download data
36
  @st.cache_data
 
3
  import numpy as np
4
  import yfinance as yf
5
  import plotly.graph_objs as go
6
+ from datetime import datetime, timedelta
7
 
8
  # Set Streamlit page configuration
9
  st.set_page_config(page_title="EMA Envelope Strategy Optimization", layout="wide")
 
31
  with st.sidebar.expander("Asset Settings", expanded=True):
32
  ticker = st.text_input("Asset Symbol", value="GOOGL", help="Ticker symbol (e.g., GOOGL, AAPL)")
33
  start_date = st.date_input("Start Date", value=pd.to_datetime("2020-01-01"), help="Select the start date for historical data.")
34
+ end_date = st.date_input("End Date", value=pd.to_datetime("today") + pd.DateOffset(1), help="Select the end date for historical data.")
35
 
36
  # Function to download data
37
  @st.cache_data