IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2602.10785.html

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

Author

Listed:
  • Tomasz Mroziewicz
  • Robert 'Slepaczuk

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.

Suggested Citation

  • Tomasz Mroziewicz & Robert 'Slepaczuk, 2026. "A novel approach to trading strategy parameter optimization using double out-of-sample data and walk-forward techniques," Papers 2602.10785, arXiv.org.
  • Handle: RePEc:arx:papers:2602.10785
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2602.10785
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Farias Nazário, Rodolfo Toríbio & e Silva, Jéssica Lima & Sobreiro, Vinicius Amorim & Kimura, Herbert, 2017. "A literature review of technical analysis on stock markets," The Quarterly Review of Economics and Finance, Elsevier, vol. 66(C), pages 115-126.
    2. Karasu, Seçkin & Altan, Aytaç & Bekiros, Stelios & Ahmad, Wasim, 2020. "A new forecasting model with wrapper-based feature selection approach using multi-objective optimization technique for chaotic crude oil time series," Energy, Elsevier, vol. 212(C).
    3. Sergio Castellano Gómez & Robert Ślepaczuk, 2021. "Robust optimisation in algorithmic investment strategies," Working Papers 2021-27, Faculty of Economic Sciences, University of Warsaw.
    4. Hsu, Po-Hsuan & Hsu, Yu-Chin & Kuan, Chung-Ming, 2010. "Testing the predictive ability of technical analysis using a new stepwise test without data snooping bias," Journal of Empirical Finance, Elsevier, vol. 17(3), pages 471-484, June.
    5. ANGHEL, Dan-Gabriel, 2021. "A reality check on trading rule performance in the cryptocurrency market: Machine learning vs. technical analysis," Finance Research Letters, Elsevier, vol. 39(C).
    6. Andreas Karathanasopoulos & Christian Dunis & Samer Khalil, 2016. "Modelling, forecasting and trading with a new sliding window approach: the crack spread example," Quantitative Finance, Taylor & Francis Journals, vol. 16(12), pages 1875-1886, December.
    7. Brock, William & Lakonishok, Josef & LeBaron, Blake, 1992. "Simple Technical Trading Rules and the Stochastic Properties of Stock Returns," Journal of Finance, American Finance Association, vol. 47(5), pages 1731-1764, December.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Xiaoye Jin, 2022. "Evaluating the predictive power of intraday technical trading in China's crude oil market," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 41(7), pages 1416-1432, November.
    2. Kevin Rink, 2023. "The predictive ability of technical trading rules: an empirical analysis of developed and emerging equity markets," Financial Markets and Portfolio Management, Springer;Swiss Society for Financial Market Research, vol. 37(4), pages 403-456, December.
    3. Bajgrowicz, Pierre & Scaillet, Olivier, 2012. "Technical trading revisited: False discoveries, persistence tests, and transaction costs," Journal of Financial Economics, Elsevier, vol. 106(3), pages 473-491.
    4. Wen, Danyan & Liu, Li & Wang, Yudong & Zhang, Yaojie, 2022. "Forecasting crude oil market returns: Enhanced moving average technical indicators," Resources Policy, Elsevier, vol. 76(C).
    5. Hubert Dichtl, 2020. "Investing in the S&P 500 index: Can anything beat the buy‐and‐hold strategy?," Review of Financial Economics, John Wiley & Sons, vol. 38(2), pages 352-378, April.
    6. Sermpinis, Georgios & Hassanniakalager, Arman & Stasinakis, Charalampos & Psaradellis, Ioannis, 2021. "Technical analysis profitability and Persistence: A discrete false discovery approach on MSCI indices," Journal of International Financial Markets, Institutions and Money, Elsevier, vol. 73(C).
    7. Dan Anghel, 2013. "How Reliable is the Moving Average Crossover Rule for an Investor on the Romanian Stock Market?," The Review of Finance and Banking, Academia de Studii Economice din Bucuresti, Romania / Facultatea de Finante, Asigurari, Banci si Burse de Valori / Catedra de Finante, vol. 5(2), pages 089-115, December.
    8. Jin, Xiaoye, 2022. "Testing technical trading strategies on China's equity ETFs: A skewness perspective," Emerging Markets Review, Elsevier, vol. 51(PA).
    9. Shynkevich, Andrei, 2013. "Time-series momentum as an intra- and inter-industry effect: Implications for market efficiency," Journal of Economics and Business, Elsevier, vol. 69(C), pages 64-85.
    10. Wang, Shan & Jiang, Zhi-Qiang & Li, Sai-Ping & Zhou, Wei-Xing, 2015. "Testing the performance of technical trading rules in the Chinese markets based on superior predictive test," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 439(C), pages 114-123.
    11. Chuang, O-Chia & Chuang, Hui-Ching & Wang, Zixuan & Xu, Jin, 2024. "Profitability of technical trading rules in the Chinese stock market," Pacific-Basin Finance Journal, Elsevier, vol. 84(C).
    12. Christopher J. Neely & Paul A. Weller, 2011. "Technical analysis in the foreign exchange market," Working Papers 2011-001, Federal Reserve Bank of St. Louis.
    13. Isakov, Dusan & Marti, Didier, 2011. "Technical Analysis with a Long-Term Perspective: Trading Strategies and Market Timing Ability," FSES Working Papers 421, Faculty of Economics and Social Sciences, University of Freiburg/Fribourg Switzerland.
    14. Eero P䴤ri & Mika Vilska, 2014. "Performance of moving average trading strategies over varying stock market conditions: the Finnish evidence," Applied Economics, Taylor & Francis Journals, vol. 46(24), pages 2851-2872, August.
    15. Krzysztof Borowski & Izabela Pruchnicka-Grabias, 2019. "Optimal lengths of moving averages for the MACD oscillator for companies listed on the Warsaw Stock Exchange," Bank i Kredyt, Narodowy Bank Polski, vol. 50(5), pages 457-478.
    16. Georgios Sermpinis & Arman Hassanniakalager & Charalampos Stasinakis & Ioannis Psaradellis, 2018. "Technical Analysis and Discrete False Discovery Rate: Evidence from MSCI Indices," Papers 1811.06766, arXiv.org, revised Jun 2019.
    17. Osman Kilic & Joseph M. Marks & Kiseok Nam, 2022. "Predictable asset price dynamics, risk-return tradeoff, and investor behavior," Review of Quantitative Finance and Accounting, Springer, vol. 59(2), pages 749-791, August.
    18. Day, Min-Yuh & Ni, Yensen, 2023. "Be greedy when others are fearful: Evidence from a two-decade assessment of the NDX 100 and S&P 500 indexes," International Review of Financial Analysis, Elsevier, vol. 90(C).
    19. Urquhart, Andrew & Zhang, Hanxiong, 2019. "The performance of technical trading rules in Socially Responsible Investments," International Review of Economics & Finance, Elsevier, vol. 63(C), pages 397-411.
    20. Hsu, Po-Hsuan & Han, Qiheng & Wu, Wensheng & Cao, Zhiguang, 2018. "Asset allocation strategies, data snooping, and the 1 / N rule," Journal of Banking & Finance, Elsevier, vol. 97(C), pages 257-269.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2602.10785. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.