Running Your First Backtest

From Setup to Results in Quanthop

Step-by-step guide to running your first backtest in Quanthop — choosing a strategy, configuring settings, and reading the results dashboard.

12 minBeginner

What You Need Before You Start

A backtest is a historical simulation. You give the engine a strategy, point it at historical market data, and it tells you what would have happened — every entry, every exit, every drawdown.

Before you click anything, you need to decide three things: which market you want to test, how far back you want to look, and which strategy you want to run. Everything else is configuration detail.

For your first backtest, keep it simple. Pick a liquid market like BTCUSDT, use a common timeframe like the daily or 4-hour chart, and choose a built-in strategy. The goal is not to find a winning strategy on the first try — it's to understand what the platform gives you back and how to read it.

Choosing a Strategy

Quanthop is built around the idea that you own your strategy code. The platform provides a set of templates — ready-made strategies that you can clone, modify, and build from — but the real power is writing your own logic in QSL (Quanthop Strategy Language). Templates are starting points, not black boxes.

For a first run, clone the EMA Cross template. It's a trend-following strategy that goes long when a fast exponential moving average crosses above a slow one, and exits when it crosses back below. The logic is intuitive, the code is readable, and the results are easy to reason about.

You'll also find templates like RSI Mean Reversion (buys oversold conditions, sells overbought), MACD Momentum, and TDR Advanced (a multi-factor system). Each has its own parameter set that you can adjust. For now, clone a template and use the defaults — you can edit the code later once you understand the workflow.

Select Strategy
EMA CrossTrend
Fast/slow EMA crossover
RSI Mean ReversionMean Reversion
Oversold buy, overbought sell
MACD MomentumMomentum
MACD signal line crossover
TDR AdvancedMulti-Factor
Flagship multi-indicator system
Bollinger BreakoutVolatility
Band expansion breakout entries
Built-in strategies available in Quanthop. Select one to configure its parameters.

Configuring the Backtest

The configuration panel is where you define the scope of the test. Every setting feeds into the simulation engine, and understanding what each one controls will help you design more meaningful experiments.

Market

Market
ModeSingleBaseline
SymbolBTCUSDT Change
Interval1 Day Change
Select an asset and candle interval. Switch to Baseline mode to test across multiple assets at once.

The market section determines which data the engine runs against. You select an asset (such as BTCUSDT or ETHUSDT) and an interval — the candle size for the simulation. A 1-day interval produces one candle per day; a 4-hour interval produces six. Shorter intervals generate more signals but also more noise.

You can run a backtest on a single asset, or switch to Baseline mode to test the same strategy across a pack of assets simultaneously. Baseline mode is useful for checking whether a strategy's behaviour generalises — or whether it only works on one market.

Data Range

Data Range
ModeDateCandle
Evaluate a fixed sample size
Candle 1Candle 2,000
Aug 17, 17Feb 6, 23
3,140 total2,000 selected
5001k2k5kAll
Choose a date range or a fixed candle count. More data means more trades and more statistical confidence.

Data range controls how much history the engine processes. You can set this by date (explicit start and end) or by candle count using the slider. More data means more trades, which means more statistical confidence in the results. For daily candles, at least a thousand candles is a reasonable starting point. The preset buttons (500, 1k, 2k, 5k, All) make it easy to select common sample sizes.

Portfolio

Portfolio
Capital10000 USDT
DirectionLong-only Change
Buy low, sell high only
ObjectiveSharpe Ratio Change
Set starting capital, trading direction, and the metric to optimise for.

Portfolio settings define the simulation's starting conditions. Capital is the initial balance the engine works with — the default of 10,000 USDT is fine for most tests, since percentage returns are what matter, not dollar amounts. Direction controls whether the strategy is long-only (buy low, sell high) or can also take short positions. Objective sets the metric the engine optimises for when running parameter sweeps — Sharpe Ratio is the default and generally the most useful.

Allocation

Allocation (optional)
Profits are reinvested, increasing position sizes over time.
Control how profits are handled between trades: compound, fixed, or capped.

Allocation determines how profits are handled across trades. Reinvest profits means the engine compounds returns — each new trade uses the full portfolio value including previous gains. Fixed capital uses the same position size every trade regardless of accumulated profit. Capped is a middle ground: compounding with a ceiling to limit exposure. For a first test, reinvest (the default) is fine.

Fees & Safety Constraints

Fees & Safety Constraints (optional)
FEES
Trading Fee0.1%
SAFETY CONSTRAINTS
Overrides may affect comparability with previous runs
Max Loss Per TradeNone
Profit TargetNone
Trailing ProtectionDisabled
Slippage (per fill)0.1%
Trading fee, stop-loss, take-profit, trailing stops, and simulated slippage.

The trading fee is applied on every entry and exit. The default of 0.1% matches the standard fee on most major exchanges. This is a small number per trade, but it compounds across dozens or hundreds of trades and can significantly impact net results — which is exactly why it's included in the simulation.

Safety constraints let you override the strategy's built-in risk rules for a specific run. You can set a max loss per trade (stop-loss), a profit target (take-profit), and trailing protection that locks in gains as a trade moves in your favour. Slippage simulates the price difference between your intended fill and the actual execution — real markets are never perfectly liquid. These are optional, and you can leave them on the strategy defaults for your first run.

Running the Test

Once your configuration is set, click Run Backtest. The engine processes every candle in your date range, evaluating the strategy's rules at each bar.

Behind the scenes, the engine computes all indicators defined in the strategy (moving averages, RSI, MACD — whatever the strategy requires), then checks entry and exit conditions on every candle. When conditions are met, it simulates a trade: opening a position at the next available price, tracking it through the holding period, and closing it when the exit signal fires or a stop is hit.

The result is a complete trade log — every position the strategy would have taken, with exact entry and exit prices, timestamps, and profit or loss. This log is the raw material for everything you'll look at next.

Running Backtest
BTCUSDT · 1D · EMA Cross
Loading candle data...
7% · 812 candles
The engine processes every candle, computing indicators and evaluating rules at each bar.

Reading the Results

The results dashboard is where the backtest comes to life. Rather than a single summary, the platform breaks the analysis into eight distinct cards — each one answering a different question about the strategy's behaviour.

The Metrics card is the quantitative core: payoff ratio, profit factor, trade count, win rate, Sharpe ratio, and expectancy. These numbers tell you whether the strategy has a statistical edge, how efficiently it converts risk into return, and how many trades produced the result.

The Behaviour card goes beyond raw numbers and characterises the strategy's profile — whether returns come from a few large winners, steady small gains, or something in between. It also rates consistency: whether performance was stable across the tested period or concentrated in a single regime.

Trade Structure shows where the profit actually comes from. A "Concentrated Winner Profile" means a small fraction of trades drove most of the gains — common in trend-following strategies. Exposure maps when the strategy was in the market and when it was flat, revealing how much opportunity it captures and how long positions are held.

Regimes breaks the test period into volatility and trend categories. If 90% of your profit came during trending markets and the test period happened to be 80% trending, that's important context. Drawdown shows the worst peak-to-trough decline, how long recovery took, and the recovery factor.

The Drawdown Envelope runs a Monte Carlo simulation — shuffling trade order a thousand times to show whether your observed drawdown was lucky, unlucky, or typical. And the Parameters card displays the current configuration with a validation stage badge: Exploratory means the results haven't been confirmed through Walk-Forward Analysis yet.

On the right, the Score panel distils everything into a single grade out of 100, broken into four sub-scores: profitability, risk management, consistency, and robustness. This is a starting point for comparison, not a final verdict — but it gives you an immediate sense of where a strategy stands.

Each of these cards deserves deeper explanation, and the full dashboard is covered in detail in the Understanding Backtest Results article. For now, focus on reading the dashboard as a whole: a strong result is one where multiple cards tell a consistent story, not one where a single headline number looks good in isolation.

BACKTESTBTCUSDT · 1d · Completed 3/17/2026
ResultsTradesChartMonte CarloEditor
Metrics
Structure & Edge
Payoff2.6x
Profit Factor2.13
Trade Characteristics
Trades31
Win Rate45%
Risk-Adjusted
Sharpe (ann.)0.83
Expectancy$9.3k
Historical return: +2870.0%
Behaviour
Strong Edge Profile
Primary Drivers
Large winners dominate outcomes
Positive expectancy observed
Losses are capped relative to wins
Consistency: Stable within tested period
Trade Structure
Concentrated Winner Profile
Wins (14)Losses (17)
Characteristics
Top 20% trades: 91% of gains
Payoff ratio: 2.6x
Median duration: 33d
Profit driven by a subset of large winning trades.
Exposure
Position-Holding Exposure
StartEnd
Characteristics
Long-only (31 trades)
Avg duration: 52d
Max gap: 214d
Holds long positions through extended periods.
Regimes
Volatility Distribution
Low 45%High 37%Medium 19%
Trend Structure
Trending 55%Ranging 24%Transition 21%
No single regime dominates the tested period.
Drawdown
Depth38.7%
Duration
Longest986d
Median recovery233d
Recovery factor74.1x
Deep drawdowns observed; recovery supported by asymmetric payoff.
Drawdown Envelope
Observed vs Simulated
Actual drawdown: 21.3%
Observed Drawdown Position
48th percentile
P5: 8.1%P95: 72.4%
1,000 randomized trade orderings
Observed drawdown is consistent with expected sequencing variation.
Parameters
Exploratory
Not yet validated
Current Configuration
Fast Length20
Slow Length40
Performance at this stage does not imply robustness.
The results dashboard: eight analysis cards covering metrics, behaviour, trade structure, exposure, regimes, drawdown, Monte Carlo envelope, and parameters.

What the Results Don't Tell You

A single backtest on a single asset over a single time period is a starting point, not a conclusion. Good numbers here do not mean the strategy works. They mean it worked in this specific context.

Before you draw any conclusions, you need to ask harder questions. Does it work on other assets? Does it survive different market regimes — trending, sideways, volatile? Do the results hold up if you change the parameters slightly? If changing the moving average period from 20 to 22 cuts the return in half, the original result was fragile.

The next steps are where the real validation begins: testing across multiple symbols, running parameter optimization with Walk-Forward Analysis, and stress-testing with Monte Carlo simulation. Each of these is covered in its own article in this series.

Related articles

Browse all learning paths