← Back to Learn

πŸ›‘οΈ Backtest Settings Guide

Master the configuration options that control your trading simulations and risk management

Backtest settings are the control panel for your trading simulations. They determine how much capital you start with, which stocks you trade, how long you test for, and most importantly, how risk is managed throughout the simulation. Think of backtesting as a flight simulator for tradingβ€” the settings you choose determine how realistic that simulation is.

Initial Equity

Your starting capitalβ€”the amount of money the simulation begins with. This is the foundation of your entire backtest.

Minimum
$1,000
Default
$100,000
Recommended Range
$10K – $1M

Lower Equity ($1K–$10K)

Smaller position sizes, commissions have bigger impact, harder to diversify. More realistic for small personal accounts.

Higher Equity ($100K+)

Larger positions possible, better diversification, commissions matter less. Good for testing institutional-scale strategies.

Important: Initial equity affects absolute dollar profits/losses and position sizing calculations, but percentage returns remain the same regardless of starting amount.

Backtest Period

The time range your backtest runs overβ€”when it starts and when it ends. This determines which market conditions your strategy will face.

Short (3–6 months)

  • β€’ Fast to run
  • β€’ May miss different market conditions
  • β€’ Good for quick iteration

Medium (1–2 years)

  • β€’ Captures some market cycles
  • β€’ Balances speed and validity
  • β€’ Good for most testing

Long (3+ years)

  • β€’ Captures multiple market regimes
  • β€’ More statistically significant
  • β€’ Best for final validation

Best Practices

Include at least one major market event in your test period:

2020 COVID crash
2022 Bear market
2018 Trade war
2008 Financial crisis

Portfolio Symbols

The universe of stocks your strategies can trade. Think of this as your "shopping list" of available investments.

1–5
Few Symbols
Concentrated exposure
10–20
Moderate
Good diversification
30+
Many Symbols
Broad opportunities

Warning: You must have market data downloaded for all symbols in your portfolio for the backtest period. If data is missing, the engine will skip those symbols, which can skew results.

Risk Settings

Risk settings are the safety controls for your backtest. They determine how much you can lose before stopping, when to take profits, and how large positions can be. These are the most impactful settings for protecting your simulated capital.

Master Switch: Enable Backtest constraints to activate all risk controls

1. Configuration

Position sizing limitsβ€”the guardrails that prevent any single trade from blowing up your account

Max Position Size

Maximum % of portfolio in a single position

Default: 20%

Max Symbol Exposure

Maximum total exposure to any single symbol

Default: 30%

Max Drawdown

Maximum loss from peak before stopping

Default: 20%

Risk Level Guidelines

Conservative
≀15% position / ≀25% exposure / ≀15% drawdown
Moderate
15–25% position / 25–35% exposure / 15–25% drawdown
Aggressive
>25% position / >35% exposure / >25% drawdown

2. Exit Rules

Automatic position closuresβ€”your safety net for when things go right or wrong

Stop Loss

Automatically exit when position loses this percentage

Default: -10%

Take Profit

Automatically exit when position gains this percentage

Default: +20%

Max Holding Period

Maximum days to hold regardless of performance

Default: 30 days

Min Holding Period

Minimum days before strategy exits allowed

Default: 3 days

Early Exit Threshold

Min profit % of take profit allowing early exit

Default: 80% of TP

3. Partial Profit Taking

Gradually close portions of winning positions at predetermined profit levels

Define profit thresholds where you close a percentage of the position. This captures profits along the way while maintaining exposure for further upside.

Profit LevelClose %RemainingResult
+10%30%70%Take some profit early
+20%30%40%More profit locked in
+30%40%0%Full exit at strong profit

Benefits: Captures profits along the way, reduces risk as position grows, lets winners run with remaining position, smooths equity curve

4. Partial Stop Loss

Similar to partial profit taking, but for managing losing positions

Define loss thresholds where you close a percentage of the position, reducing exposure before the full stop loss hits.

Loss LevelClose %RemainingResult
-5%25%75%Trim position early
-10%35%40%Further reduction
-15%40%0%Full exit if keeps falling

Pros: Smaller losses, smoother equity curve, reduces damage from bad positions

Cons: More complex, may exit prematurely on volatile stocks

5. Margin Trading

Use leverage to control larger positions than your cash balance allows

1.0x – 1.5x

Conservative

Cash only or minimal leverage. Good for capital preservation.

1.5x – 2.5x

Moderate

Standard leverage. Balances opportunity with risk.

2.5x+

Aggressive

High leverage. Amplifies both returns and risks.

How Position Sizing Works

  1. Calculate current leverage: Total exposure Γ· Equity
  2. Find available capacity: (Target Leverage βˆ’ Current Leverage) Γ— Equity
  3. Apply constraints: Take the smallest of leverage capacity, max position size, and max symbol exposure
  4. Size the position: Multiply by signal strength (0-1) to get final position size

Important Limitation

The backtest does not simulate margin interest costs. In real trading, you pay 5–7% annually on borrowed capital. Your actual returns will be lower than backtest results when using leverage.

Quick Reference Table

SettingDefaultRangeUse When…
Initial Equity$100,000$1,000+Testing realistic capital levels
Max Position Size20%1–100%Bigger bets on high conviction
Max Symbol Exposure30%1–100%Adding to winners over time
Max Drawdown20%1–100%Trend strategies with natural drawdowns
Stop Loss10%0–100%Volatile markets, capital preservation
Take Profit20%0–100%Range-bound markets, consistent gains
Max Holding Days301–365Long-term trend following
Min Holding Days30–365Reducing over-trading
Early Exit Threshold0.80–1Capturing gains quickly
Max Leverage2.0x1–10xConfident in strong trends

Recommended Configurations by Strategy Type

Conservative Long-Term

Equity$50K–$500K
Period3–5 years
Symbols20–50
Max Position10–15%
Stop Loss15–20%
MarginOFF

Active Swing Trading

Equity$25K–$100K
Period1–2 years
Symbols10–20
Max Position20–25%
Stop Loss8–12%
Margin1.5–2x

Aggressive Momentum

Equity$10K–$50K
Period1–2 years
Symbols5–15
Max Position25–30%
Stop Loss10–15%
Margin2–3x

Final Tips

1

Start Conservative

Begin with tighter risk limits. Once you have a working strategy, gradually relax them to optimize.

2

Match to Strategy

Trend-following needs wider stops and longer holding periods than mean-reversion.

3

Test Sensitivity

Run the same strategy with different risk settings to see which ones actually improve results.

4

Keep Risk Management ON

Even in testing, you want to know if your strategy survives, not just if it makes money in perfect conditions.

5

Watch the Leverage

Remember the backtest doesn't charge margin interest. Subtract 5–7% annually from leveraged results for realism.

Happy backtesting! May your drawdowns be shallow and your trends be long.