Table of Contents
Fetching ...

A novel approach to trading strategy parameter optimization using double out-of-sample data and walk-forward techniques

Tomasz Mroziewicz, Robert Ślepaczuk

TL;DR

The paper tackles overfitting and data-snooping in trading strategy evaluation by pairing walk-forward optimization with a joint search over EMA window lengths and walk-forward durations, validated on intraday cryptocurrency data with a global training period and a strict unseen-period test. The EMA crossover signals are optimized within a grid, smoothed to identify robust parameter regions, and verified for statistical significance via custom bootstrap methods, including block shuffles of transaction blocks. Key findings show that longer training/testing windows can yield stronger risk-adjusted performance under realistic costs, that results partly transfer across assets (BTC to ETH/BNB) and into diversified portfolios, and that the approach reduces drawdown relative to Buy-and-Hold. The study highlights practical considerations such as a breakeven transaction cost around 0.36%, and suggests that periodic retraining and alternative parameter-selection criteria could further enhance robustness in evolving market conditions.

Abstract

This study introduces a novel approach to walk-forward optimization by parameterizing the lengths of training and testing windows. We demonstrate that the performance of a trading strategy using the Exponential Moving Average (EMA) evaluated within a walk-forward procedure based on the Robust Sharpe Ratio is highly dependent on the chosen window size. We investigated the strategy on intraday Bitcoin data at six frequencies (1 minute to 60 minutes) using 81 combinations of walk-forward window lengths (1 day to 28 days) over a 19-month training period. The two best-performing parameter sets from the training data were applied to a 21-month out-of-sample testing period to ensure data independence. The strategy was only executed once during the testing period. To further validate the framework, strategy parameters estimated on Bitcoin were applied to Binance Coin and Ethereum. Our results suggest the robustness of our custom approach. In the training period for Bitcoin, all combinations of walk-forward windows outperformed a Buy-and-Hold strategy. During the testing period, the strategy performed similarly to Buy-and-Hold but with lower drawdown and a higher Information Ratio. Similar results were observed for Binance Coin and Ethereum. The real strength was demonstrated when a portfolio combining Buy-and-Hold with our strategies outperformed all individual strategies and Buy-and-Hold alone, achieving the highest overall performance and a 50 percent reduction in drawdown. A conservative fee of 0.1 percent per transaction was included in all calculations. A cost sensitivity analysis was performed as a sanity check, revealing that the strategy's break-even point was around 0.4 percent per transaction. This research highlights the importance of optimizing walk-forward window lengths and emphasizing the value of single-time out-of-sample testing for reliable strategy evaluation.

A novel approach to trading strategy parameter optimization using double out-of-sample data and walk-forward techniques

TL;DR

The paper tackles overfitting and data-snooping in trading strategy evaluation by pairing walk-forward optimization with a joint search over EMA window lengths and walk-forward durations, validated on intraday cryptocurrency data with a global training period and a strict unseen-period test. The EMA crossover signals are optimized within a grid, smoothed to identify robust parameter regions, and verified for statistical significance via custom bootstrap methods, including block shuffles of transaction blocks. Key findings show that longer training/testing windows can yield stronger risk-adjusted performance under realistic costs, that results partly transfer across assets (BTC to ETH/BNB) and into diversified portfolios, and that the approach reduces drawdown relative to Buy-and-Hold. The study highlights practical considerations such as a breakeven transaction cost around 0.36%, and suggests that periodic retraining and alternative parameter-selection criteria could further enhance robustness in evolving market conditions.

Abstract

This study introduces a novel approach to walk-forward optimization by parameterizing the lengths of training and testing windows. We demonstrate that the performance of a trading strategy using the Exponential Moving Average (EMA) evaluated within a walk-forward procedure based on the Robust Sharpe Ratio is highly dependent on the chosen window size. We investigated the strategy on intraday Bitcoin data at six frequencies (1 minute to 60 minutes) using 81 combinations of walk-forward window lengths (1 day to 28 days) over a 19-month training period. The two best-performing parameter sets from the training data were applied to a 21-month out-of-sample testing period to ensure data independence. The strategy was only executed once during the testing period. To further validate the framework, strategy parameters estimated on Bitcoin were applied to Binance Coin and Ethereum. Our results suggest the robustness of our custom approach. In the training period for Bitcoin, all combinations of walk-forward windows outperformed a Buy-and-Hold strategy. During the testing period, the strategy performed similarly to Buy-and-Hold but with lower drawdown and a higher Information Ratio. Similar results were observed for Binance Coin and Ethereum. The real strength was demonstrated when a portfolio combining Buy-and-Hold with our strategies outperformed all individual strategies and Buy-and-Hold alone, achieving the highest overall performance and a 50 percent reduction in drawdown. A conservative fee of 0.1 percent per transaction was included in all calculations. A cost sensitivity analysis was performed as a sanity check, revealing that the strategy's break-even point was around 0.4 percent per transaction. This research highlights the importance of optimizing walk-forward window lengths and emphasizing the value of single-time out-of-sample testing for reliable strategy evaluation.
Paper Structure (45 sections, 6 equations, 8 figures, 11 tables, 2 algorithms)

This paper contains 45 sections, 6 equations, 8 figures, 11 tables, 2 algorithms.

Figures (8)

  • Figure 1: Price of Bitcoin with marked Global Training/Unseen Period
  • Figure 2: Walk-Forward Sharpe Ratios: Heatmap by Training/Testing Length
  • Figure 3: Walk-Forward Robust Sharpe Ratios: Heatmap (Smoothed Values) by Training/Testing Length
  • Figure 4: Equity Curves: Top Sharpe Ratio Strategies (Walk-Forward, Global Training Data Period)
  • Figure 5: Strategy metrics for different level of transactional cost
  • ...and 3 more figures