IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2210.11532.html
   My bibliography  Save this paper

DNN-ForwardTesting: A New Trading Strategy Validation using Statistical Timeseries Analysis and Deep Neural Networks

Author

Listed:
  • Ivan Letteri
  • Giuseppe Della Penna
  • Giovanni De Gasperis
  • Abeer Dyoub

Abstract

In general, traders test their trading strategies by applying them on the historical market data (backtesting), and then apply to the future trades the strategy that achieved the maximum profit on such past data. In this paper, we propose a new trading strategy, called DNN-forwardtesting, that determines the strategy to apply by testing it on the possible future predicted by a deep neural network that has been designed to perform stock price forecasts and trained with the market historical data. In order to generate such an historical dataset, we first perform an exploratory data analysis on a set of ten securities and, in particular, analize their volatility through a novel k-means-based procedure. Then, we restrict the dataset to a small number of assets with the same volatility coefficient and use such data to train a deep feed-forward neural network that forecasts the prices for the next 30 days of open stocks market. Finally, our trading system calculates the most effective technical indicator by applying it to the DNNs predictions and uses such indicator to guide its trades. The results confirm that neural networks outperform classical statistical techniques when performing such forecasts, and their predictions allow to select a trading strategy that, when applied to the real future, increases Expectancy, Sharpe, Sortino, and Calmar ratios with respect to the strategy selected through traditional backtesting.

Suggested Citation

  • Ivan Letteri & Giuseppe Della Penna & Giovanni De Gasperis & Abeer Dyoub, 2022. "DNN-ForwardTesting: A New Trading Strategy Validation using Statistical Timeseries Analysis and Deep Neural Networks," Papers 2210.11532, arXiv.org.
  • Handle: RePEc:arx:papers:2210.11532
    as

    Download full text from publisher

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

    References listed on IDEAS

    as
    1. Can Yang & Junjie Zhai & Helong Li, 2020. "On the Bound of Cumulative Return in Trading Series and the Verification Using Technical Trading Rules," Papers 2005.13974, arXiv.org.
    2. Hyndman, Rob J. & Khandakar, Yeasmin, 2008. "Automatic Time Series Forecasting: The forecast Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i03).
    3. Marquez, Jamie, 1995. "Time series analysis : James D. Hamilton, 1994, (Princeton University Press, Princeton, NJ), 799 pp., US $55.00, ISBN 0-691-04289-6," International Journal of Forecasting, Elsevier, vol. 11(3), pages 494-495, September.
    4. G'abor Petneh'azi & J'ozsef G'all, 2018. "Exploring the predictability of range-based volatility estimators using RNNs," Papers 1803.07152, arXiv.org.
    5. Richard J. Martin, 2021. "Design and analysis of momentum trading strategies," Papers 2101.01006, arXiv.org, revised Jan 2023.
    6. Yang, Dennis & Zhang, Qiang, 2000. "Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices," The Journal of Business, University of Chicago Press, vol. 73(3), pages 477-491, July.
    7. Avinash Barnwal & Hari Pad Bharti & Aasim Ali & Vishal Singh, 2019. "Stacking with Neural network for Cryptocurrency investment," Papers 1902.07855, arXiv.org, revised Feb 2019.
    8. Lux, Thomas & Kaizoji, Taisei, 2007. "Forecasting volatility and volume in the Tokyo Stock Market: Long memory, fractality and regime switching," Journal of Economic Dynamics and Control, Elsevier, vol. 31(6), pages 1808-1843, June.
    9. Marco Avellaneda & Jeong-Hyun Lee, 2010. "Statistical arbitrage in the US equities market," Quantitative Finance, Taylor & Francis Journals, vol. 10(7), pages 761-782.
    10. Peng Huang & Tianxiang Wang, 2016. "On the Profitability of Optimal Mean Reversion Trading Strategies," Papers 1602.05858, arXiv.org.
    11. Huiwen Wang & Wenyang Huang & Shanshan Wang, 2021. "Forecasting open-high-low-close data contained in candlestick chart," Papers 2104.00581, arXiv.org.
    12. Jaydip Sen & Sidra Mehtab & Abhishek Dutta, 2021. "Volatility Modeling of Stocks from Selected Sectors of the Indian Economy Using GARCH," Papers 2105.13898, arXiv.org.
    13. Jingtao Yao & Chew Lim Tan & Hean-Lee Poh, 1999. "Neural Networks For Technical Analysis: A Study On Klci," International Journal of Theoretical and Applied Finance (IJTAF), World Scientific Publishing Co. Pte. Ltd., vol. 2(02), pages 221-241.
    14. Oleh Danyliv & Bruce Bland & Alexandre Argenson, 2019. "Random walk model from the point of view of algorithmic trading," Papers 1908.04333, arXiv.org.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Ivan Letteri, 2023. "VolTS: A Volatility-based Trading System to forecast Stock Markets Trend using Statistics and Machine Learning," Papers 2307.13422, arXiv.org, revised Aug 2023.

    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. Ivan Letteri & Giuseppe Della Penna & Giovanni De Gasperis & Abeer Dyoub, 2022. "A Stock Trading System for a Medium Volatile Asset using Multi Layer Perceptron," Papers 2201.12286, arXiv.org.
    2. Díaz-Mendoza, Ana-Carmen & Pardo, Angel, 2020. "Holidays, weekends and range-based volatility," The North American Journal of Economics and Finance, Elsevier, vol. 52(C).
    3. Bleher, Johannes & Dimpfl, Thomas, 2019. "Today I got a million, tomorrow, I don't know: On the predictability of cryptocurrencies by means of Google search volume," International Review of Financial Analysis, Elsevier, vol. 63(C), pages 147-159.
    4. Gkillas, Konstantinos & Gupta, Rangan & Pierdzioch, Christian, 2020. "Forecasting realized oil-price volatility: The role of financial stress and asymmetric loss," Journal of International Money and Finance, Elsevier, vol. 104(C).
    5. Rob Hyndman & Heather Booth & Farah Yasmeen, 2013. "Coherent Mortality Forecasting: The Product-Ratio Method With Functional Time Series Models," Demography, Springer;Population Association of America (PAA), vol. 50(1), pages 261-283, February.
    6. Nahapetyan Yervand, 2019. "The benefits of the Velvet Revolution in Armenia: Estimation of the short-term economic gains using deep neural networks," Central European Economic Journal, Sciendo, vol. 6(53), pages 286-303, January.
    7. Khizar Qureshi & Tauhid Zaman, 2024. "Pairs Trading Using a Novel Graphical Matching Approach," Papers 2403.07998, arXiv.org.
    8. Barrow, Devon & Kourentzes, Nikolaos, 2018. "The impact of special days in call arrivals forecasting: A neural network approach to modelling special days," European Journal of Operational Research, Elsevier, vol. 264(3), pages 967-977.
    9. Dhanya Jothimani & Ravi Shankar & Surendra S. Yadav, 2016. "Discrete Wavelet Transform-Based Prediction of Stock Index: A Study on National Stock Exchange Fifty Index," Papers 1605.07278, arXiv.org.
    10. Dombi, József & Jónás, Tamás & Tóth, Zsuzsanna Eszter, 2018. "Modeling and long-term forecasting demand in spare parts logistics businesses," International Journal of Production Economics, Elsevier, vol. 201(C), pages 1-17.
    11. Claudiu Vinte & Marcel Ausloos, 2022. "The Cross-Sectional Intrinsic Entropy. A Comprehensive Stock Market Volatility Estimator," Papers 2205.00104, arXiv.org.
    12. Amita Gajewar & Gagan Bansal, 2016. "Revenue Forecasting for Enterprise Products," Papers 1701.06624, arXiv.org.
    13. Tao XIONG & Chongguang LI & Yukun BAO, 2017. "An improved EEMD-based hybrid approach for the short-term forecasting of hog price in China," Agricultural Economics, Czech Academy of Agricultural Sciences, vol. 63(3), pages 136-148.
    14. Igor Kliakhandler, 2007. "Execution edge of pit traders and intraday price ranges of soft commodities," Applied Financial Economics, Taylor & Francis Journals, vol. 17(5), pages 343-350.
    15. Pieter van der Spek & Chris Verhoef, 2014. "Balancing Time‐to‐Market and Quality in Embedded Systems," Systems Engineering, John Wiley & Sons, vol. 17(2), pages 166-192, June.
    16. Hewamalage, Hansika & Bergmeir, Christoph & Bandara, Kasun, 2021. "Recurrent Neural Networks for Time Series Forecasting: Current status and future directions," International Journal of Forecasting, Elsevier, vol. 37(1), pages 388-427.
    17. Hyndman, Rob J. & Ahmed, Roman A. & Athanasopoulos, George & Shang, Han Lin, 2011. "Optimal combination forecasts for hierarchical time series," Computational Statistics & Data Analysis, Elsevier, vol. 55(9), pages 2579-2589, September.
    18. Kourentzes, Nikolaos & Petropoulos, Fotios & Trapero, Juan R., 2014. "Improving forecasting by estimating time series structural components across multiple frequencies," International Journal of Forecasting, Elsevier, vol. 30(2), pages 291-302.
    19. Hossein Hassani & Emmanuel Sirimal Silva & Rangan Gupta & Mawuli K. Segnon, 2015. "Forecasting the price of gold," Applied Economics, Taylor & Francis Journals, vol. 47(39), pages 4141-4152, August.
    20. Thomas Horvath & Peter Huber & Ulrike Huemer & Helmut Mahringer & Philipp Piribauer & Mark Sommer & Stefan Weingärtner, 2022. "Mittelfristige Beschäftigungsprognose für Österreich und die Bundesländer. Berufliche und sektorale Veränderungen 2021 bis 2028," WIFO Studies, WIFO, number 70720, March.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:2210.11532. 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.