The PREVIOUS strategy is a simple trend-following approach that assumes recent market outcomes will continue. When a new KXBTC15M market opens, it places a bet on the same side (YES or NO) that won in the previous market.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DeweyMarco/simple-kalshi-bot/llms.txt
Use this file to discover all available pages before exploring further.
Strategy Logic
The strategy operates on a straightforward hypothesis: if Bitcoin’s price moved up (or down) in the last 15-minute window, it’s likely to continue in the same direction for the next window.Signal Generation
Detect Market Rollover
When the bot detects a new market has opened, it marks the previous market ticker for signal generation.
Wait for Settlement
The strategy waits for the previous market to settle and determine whether YES or NO won.
Implementation
Here’s the core implementation frombot.py:
Settlement Detection
The bot determines which side won by checking the market result:Configuration
| Parameter | Default | Description |
|---|---|---|
STAKE_USD | 5.0 | Fixed amount to bet on each trade |
POLL_SECONDS | 5 | How often to check for new markets |
The PREVIOUS strategy uses fixed position sizing - it always stakes exactly
$5.00 regardless of price or market conditions.Risk Characteristics
Advantages
Simplicity: Easy to understand and debug Low Latency: Executes immediately when previous market settles Trend Capture: Performs well during sustained directional movesLimitations
Mean Reversion: Loses money when trends reverse No Price Filter: Will pay any price for the signal No Risk Management: Fixed stake regardless of bankroll or drawdownsWhen to Use
This strategy works best in:- Trending markets: When Bitcoin price shows sustained directional movement
- High momentum environments: During periods of strong buying or selling pressure
- Testing and baseline: As a benchmark to compare more sophisticated strategies against
PREVIOUS_2 Variant
The PREVIOUS_2 variant adds a price filter:Performance Monitoring
The bot outputs real-time P&L for PREVIOUS strategy:P:$+2.50= PREVIOUS strategy cumulative profit/loss- Strategy positions are tracked in
data/mock_trades.csv
Example Trade Flow
Market KXBTC15M-A settles at YES
Bitcoin price increased during the 15-minute window. PREVIOUS records this signal.
Execute trade
PREVIOUS buys YES side on KXBTC15M-B at current ask price ($0.53).
- Stake: $5.00
- Contracts: 9.43 (= 0.53)
Related Strategies
MOMENTUM Strategy
Uses actual BTC price movement instead of market results
CONSENSUS Strategy
Combines PREVIOUS with MOMENTUM for higher conviction