mgbam commited on
Commit
2713d3a
·
verified ·
1 Parent(s): 8cba972

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,6 +25,7 @@ This app demonstrates an extended MACD-RSI based trading strategy on SPY with th
25
 
26
  # Sidebar for Strategy Parameters
27
  st.sidebar.header("Strategy Parameters")
 
28
  buy_fraction = st.sidebar.slider("Buy Fraction (of available cash)", 0.05, 0.50, 0.15, 0.05)
29
  sell_fraction = st.sidebar.slider("Partial Sell Fraction", 0.10, 0.90, 0.40, 0.05)
30
  target_multiplier = st.sidebar.slider("Target Multiplier", 1.01, 1.20, 1.08, 0.01)
@@ -64,7 +65,6 @@ data['Buy'] = False
64
  data['Sell'] = False
65
 
66
  # Backtesting parameters
67
- initial_capital = 100000
68
  cash = initial_capital
69
  equity_curve = []
70
  last_buy_date = None
 
25
 
26
  # Sidebar for Strategy Parameters
27
  st.sidebar.header("Strategy Parameters")
28
+ initial_capital = st.sidebar.number_input("Initial Capital ($)", min_value=1000, max_value=1000000, value=100000, step=1000)
29
  buy_fraction = st.sidebar.slider("Buy Fraction (of available cash)", 0.05, 0.50, 0.15, 0.05)
30
  sell_fraction = st.sidebar.slider("Partial Sell Fraction", 0.10, 0.90, 0.40, 0.05)
31
  target_multiplier = st.sidebar.slider("Target Multiplier", 1.01, 1.20, 1.08, 0.01)
 
65
  data['Sell'] = False
66
 
67
  # Backtesting parameters
 
68
  cash = initial_capital
69
  equity_curve = []
70
  last_buy_date = None