Backtest

Disclaimer: Trading involves significant financial risk and can result in substantial losses. Past performance does not guarantee future results. SageMaster does not provide financial advice. Users should ensure compliance with local regulations.

Written By Ehsaan XP

Last updated 7 months ago

Backtesting allows traders to simulate how a strategy would have performed in the past. This guide walks you through how to launch a backtest, interpret your results, compare variations, and use those learnings to improve performance—all while keeping in mind that backtesting is a simulation, not a prediction.

⚠️ Backtest results are based on historical data and should be used for learning and validation—not as guarantees of future performance.


🔰 What Is Backtesting?

Backtesting simulates trades using past price data and predefined logic. It helps answer: Would this strategy have worked? By testing entry and exit rules, money management, and market selection, you can get insights into performance before putting real capital at risk.

You’ll gain metrics like:

  • Total and average profit

  • Drawdowns

  • Win rate and expectancy

  • Trade-by-trade behavior

This process helps traders refine strategies, reduce risk, and boost confidence.

🚀 Step-by-Step: Launching a Backtest

You can start a backtest in three ways: from a provider preset, via Strategy, or from scratch.

📌 1. From a Provider Preset

  • Go to Marketplace → Providers

  • Select a provider and browse available Presets

  • Click Backtest to launch with prefilled logic and settings

📌 2. Strategy

If you're using an assisted strategy configuration:

  • Navigate to a Strategy card

  • Click the Backtest button

  • A modal opens with auto-filled fields, including:

    • Name, Description, Trigger Conditions

    • Trade Provider

    • Money Management, Currency Pairs

    • Stop Loss / Take Profit

    • Order behavior and more

This gives you a fast starting point with sensible defaults based on historical idea patterns.

📌 3. From Scratch

To configure a test manually:

  • Go to the Backtest Page

  • Click New Backtest

  • Fill in all required fields:

    • Select provider and trading pairs

    • Define trade triggers

    • Adjust order, SL/TP, leverage, and money management rules

  • Click Backtest to launch the simulation

🧠 Starting from scratch is useful when testing unique or customized strategies not covered by presets or Strategy.

Once you launch the test, a progress screen will appear and guide you through the simulation in phases.


📊 Understanding the Results

When your test completes, you'll land on the Backtest Results Page, which contains detailed metrics and visualizations organized into four tabs:

📌 Overview Tab

Shows top-level KPIs:

  • Total PnL (%)

  • Avg. Daily Profit (%)

  • Max Drawdown (%)

  • CAGR (Annualized Return)

  • Backtest Period

Charts:

  • Cumulative Gain over time

  • Asset-wise Profit Contribution

  • Trade Idea frequency by market

📌 Order Statistics Tab

Breakdown of order-level data:

  • Absolute Profit ($)

  • Win Rate (%)

  • Total Orders

  • Profit Factor: Ratio of gross profit to gross loss

  • Expectancy: Average return per trade

  • Sharpe Ratio

  • Min / Max Balance

📌 Performance Tab

Shows how the account evolved:

  • Initial & Final Balance

  • Best & Worst Trade

  • Best & Worst Trading Pair

  • Winning, Losing, Draw Days

This gives context on volatility and trade-level variability across time.

📌 Trades Tab

Displays each individual trade with:

  • Entry & Exit timestamps

  • Position type (long/short)

  • PnL (Profit/Loss) per trade

  • Price levels

  • Pair traded

This is where you audit the logic and verify how trade ideas are translated into actions.

📈 Use this tab to pinpoint whether losses came from poor triggers, wide stops, or unsuitable pairs.


🧪 Comparing Two Backtest Versions

To illustrate how a single change affects outcomes, let's compare two versions of the same strategy where only the Partial Close Level was modified:

⚙️ Backtest A – Partial Close at 60 Pips

Insights:

  • The performance is moderately positive, showing gradual growth with a relatively low drawdown, indicating a conservative risk profile.

  • Short trades clearly outperformed longs—both in win rate and profit.

  • Long side had more trades but generated losses, reducing overall expectancy and PnL.

  • Short side had fewer trades but higher quality, showing a stronger and more stable trigger.

  • The strategy spent most days either neutral or slightly in profit/loss, implying low-frequency signals or longer trade durations.

⚙️ Backtest B – Partial Close at 30 Pips

Insights:

  • The result shows minimal profit with strong capital preservation. It’s a very low-risk, low-return strategy with consistent but modest outcomes.

  • Short trades remain a profitable and reliable component.

  • Long trades continue to underperform and pull down overall expectancy.

  • Expectancy is negative for longs, meaning losses outweigh gains per trade on average.

  • Consistent with the last test: many positive days, relatively few deep losses, and a fair number of neutral periods.


💡 Tips for Better Backtesting

Tip

Why It Matters

Start with a preset

Ensures proven logic and reduces config errors

Tweak one variable at a time

Makes results easier to interpret

Extend your date range

More trades = more reliable data

Watch expectancy & drawdown

Not just total PnL or WinRate

Check “no trade” cases

Could indicate logic isn’t triggering entries


🔄 Managing and Editing Backtests

Backtests are automatically saved to your Backtest History Table, where each test includes:

  • Name

  • Pairs traded

  • Initial / Final Balance

  • PnL

  • Timestamp

  • Actions: View, Edit, Delete

📌 Clone or Rerun Strategies

Use the "Copy Backtest" feature to make variations of an existing test and see how small changes affect performance.

📌 Create a Strategy from a Backtest

Once you’ve validated a configuration that works well, you can create a Strategy directly from your backtest report using the tested settings.


🎯 Final Thoughts

Backtesting is your first line of defense against flawed strategies and false assumptions. It allows you to trial ideas safely, compare setups, and build confidence using market data. Just remember—backtests are simulations. They cannot guarantee future success, especially in fast-changing markets.

Use this tool wisely, explore multiple variations, and lean on performance patterns to evolve smarter trading logic.