Skip to main content

Trade Configuration Guide

This guide provides detailed explanations of trade configuration parameters and how to set them optimally for your backtesting needs.

Overview

Trade configuration determines how your backtest simulates real-world trading conditions, including:

  • Starting capital
  • Trading fees
  • Market impact (slippage)
  • Risk management (stop loss and take profit)

Setting these parameters realistically is crucial for accurate backtest results.


Initial Balance

What It Is

The amount of capital you start with in the simulation, always denominated in the quote asset of your trading pair.

Understanding Quote Asset

The quote asset is the second currency in a trading pair:

  • BTC/USDT → Quote asset is USDT
  • ETH/BTC → Quote asset is BTC
  • LTC/IDR → Quote asset is IDR
  • SOL/EUR → Quote asset is EUR

How to Set It

Match Your Real Capital

If you plan to trade with $5,000:
└─ Set Initial Balance: 5000 (for USDT pairs)

For Testing Different Scales

  • Small account: 1,000 - 5,000
  • Medium account: 10,000 - 50,000
  • Large account: 100,000+

Why It Matters

Percentage Returns

  • Returns are calculated as percentages, so balance size shouldn't affect return %
  • A 20% gain is 20% whether starting with $1,000 or $100,000

Fee Impact

  • Smaller balances mean fees take a larger percentage of each trade
  • Example: $10 fee on $1,000 trade = 1%, but on $100,000 trade = 0.01%

Position Sizing

  • Some strategies use position sizing based on account equity
  • Initial balance affects how many units you can buy
Account SizePurposeInitial Balance
Conservative TestingTest with safe amount1,000 - 5,000
Realistic SimulationMatch planned deploymentActual capital amount
Aggressive TestingTest scalability50,000 - 100,000

Taker Fee

What It Is

The fee charged by the exchange for each trade execution, expressed as a decimal (e.g., 0.1% = 0.001).

Market Maker vs Taker

Taker (applies to most strategies):

  • Takes liquidity from the order book
  • Executes immediately at market price
  • Higher fees
  • This is what you should set

Maker (rarely used in automated strategies):

  • Adds liquidity to the order book
  • Requires limit orders that aren't immediately filled
  • Lower fees

Fee Structures by Exchange

Binance

TierBNB DiscountStandard Taker Fee
VIP 0No0.1% (0.001)
VIP 0Yes0.075% (0.00075)
VIP 1No0.09% (0.0009)
VIP 1Yes0.0675% (0.000675)

How to check: Binance Fee Schedule

Coinbase Pro

  • Standard: 0.5% (0.005)
  • With volume discounts: 0.35% - 0.05%

Kraken

  • Standard: 0.26% (0.0026)
  • With volume: 0.20% - 0.10%

Indodax

  • Standard: 0.3% (0.003)

How to Find Your Fee

  1. Log into your exchange
  2. Navigate to "Fees" or "Fee Schedule"
  3. Check your current tier (based on trading volume)
  4. Note the taker fee percentage
  5. Convert to decimal:
    0.1% → 0.001
    0.075% → 0.00075
    0.25% → 0.0025

Impact on Results

Example Scenario: 100 trades, average trade size $1,000

With 0.1% fee (0.001):
├─ Fee per trade: $1 (buy) + $1 (sell) = $2
├─ Total fees: 100 × $2 = $200
└─ Impact on $10,000 account: -2%

With 0.5% fee (0.005):
├─ Fee per trade: $5 (buy) + $5 (sell) = $10
├─ Total fees: 100 × $10 = $1,000
└─ Impact on $10,000 account: -10%

Key insight: Higher fees significantly erode profits, especially for high-frequency strategies.

ExchangeVIP LevelRecommended Fee
BinanceRegular0.001 (0.1%)
BinanceWith BNB0.00075 (0.075%)
CoinbaseStandard0.005 (0.5%)
KrakenStandard0.0026 (0.26%)
IndodaxStandard0.003 (0.3%)

Best practice: Use your actual fee tier for accurate results.


Slippage

What It Is

The difference between the expected price and the actual execution price, caused by market dynamics.

Why Slippage Occurs

1. Order Book Depth

Example Order Book:
Sell Orders:
├─ $50,100 × 0.5 BTC
├─ $50,080 × 1.2 BTC
└─ $50,050 × 0.3 BTC ← Best ask

Your order: Buy 1.5 BTC
Expected: $50,050
Actual: Weighted average of $50,050, $50,080, and part of $50,100
Slippage: ~$25-30 per BTC

2. Market Volatility

  • High volatility = wider spreads
  • Prices move quickly between order placement and execution

3. Order Size

  • Larger orders consume more of the order book
  • Must pay progressively worse prices

4. Liquidity

  • Low liquidity markets have wider spreads
  • Less trading volume = more slippage

How to Set Slippage

Conservative (Low Slippage)

Assets: BTC, ETH (high liquidity)
Timeframes: 1h, 4h, 1d
Order Size: <1% of daily volume
Recommended: 0.05% - 0.1% (0.0005 - 0.001)

Moderate (Medium Slippage)

Assets: Top 20 cryptocurrencies
Timeframes: 15m, 30m, 1h
Order Size: 1-5% of daily volume
Recommended: 0.1% - 0.2% (0.001 - 0.002)

Aggressive (High Slippage)

Assets: Altcoins, low-cap tokens
Timeframes: 1m, 5m (high frequency)
Order Size: >5% of daily volume
Recommended: 0.2% - 0.5% (0.002 - 0.005)

Calculation Example

Buy Order:
├─ Expected price: $50,000
├─ Slippage: 0.1% (0.001)
├─ Actual execution: $50,000 × 1.001 = $50,050
└─ Extra cost: $50 per BTC

Sell Order:
├─ Expected price: $52,000
├─ Slippage: 0.1% (0.001)
├─ Actual execution: $52,000 × 0.999 = $51,948
└─ Cost: $52 per BTC

Total slippage cost per trade cycle: ~$100

Market-Specific Recommendations

Market TypeExampleRecommended Slippage
High LiquidityBTC/USDT on Binance0.05% - 0.1%
Medium LiquidityMajor altcoins0.1% - 0.2%
Low LiquiditySmall-cap tokens0.3% - 0.5%
StablecoinsUSDT/USDC0.01% - 0.03%

Testing Strategy

Run multiple backtests with different slippage:

Test 1: 0.05% slippage → See best-case scenario
Test 2: 0.15% slippage → See realistic scenario
Test 3: 0.30% slippage → See worst-case scenario

If your strategy is profitable across all three, it's more robust.


Stop Loss

What It Is

An automatic exit trigger that closes your position when the price moves against you by a specified percentage.

Why Use Stop Loss

1. Capital Preservation

Without Stop Loss:
└─ Position can lose 100% if price crashes

With 5% Stop Loss:
└─ Maximum loss per trade: 5% of position size

2. Emotional Protection

  • Removes need for manual decision during losses
  • Prevents "hoping" price will recover
  • Forces disciplined risk management

3. Catastrophic Loss Prevention

Scenario: Flash crash drops BTC from $50,000 to $35,000

Without stop loss:
└─ Loss: -30% ($5,000 → $3,500)

With 10% stop loss:
└─ Loss: -10% ($5,000 → $4,500)
└─ Saved: $1,000 (20% of capital)

How to Set Stop Loss Percentage

Conservative (Tight)

Range: 2% - 5%
Best for:
├─ Low volatility assets
├─ Short-term trading (scalping)
├─ Risk-averse traders
└─ Volatile markets (protects against big moves)

Drawbacks:
└─ May get stopped out frequently on normal volatility

Moderate (Balanced)

Range: 5% - 10%
Best for:
├─ Medium-term swing trading
├─ Balanced risk tolerance
└─ Most cryptocurrencies

Drawbacks:
└─ Allows for larger losses before exit

Aggressive (Wide)

Range: 10% - 20%
Best for:
├─ Long-term position trading
├─ High conviction trades
├─ Trend-following strategies
└─ Giving trades "room to breathe"

Drawbacks:
└─ Can suffer large losses before triggering

Calculation Method

From Entry Price:

Entry: Buy BTC at $50,000
Stop Loss: 5%
Trigger: $50,000 × (1 - 0.05) = $47,500

If BTC drops to $47,500 → Position automatically closed

Timeframe Considerations

TimeframeTypical VolatilityRecommended Stop Loss
1m - 5mVery high (2-3% moves)1% - 3%
15m - 1hHigh (3-5% moves)3% - 5%
4h - 1dModerate (5-10% moves)5% - 10%
1w+Lower (10-20% moves)10% - 20%

Rule of thumb: Stop loss should be wider than average price noise for your timeframe.

Advanced Technique: ATR-Based Stop Loss

Instead of fixed percentage, use Average True Range (ATR):

Stop Loss = Entry Price - (ATR × Multiplier)

Example:
├─ Entry: $50,000
├─ ATR (14): $2,000
├─ Multiplier: 2
└─ Stop: $50,000 - ($2,000 × 2) = $46,000

Benefits:

  • Adapts to current market volatility
  • Tighter in calm markets, wider in volatile markets

Take Profit

What It Is

An automatic exit trigger that closes your position when you've achieved a specified profit percentage.

Why Use Take Profit

1. Lock in Gains

Without Take Profit:
├─ Gain unrealized gains
└─ Risk giving back profits on reversal

With Take Profit:
├─ Automatically secure profits
└─ Remove emotional decision-making

2. Systematic Approach

  • Prevents greed from holding too long
  • Enforces consistent profit targets
  • Reduces regret from missed exits

3. Favorable Risk/Reward

Stop Loss: 5%
Take Profit: 15%
Risk/Reward: 1:3

Meaning: Risking $500 to make $1,500

How to Set Take Profit Percentage

Conservative (Quick Profits)

Range: 3% - 8%
Best for:
├─ Scalping strategies
├─ Mean-reversion strategies
├─ Volatile, choppy markets
└─ High win-rate strategies

Characteristics:
└─ More frequent profit-taking, smaller gains

Moderate (Balanced)

Range: 8% - 15%
Best for:
├─ Swing trading
├─ Most automated strategies
└─ Balanced approach

Characteristics:
└─ Reasonable targets with good probability

Aggressive (Large Profits)

Range: 15% - 30%+
Best for:
├─ Trend-following strategies
├─ Strong directional bias
├─ Patient traders
└─ Low win-rate, high reward strategies

Characteristics:
└─ Fewer wins but much larger when they hit

Risk-Reward Ratios

Recommended minimum: 1:1.5 (risk $100 to make $150)

Common ratios:

Strategy TypeStop LossTake ProfitRatio
Scalping2%3%1:1.5
Mean Reversion5%10%1:2
Swing Trading7%15%1:2.1
Trend Following10%30%1:3

Example calculation:

Stop Loss: 5% ($500 risk)
Desired Risk/Reward: 1:2
Take Profit: 5% × 2 = 10% ($1,000 gain)

Should You Use Take Profit?

Use Take Profit when:

  • ✅ Strategy has clear profit targets
  • ✅ Testing mean-reversion approaches
  • ✅ Want to automate exit discipline
  • ✅ Trading range-bound markets

Skip Take Profit when:

  • ❌ Strategy is trend-following (let winners run)
  • ❌ Using trailing stops instead
  • ❌ Strategy has its own exit signals
  • ❌ Strong directional bias

Alternative: Trailing Stop

Instead of fixed take profit, use a trailing stop:

Position: BTC bought at $50,000
Trailing Stop: 5%

Price moves to $55,000:
├─ New stop: $55,000 × 0.95 = $52,250
└─ Locked in profit: $2,250 (4.5%)

Price moves to $60,000:
├─ New stop: $60,000 × 0.95 = $57,000
└─ Locked in profit: $7,000 (14%)

Benefits: Lets profits run while protecting gains.

Note: Kelor's backtester currently uses fixed take profit. Trailing stops can be implemented in custom strategies.


Optimal Configuration Examples

Conservative Day Trading

Initial Balance: 5,000 USDT
Taker Fee: 0.075% (Binance with BNB)
Slippage: 0.1%
Stop Loss: ✅ Enabled (3%)
Take Profit: ✅ Enabled (5%)

Risk/Reward: 1:1.67
Expected: High win rate needed (>60%)

Moderate Swing Trading

Initial Balance: 10,000 USDT
Taker Fee: 0.1%
Slippage: 0.15%
Stop Loss: ✅ Enabled (7%)
Take Profit: ✅ Enabled (15%)

Risk/Reward: 1:2.14
Expected: Balanced approach

Aggressive Trend Following

Initial Balance: 20,000 USDT
Taker Fee: 0.1%
Slippage: 0.2%
Stop Loss: ✅ Enabled (10%)
Take Profit: ❌ Disabled (let trends run)

Risk/Reward: Variable (use trailing stops)
Expected: Lower win rate, larger wins

High-Frequency Scalping

Initial Balance: 50,000 USDT
Taker Fee: 0.05% (VIP tier)
Slippage: 0.05%
Stop Loss: ✅ Enabled (1%)
Take Profit: ✅ Enabled (2%)

Risk/Reward: 1:2
Expected: Very high win rate needed (>70%)

Configuration Checklist

Before running your backtest, verify:

  • ✅ Initial balance matches your planned deployment size
  • ✅ Taker fee reflects your actual exchange tier
  • ✅ Slippage is appropriate for asset liquidity
  • ✅ Stop loss is enabled (highly recommended)
  • ✅ Stop loss % is wider than typical price noise
  • ✅ Take profit creates favorable risk/reward (>1:1.5)
  • ✅ All percentages are entered as decimals (5% = 0.05)

Common Mistakes

❌ Unrealistic Fee Settings

Problem: Using 0% or very low fees that don't reflect reality Impact: Backtest shows profit, but live trading loses money Solution: Use actual exchange fees from your account tier

❌ Zero Slippage

Problem: Assuming perfect price execution Impact: Overestimates profitability, especially for high-frequency strategies Solution: Always include realistic slippage (minimum 0.05%)

❌ Stop Loss Too Tight

Problem: Stop loss smaller than normal volatility Impact: Getting stopped out constantly, death by 1000 cuts Solution: Analyze typical price swings for your timeframe, set stop wider

❌ Poor Risk/Reward Ratio

Problem: Stop loss 10%, take profit 5% Impact: Need >66% win rate just to break even Solution: Take profit should be at least 1.5x stop loss

❌ Ignoring Trading Costs

Problem: Not accounting for fees and slippage Impact: Strategy shows 2% per trade, but costs eat 1.5%, leaving only 0.5% Solution: Always factor in total costs (fee × 2 + slippage × 2)


Summary

Proper trade configuration is essential for realistic backtesting:

  1. Set Initial Balance to match planned deployment
  2. Use Real Fees from your exchange tier
  3. Include Slippage based on asset liquidity
  4. Enable Stop Loss to protect capital (recommended 5-10%)
  5. Set Take Profit for favorable risk/reward (optional)

Remember: Conservative settings produce more realistic results. It's better to be pleasantly surprised in live trading than disappointed after using optimistic backtest settings.