Running a Backtest
This guide walks you through the process of running a backtest on Kelor.
Starting a Backtest
1. Navigate to a Strategy
When you click on any strategy in your dashboard, you'll be taken to the strategy detail page. This page shows:
- Strategy description and configuration
- Previous backtest results (if any)
- Performance metrics
At the top right of the page, you'll find two buttons:
- Backtest: Run a new backtest
- Deploy: Deploy the strategy for live trading
Click the Backtest button to begin.
Backtest Configuration
Step 1: Select Market and Timeframe
First, specify where you want to hypothetically deploy this strategy. You need to configure:
Exchange Source
Select the exchange where you want to simulate trading:
- Binance: Global cryptocurrency exchange
- Indodax: Indonesian cryptocurrency exchange
- Huobi: Global exchange with high liquidity
- And other supported exchanges
Trading Pair
Choose the cryptocurrency pair to trade:
BTC/USDT- Bitcoin against Tether (USDT)ETH/USDT- Ethereum against TetherLTC/IDR- Litecoin against Indonesian Rupiah- And many more pairs
Note: The quote asset (second currency) determines your starting balance currency. For
BTC/USDT, your balance is in USDT.
Timeframe
Select the candle timeframe for your strategy:
1m- 1 minute candles5m- 5 minute candles15m- 15 minute candles1h- 1 hour candles4h- 4 hour candles1d- 1 day candles1w- 1 week candles
Tip: Shorter timeframes mean more trades and data points, but also more noise. Longer timeframes are smoother but provide fewer trading opportunities.
Time Range
Set the historical period for backtesting:
- Start Date: When to begin the simulation
- End Date: When to end the simulation
Recommendation: Test across different market conditions - include both bull markets and bear markets for realistic results.
Step 2: Strategy Configuration
Each strategy preset has unique parameters you can customize. For example:
Williams %R Strategy
- Period: Number of candles to calculate the indicator (default: 14)
- Oversold Level: When to generate buy signals (default: -80)
- Overbought Level: When to generate sell signals (default: -20)
RSI Strategy
- RSI Period: Calculation period (default: 14)
- Oversold Threshold: Buy when RSI is below this (default: 30)
- Overbought Threshold: Sell when RSI is above this (default: 70)
Starting Tip: If you're unsure about parameters, start with the default values and tweak them later based on results.
Step 3: Trade Configuration
Configure how the backtest simulates trading:
Initial Balance
- What it is: Your starting capital for the simulation
- Currency: Always in the quote asset of your pair
- For
BTC/USDT→ Balance is in USDT - For
ETH/BTC→ Balance is in BTC - For
LTC/IDR→ Balance is in IDR
- For
Example: If testing
BTC/USDTwith 10,000 initial balance, you start with 10,000 USDT.
Taker Fee
- What it is: The fee charged per transaction
- Where to find it: Check your exchange's fee structure
- Different exchanges have different fees
- VIP users may get discounts
- Holding exchange tokens can reduce fees
Default: Usually 0.1% (0.001) for most exchanges
Slippage
-
What it is: The difference between expected and executed price
-
Why it matters: You can't always get the exact price you want due to:
- Market volatility
- Order book depth
- Liquidity constraints
- Large order sizes
-
How it works: If you want to buy at $50,000 with 0.1% slippage:
- Actual execution: $50,050 (0.1% higher)
- This simulates real-world price impact
Recommended: 0.05% - 0.2% depending on market liquidity
Stop Loss
Enable Stop Loss: ✅ Recommended
Stop loss automatically exits your position if the price moves against you by a certain percentage.
Why use it?
- Risk Management: Limits potential losses
- Prevents Catastrophic Losses: Protects against sudden market crashes
- Emotional Control: Removes the need for manual decision-making during losses
Stop Loss Percentage
- What it is: How far the price can move against you before auto-exit
- Example:
- You buy BTC at $50,000
- Stop loss: 5%
- Exit trigger: $47,500 (5% below entry)
Recommended: 3-10% depending on your risk tolerance and market volatility
Take Profit
Enable Take Profit: Optional
Take profit automatically exits your position when you've gained a certain percentage.
Why use it?
- Lock in Gains: Secure profits before reversals
- Discipline: Prevents greed from holding too long
- Systematic: Removes emotional decision-making
Take Profit Percentage
- What it is: Target gain before auto-exit
- Example:
- You buy BTC at $50,000
- Take profit: 10%
- Exit trigger: $55,000 (10% above entry)
Recommended: 5-20% depending on your strategy and timeframe
Review and Create
After configuring all parameters:
- Review Your Settings: Double-check all configurations
- Click "Create Backtest": This starts the simulation
- Redirected to Backtest Runner: Watch your strategy in action
Example Configuration
Here's a typical backtest setup for a conservative strategy:
Market Configuration:
├─ Exchange: Binance
├─ Pair: BTC/USDT
├─ Timeframe: 1d (daily candles)
└─ Time Range: 2023-01-01 to 2024-12-31
Strategy Configuration:
├─ Strategy: RSI
├─ RSI Period: 14
├─ Oversold: 30
└─ Overbought: 70
Trade Configuration:
├─ Initial Balance: 10,000 USDT
├─ Taker Fee: 0.1%
├─ Slippage: 0.1%
├─ Stop Loss: ✅ Enabled (5%)
└─ Take Profit: ✅ Enabled (10%)
Next Steps
Once you click "Create Backtest", you'll be taken to the Backtest Runner where you can watch your strategy execute against historical data.