Overview
Every trade a systematic or discretionary trader makes generates data. The entry time, the entry price, the instrument, the direction, the stop loss, the target, the actual exit, the duration, the P&L. Across hundreds or thousands of trades, this data contains the patterns that determine whether the strategy is working as intended, where the edge is strongest, where it is weakest, and what operational factors — execution timing, position sizing consistency, trade management quality — are enhancing or degrading the strategy's theoretical performance.
Most traders review their trading performance at the aggregate level — total return, win rate, profit factor, maximum drawdown. These metrics are necessary but not sufficient. A strategy with a 55% win rate and a 1.5:1 reward-to-risk ratio may look reasonable in aggregate but contain a long streak of losses during the European session, a consistent pattern of stops being triggered by volatile opens before the trade direction is proven correct, a position sizing inconsistency that reduces position sizes when confidence is highest, or a trade management behaviour that exits winners too early while letting losers run. None of these patterns are visible in the aggregate statistics. They are visible in the disaggregated analysis of the trade history.
Trading data analysis is the analytical process that extracts these patterns from the trade history — decomposing performance into its components, identifying the conditions under which the strategy's edge is present and absent, quantifying the contribution of execution quality to overall performance, and producing the actionable insights that strategy improvement and operational optimisation depend on.
We build custom trading data analysis systems and tools for systematic traders, trading firms, and portfolio managers who need to analyse their trading history with the depth and rigour that meaningful strategy improvement requires.
What Trading Data Analysis Covers
Trade data consolidation and cleaning. Analysis starts from clean, complete trade data. Trade data consolidation aggregates trade records from every source — broker statements, MetaTrader history exports, exchange trade histories, execution reports — into a unified trade database with consistent field definitions, consistent timestamp handling, and the instrument identifiers that allow trades across different brokers and venues to be analysed together.
Data cleaning handles the inconsistencies that raw trade data contains: duplicate records where the same trade appears multiple times from different sources, orphaned half-roundtrips where only the opening or closing leg is recorded, incorrect trade classifications where a closing trade is recorded as a new opening, and timestamp inconsistencies where the same event is recorded with different timestamps from different systems.
Position reconstruction: some trade data sources record individual order fills rather than complete roundtrip positions. Position reconstruction matches opening and closing fills to reconstruct the complete position record — the entry, the exit, and the duration — for each trade, handling partial closures, scale-ins, and rollovers correctly.
Performance decomposition. The disaggregation of aggregate performance metrics into the components that reveal where the strategy's edge is concentrated and where it is not.
Instrument analysis: performance broken down by currency pair, by stock, by futures contract, or by whatever instrument dimension is relevant to the strategy. Win rate, average win, average loss, and profit factor for each instrument. Instruments that are contributing positively to aggregate performance versus instruments that are a drag. The instrument-level analysis that identifies whether the strategy's edge is instrument-specific or general.
Time analysis: performance broken down by time dimension — by time of day, by trading session (Asian, London, New York), by day of week, by month, by year. The session where performance is consistently positive versus the session where performance is consistently negative. The time-of-day pattern that reveals when the strategy's edge is strongest. The seasonality analysis that identifies whether certain months or market periods are systematically better or worse for the strategy.
Market regime analysis: performance across different market conditions — trending versus ranging, high volatility versus low volatility, risk-on versus risk-off. The regime classification that assigns each historical trade to the market regime in effect at the time, and the performance decomposition by regime that shows whether the strategy's edge is conditional on specific market conditions.
Signal quality analysis: for strategies with defined entry signals, the analysis of performance by signal strength. Does the strategy perform better when the signal is stronger? Is there a threshold below which signal strength produces no edge? Signal quality analysis that characterises the signal-performance relationship and guides the signal filter design that improves strategy robustness.
Trade statistics and distributions. The detailed statistical characterisation of the strategy's trade outcomes.
Return distribution analysis: the distribution of individual trade returns — the shape of the distribution, the skewness, the kurtosis, the fat-tail behaviour. A strategy with a positively skewed distribution — many small losses and occasional large wins — has a different risk profile from one with a negatively skewed distribution, even if the aggregate Sharpe ratio is similar.
Win rate analysis: the overall win rate, the win rate conditioned on entry signal characteristics, the win rate by instrument and by session, and the streak analysis that shows the typical length of winning and losing runs. Maximum adverse excursion (MAE) and maximum favourable excursion (MFE) analysis — the distribution of how far each trade moved against the position before reaching the eventual exit, and how far it moved in the favourable direction before any adverse move. MAE and MFE analysis is the primary tool for optimising stop loss placement and take profit levels.
Holding period analysis: the distribution of trade durations, the relationship between holding period and profitability, the identification of whether trades that are held longer perform differently from trades that are closed quickly. For strategies where the holding period is intended to be defined, the analysis of whether the actual holding period distribution matches the intended distribution.
Consecutive trade analysis: the pattern of sequential trade outcomes — whether wins and losses tend to cluster (streaks) or alternate more than would be expected by chance, and what this implies for the strategy's edge persistence across time.
Execution quality analysis. The comparison of intended execution with actual execution — quantifying the execution quality contribution to overall strategy performance.
Slippage analysis: the difference between the intended entry and exit prices and the actual fills. Average slippage per trade, slippage by instrument, slippage by time of day, and the distribution of slippage values. The identification of the conditions under which slippage is worst — the sessions, the instruments, the trade sizes — that guide execution optimisation.
For strategies with defined entry signals, the relationship between signal time and actual entry time — the delay between signal generation and trade execution, and its effect on the fill price relative to the signal price.
Market impact analysis: for strategies with meaningful position sizes relative to typical market liquidity, the analysis of how order placement affects prices — whether the strategy's entries and exits are systematically moving prices against the strategy's interests, and how large the resulting execution cost is.
Entry and exit quality: for strategies with discretionary or semi-automated entry and exit timing within a signal window, the analysis of whether the actual entry prices achieved are better or worse than the average of the signal window — and whether there is a systematic pattern in the timing decisions that could be improved.
Risk-adjusted performance analysis. The performance metrics that account for risk rather than measuring return alone.
Sharpe ratio, Sortino ratio, and Calmar ratio with correct statistical uncertainty quantification — the confidence intervals around these metrics that reflect the statistical uncertainty from finite trade samples. The bias-corrected Sharpe ratio that adjusts for the upward bias in Sharpe ratio estimates from small samples.
Drawdown analysis: the equity curve drawn from the trade history, the drawdown periods identified and characterised — the depth, the duration, and the recovery time of each drawdown period. The maximum drawdown distribution from bootstrap resampling that shows the range of maximum drawdowns the strategy could realistically produce over a given number of trades. The time-in-drawdown metric that quantifies what fraction of the strategy's lifetime is spent in drawdown.
Risk-of-ruin calculation: given the strategy's historical trade statistics, the probability of a drawdown severe enough to end trading (reaching a defined stop point) before reaching a defined profit target. Risk-of-ruin analysis provides the context for position sizing decisions — the relationship between risk per trade and the probability of reaching various outcomes.
Benchmark and peer comparison. Strategy performance placed in context through comparison against relevant benchmarks and peer strategies.
Benchmark comparison: the strategy's return and risk-adjusted performance compared against the relevant benchmark — the buy-and-hold return for a long-biased equity strategy, the risk-free rate for a market-neutral strategy, the relevant index for a strategy with systematic exposure to a specific market.
Attribution analysis: the decomposition of active return (strategy return minus benchmark return) into the components attributable to timing, selection, and systematic factor exposures. Attribution analysis that identifies how much of the strategy's performance is attributable to genuine skill versus systematic factor exposure that could be replicated more cheaply.
Strategy improvement insights. The translation of analytical findings into specific, actionable recommendations for strategy improvement.
Underperforming segment identification: the instruments, sessions, or market conditions where the strategy consistently underperforms — candidates for strategy filters that exclude the low-edge segments from the trading universe. The analysis that determines whether excluding a segment improves out-of-sample performance or whether the exclusion merely fits the historical data more tightly.
Trade management optimisation: the stop loss and take profit placement analysis that identifies whether the current management rules are optimal given the strategy's MAE and MFE distributions. The analysis of early exit behaviour — whether trades are being exited prematurely before their targets, and whether a different exit rule would improve performance.
Position sizing analysis: the relationship between position sizes and returns — whether the strategy performs differently at different position sizes, whether there is evidence that position sizes are systematically larger on losing trades and smaller on winning trades, and whether the position sizing methodology is consistent with the strategy's intended risk management approach.
Integration Points
Trading platforms. MetaTrader 4 and MT5 trade history export, Interactive Brokers trade reports, cryptocurrency exchange trade history APIs, broker statement parsing — the data acquisition layer that consolidates trade data from every relevant source into the analysis database.
Portfolio management systems. Trade data feeding portfolio attribution analysis, factor exposure calculation, and the performance reporting that portfolio management requires.
Backtesting infrastructure. Comparison of live trading results against the backtested strategy behaviour — identifying the segments where live performance diverges from backtested expectations and diagnosing the sources of the divergence.
Risk monitoring systems. Historical trade statistics feeding the risk models that set position size limits, drawdown triggers, and other operational risk parameters.
Technologies Used
- Python — primary analysis language: Pandas, NumPy, SciPy, statsmodels, Matplotlib, Seaborn, Plotly for interactive visualisation
- Rust — high-performance trade data processing, bootstrap simulation for statistical inference, large-scale trade database operations
- SQL (PostgreSQL, SQLite) — trade database, performance metrics storage, analytical query layer
- React / Next.js — interactive trading analytics dashboard, equity curve visualisation, trade distribution charts, drill-down performance views
- TypeScript — type-safe frontend and API code throughout
- Parquet / Apache Arrow — efficient storage of large trade histories for research-scale analysis
- Redis — live strategy performance metrics cache, real-time P&L tracking
- Jupyter — exploratory trade data analysis and research notebooks
- MetaTrader trade history export — MT4/MT5 trade data acquisition
- Interactive Brokers Flex Query API — IB trade history data acquisition
- Binance / Bybit / Kraken trade history APIs — cryptocurrency exchange trade data
- REST / Webhooks — real-time trade data collection from connected trading systems
The Difference Between Data and Intelligence
A trade history is data. A trade history that has been analysed to identify the instruments where the strategy's edge is strongest, the sessions where it consistently underperforms, the execution quality contribution to P&L, and the position sizing inconsistencies that are degrading performance — this is intelligence. The difference between the two is the analytical process that extracts the patterns from the data and translates them into specific, actionable insights.
Most traders leave this intelligence in their trade history, unretrieved, because the analysis required to extract it is time-consuming and technically demanding without the right tools. Trading data analysis infrastructure that performs this analysis systematically — on every strategy update, on every new batch of live trades, as part of the ongoing strategy management process — makes this intelligence continuously available rather than requiring a periodic manual analysis exercise.
The Patterns in Your Trade History Are Telling You Something
Your trade history contains the answer to why your strategy is performing as it is, where the edge is concentrated, and what is suppressing performance below potential. Trading data analysis is how you find those answers — rigorously, systematically, and with the statistical methodology that distinguishes genuine patterns from noise.