Overview
The Simple Kalshi Bot implements 7 distinct paper trading strategies that operate simultaneously on Bitcoin prediction markets. Each strategy uses different signals and risk parameters.Strategy Functions
All strategies are implemented inbot.py within the main trading loop. This page documents the strategy logic and parameters.
1. PREVIOUS Strategy
Logic: Buy the same side (yes/no) as the previous market’s settled result. Hypothesis: Market outcomes show short-term autocorrelation (momentum carries across markets). Parameters:- Stake:
STAKE_USD($5 default) - Entry: Immediate on market change
- Exit: Market settlement
2. MOMENTUM Strategy
Logic: Buy based on BTC price direction over the last 60 seconds. Hypothesis: Short-term Bitcoin price momentum predicts the next 15-minute market outcome. Parameters:- Stake:
STAKE_USD($5 default) - Lookback:
MOMENTUM_WINDOW_SECONDS(60s) - Signal:
- BTC price rising → Buy YES (price will be higher)
- BTC price falling → Buy NO (price will be lower)
3. CONSENSUS Strategy
Logic: Only trade when PREVIOUS and MOMENTUM signals agree. Includes full risk management. Hypothesis: Combined signals reduce noise and improve edge. Parameters:- Bankroll:
INITIAL_BANKROLL_USD(env var, default $500) - Risk per trade:
CONSENSUS_RISK_PCT(env var, default 1%) - Max risk per trade:
CONSENSUS_MAX_RISK_PCT(default 2%) - Max price:
CONSENSUS_MAX_PRICE(default $0.55) - Daily loss cap:
CONSENSUS_DAILY_LOSS_CAP_R* R (default 3R) - Weekly loss cap:
CONSENSUS_WEEKLY_LOSS_CAP_R* R (default 8R) - Rolling window:
CONSENSUS_ROLLING_WINDOWtrades (default 30)
- Price Filter: Skip if ask price >
CONSENSUS_MAX_PRICE - Bankroll Check: Bankroll = initial + realized P&L
- Loss Caps: Stop trading if daily/weekly loss exceeds caps
- Win Rate Filter: Skip if rolling win rate < break-even rate
- Position Sizing: Stake = min(risk%, max_risk%, available_cash)
4. MOMENTUM_15 Strategy
Logic: Buy based on BTC price direction over 15 minutes instead of 60 seconds. Hypothesis: Longer timeframe momentum may have better signal quality. Parameters:- Stake:
STAKE_USD($5) - Lookback:
MOMENTUM_15_WINDOW_SECONDS(900s = 15 min) - Signal: Same as MOMENTUM but longer window
5. PREVIOUS_2 Strategy
Logic: Wait for PREVIOUS signal side to reach a good price (≤ $0.45). Hypothesis: Being patient for better prices improves edge. Parameters:- Stake:
STAKE_USD($5) - Max price:
DEAL_MAX_PRICE($0.45) - Signal: PREVIOUS result
6. CONSENSUS_2 Strategy
Logic: Combination of CONSENSUS risk management + PREVIOUS_2 price waiting. Hypothesis: Best of both worlds - signal quality and price discipline. Parameters:- All CONSENSUS risk management rules
- Max price:
DEAL_MAX_PRICE($0.45) - Signal: PREVIOUS + MOMENTUM agreement
7. ARBITRAGE Strategy
Logic: Two-legged arbitrage using synthetic straddle. Hypothesis: Market inefficiencies create risk-free profit opportunities. Parameters:- First leg stake:
STAKE_USD($5) - Max bet for hedge:
ARBITRAGE_MAX_BET_USD($10) - Minimum edge: > 0 (yes_ask + no_ask < 1.00)
- First Leg: Buy cheaper side immediately (yes or no)
- Wait for Edge: Monitor opposite side price
- Hedge Leg: If
yes_ask + no_ask < 1.00, buy opposite side - Guaranteed Profit: Win on one side, locked in edge
Strategy Performance Tracking
All strategies record trades to CSV with these fields:Comparing Strategies
Usecalc_stats() to compare performance:
Risk Management Best Practices
The CONSENSUS strategies implement comprehensive risk management:- Price Limits: Never overpay (max 0.45)
- Bankroll Tracking: Dynamic position sizing based on realized P&L
- Loss Caps: Stop trading after daily/weekly drawdown limits
- Win Rate Monitoring: Pause if underperforming vs break-even
- Position Limits: Cap contracts to prevent oversized bets
- Fee Accounting: Track and subtract fees from profit