Skip to main content

Risk & Settings

Configure capital allocation, trading costs, and rebalancing parameters for realistic backtest results.

Capital Settings​

Initial Capital​

Starting portfolio value for the backtest.

Range: $10,000 - $10,000,000
Default: $100,000

Examples:

  • $10,000 — Small retail account
  • $100,000 — Standard testing baseline
  • $1,000,000 — Institutional or large account

💡 Tip: Use $100,000 as a baseline for comparing strategies. Percentage returns are the same regardless of capital.

Allocation Per Trade​

Percentage of capital allocated to each position.

Range: 1% - 100%
Default: 5%

How it works:

  • 5% allocation = Maximum 20 positions (100% / 5%)
  • 10% allocation = Maximum 10 positions
  • 20% allocation = Maximum 5 positions

Examples:

AllocationMax PositionsRisk LevelUse Case
2%50Very LowHighly diversified
5%20LowBalanced portfolio
10%10MediumFocused portfolio
20%5HighConcentrated bets
50%2Very HighAggressive trading

⚠️ Warning: Higher allocation = higher risk. Most strategies should use 5-10%.


Trading Costs​

Model realistic transaction costs to avoid inflated backtest results.

Commission​

Trading fees per transaction (as percentage of trade value).

Range: 0% - 5%
Default: 0.1% (10 basis points)

Common Values:

  • 0% — Zero-commission brokers (unrealistic for large orders)
  • 0.05% — Low-cost brokers ($5 per $10,000 trade)
  • 0.1% — Standard retail commission ($10 per $10,000 trade)
  • 0.5% — High-cost or international brokers

Example:

Trade Size: $10,000
Commission: 0.1%
Cost: $10 per trade ($20 round-trip)

Slippage​

Price impact and execution delay (as percentage).

Range: 0% - 5%
Default: 0.05% (5 basis points)

What is slippage?

  • Difference between expected price and actual execution price
  • Caused by market impact, delays, and liquidity

Common Values:

  • 0.01% — Highly liquid stocks (AAPL, MSFT)
  • 0.05% — Standard stocks
  • 0.1% — Less liquid stocks
  • 0.5%+ — Small-cap or illiquid stocks

💡 Tip: Use 0.1% commission + 0.05% slippage for realistic results. Total cost = 0.3% round-trip.


Rebalancing​

How often the strategy re-evaluates positions.

Rebalance Frequency​

OptionDescriptionUse Case
DailyCheck signals every dayShort-term strategies, active trading
WeeklyCheck signals once per weekSwing trading, medium-term
MonthlyCheck signals once per monthLong-term, low-turnover strategies

How it works:

  • On rebalance days, the strategy checks all entry/exit conditions
  • New positions are opened if entry conditions are met
  • Existing positions are closed if exit conditions are met

Example:

Rebalance: Daily
Date: 2024-01-15

Actions:
- Check all stocks for entry signals
- Open 3 new positions (AAPL, MSFT, GOOGL)
- Close 2 positions (TSLA, NVDA) that hit exit conditions

Choosing Rebalance Frequency​

Daily:

  • ✅ Captures short-term opportunities
  • ❌ Higher trading costs
  • Best for: Day trading, momentum strategies

Weekly:

  • ✅ Balanced approach
  • ✅ Lower costs than daily
  • Best for: Swing trading, mean reversion

Monthly:

  • ✅ Very low trading costs
  • ❌ May miss short-term signals
  • Best for: Long-term, trend-following

Default Asset (Idle Capital)​

When your strategy has no open positions, idle cash sits uninvested. You can specify a default asset (e.g., SPY, GLD, TLT) to automatically invest idle capital into.

  • The default asset is bought when all strategy positions are closed and sold when a new entry signal triggers
  • P&L from the default asset is tracked separately in your results so you can see how much return came from your strategy vs the default asset
  • Useful for rotation strategies where you want to stay invested even when no signals are active

Example: Set GLD as the default asset — when your momentum strategy has no positions, idle cash rotates into gold. When a new signal fires, GLD is sold and the proceeds fund the new trade.


Timeframe​

Data granularity for the backtest.

TimeframeDescriptionUse Case
5M5-minute barsIntraday scalping
10M10-minute barsIntraday trading
15M15-minute barsIntraday trading
30M30-minute barsIntraday swing
1H1-hour barsShort-term swing
1DDaily barsMost strategies
1WWeekly bars
1MMonthly bars

Default: 1D (Daily)

💡 Tip: Use daily (1D) timeframe for most strategies. Intraday data requires more sophisticated execution modeling.


Example Configurations​

Conservative Long-Term​

Initial Capital: $100,000
Allocation Per Trade: 5%
Commission: 0.1%
Slippage: 0.05%
Rebalance: Monthly
Timeframe: 1D

Profile: Low turnover, low costs, diversified

Aggressive Swing Trading​

Initial Capital: $50,000
Allocation Per Trade: 10%
Commission: 0.05%
Slippage: 0.05%
Rebalance: Daily
Timeframe: 1D

Profile: Active trading, higher risk, focused positions

Day Trading (Intraday)​

Initial Capital: $25,000
Allocation Per Trade: 20%
Commission: 0%
Slippage: 0.1%
Rebalance: Daily
Timeframe: 15M

Profile: High frequency, concentrated, intraday


Best Practices​

✅ Use realistic costs — Don't assume zero commission/slippage
✅ Match rebalance to strategy — Daily for short-term, monthly for long-term
✅ Start with 5% allocation — Provides good diversification
✅ Test multiple settings — See how costs impact performance

❌ Don't ignore costs — They compound over time
❌ Don't over-allocate — 50%+ per trade is extremely risky
❌ Don't use intraday data — Unless you understand execution modeling


Next Steps​


© 2026 Vaanam, Inc. All rights reserved.