Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,17 +10,17 @@ st.set_page_config(page_title="EMA Envelope Strategy Optimization", layout="wide
|
|
| 10 |
# Title and Description
|
| 11 |
st.title("EMA Envelope Strategy Optimization")
|
| 12 |
st.write("""
|
| 13 |
-
This tool
|
| 14 |
The EMA envelope strategy uses the concept of an envelope, a channel created around the EMA based on a percentage distance from the average.
|
| 15 |
The strategy generates buy signals when the price breaks below the lower envelope and sell signals when the price rises above the upper envelope.
|
| 16 |
-
The parameters controlling the strategy include the
|
| 17 |
You can run a grid search to find the best parameters and adjust all parameters post-run to see how they affect buy/sell signals and the equity curve.
|
| 18 |
""")
|
| 19 |
|
| 20 |
# Sidebar: How to use the app
|
| 21 |
with st.sidebar.expander("How to Use", expanded=False):
|
| 22 |
st.write("""
|
| 23 |
-
1. **Select Ticker**: Choose the asset
|
| 24 |
2. **Run Strategy**: Click "Run Strategy" to perform optimization.
|
| 25 |
3. **Adjust Parameters**: After running the strategy, you can adjust the moving average windows, envelope settings, and threshold to see updated results live.
|
| 26 |
""")
|
|
@@ -29,7 +29,7 @@ st.sidebar.title("Input Parameters")
|
|
| 29 |
|
| 30 |
# Sidebar: Select Ticker and Date Range
|
| 31 |
with st.sidebar.expander("Select Ticker and Date Range", expanded=True):
|
| 32 |
-
ticker = st.text_input("Asset Symbol", value="GOOGL", help="
|
| 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"), help="Select the end date for historical data.")
|
| 35 |
|
|
|
|
| 10 |
# Title and Description
|
| 11 |
st.title("EMA Envelope Strategy Optimization")
|
| 12 |
st.write("""
|
| 13 |
+
This tool backtests and optimizes an Exponential Moving Average envelope strategy.
|
| 14 |
The EMA envelope strategy uses the concept of an envelope, a channel created around the EMA based on a percentage distance from the average.
|
| 15 |
The strategy generates buy signals when the price breaks below the lower envelope and sell signals when the price rises above the upper envelope.
|
| 16 |
+
The parameters controlling the strategy include the Average True Range lookback, the percentage width of the envelope, and a threshold multiplier for the envelope's sensitivity.
|
| 17 |
You can run a grid search to find the best parameters and adjust all parameters post-run to see how they affect buy/sell signals and the equity curve.
|
| 18 |
""")
|
| 19 |
|
| 20 |
# Sidebar: How to use the app
|
| 21 |
with st.sidebar.expander("How to Use", expanded=False):
|
| 22 |
st.write("""
|
| 23 |
+
1. **Select Ticker**: Choose the asset symbol (e.g., AAPL, BTC-USD) and date range for historical data.
|
| 24 |
2. **Run Strategy**: Click "Run Strategy" to perform optimization.
|
| 25 |
3. **Adjust Parameters**: After running the strategy, you can adjust the moving average windows, envelope settings, and threshold to see updated results live.
|
| 26 |
""")
|
|
|
|
| 29 |
|
| 30 |
# Sidebar: Select Ticker and Date Range
|
| 31 |
with st.sidebar.expander("Select Ticker and Date Range", expanded=True):
|
| 32 |
+
ticker = st.text_input("Asset Symbol", value="GOOGL", help="Asset symbol (e.g., GOOGL, BTC-USD)")
|
| 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"), help="Select the end date for historical data.")
|
| 35 |
|