Portfolio

Tick data validation

A quality script counting gaps, incomplete and duplicate candles, comparing two sources and reporting before any backtest runs.

MT5 Professional trader Kaveh Mehrabi Quant analyst

Project specifications

Project specifications

Market
XAUUSD
TF
M1
Platform
MT5
Client type
Professional trader
Delivery window
6 weeks
Stack
MQL5, Python scripts, data from two sources
Strategy
Historical data quality control
Modules
Gap report + missing-hour detection
Testing
Two data sources compared

Who this was for

Kaveh Mehrabi

Role
Quant analyst
City
Mashhad
Project reference
TBT-1409-34
Trade flow

The client's idea

Kaveh Mehrabi works XAUUSD on M1; the opening brief was: Before any decision, tell me how trustworthy my backtest data actually is.

Initial challenge

The gold backtest had been built on incomplete data: hourly gaps and duplicate candles flattered the statistics.

Solution

A quality script counting gaps, incomplete and duplicate candles, comparing two sources and reporting before any backtest runs.

Why this design

The data check now runs before the backtest so no result is built on suspect data. It matches how XAUUSD is actually traded and can be tested against the data already available.

Safeguards and risk control

No parameter was optimized on the whole set: part of the data was held back for out-of-sample testing.

Our next-step proposal

The next step is running the selected build on demo and reviewing weekly deviation from the test.

Portfolio

Measured results

These are the figures the test produced — not a promise about future performance.

  • 2.4 M Bars in the test set
  • 11 scenarios Scenario test coverage
  • 3 years Test window
  • 6 Defects fixed

Portfolio

How the delivery ran

Every project moves through these five phases, with the window for each agreed in the specification.

  1. Discovery and problem framing

    Completed

    Reviewing the client's current test method and the quality of the available XAUUSD data.

    Day 2–4

  2. Written specification

    Completed

    Fixing the assumptions: spread, commission, slippage and the tick model used.

    Day 5–11

  3. Implementation

    Completed

    Preparing the test environment, the run scripts and results that can be compared.

    Day 12–23

  4. Testing and validation

    Completed

    Controlled optimization, out-of-sample testing and forward testing on fresh data.

    Day 24–31

  5. Handover and support

    Completed

    A report separating the optimized part from the robust part, plus the remaining risks.

    Day 32–35