[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-128485-en":3,"doc-seo-128485-105":30,"detail-sidebar-cat-0-en-105":92},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},128485,13056712833777,"Logic","https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0",8,"Research & Report","Mean Absolute Directional Loss as a New Loss Function - for Machine Learning Problems in Algorithmic Investment Strategies","This paper addresses the need for an adequate loss function when optimizing machine learning models for forecasting financial time series used to construct algorithmic investment strategies. It introduces Mean Absolute Directional Loss (MADL) to improve how forecast errors translate into actionable buy/sell signals, addressing limitations of classical forecast-error measures. Experiments on two asset classes—Bitcoin and Crude Oil—show better LSTM hyperparameter selection and more efficient out-of-sample strategies evaluated with risk-adjusted return metrics.","arXiv :2309 . 10546v1 [ q-fin .CP] 19 Sep 2023  \nMean Absolute Directional Loss as a New Loss Function for Machine  \nLearning Problems in Algorithmic Investment Strategies⋆  \nJakub Micha´nk´owa,b,1 , Pawel Sakowskib,2 , Robert ´Slepaczukb,3,∗  \na Department of Informatics,Cracow University of Economics, ul. Rakowicka 27, Cracow, 31-510, Poland b Quantitative Finance Research Group, Department of Quantitative Finance, Faculty of Economic Sciences, University of  \nWarsaw, ul. Dluga 44/50, 00-241, Warsaw, Poland  \nAbstract  \nThis paper investigates the issue of an adequate loss function in the optimization of machine learning models used in the forecasting of financial time series for the purpose of algorithmic investment strategies (AIS) construction. We propose the Mean Absolute Directional Loss (MADL) function, solving important problems of classical forecast error functions in extracting information from forecasts to create efficient buy/sell signals in algorithmic investment strategies. Finally, based on the data from two different asset classes (cryptocurrencies: Bitcoin and commodities: Crude Oil), we show that the new loss function enables us to select better hyperparameters for the LSTM model and obtain more efficient investment strategies, with regard to risk-adjusted return metrics on the out-of-sample data.  \nKeywords: machine learning, recurrent neural networks, long short-term memory, algorithmic investment strategies, testing architecture, loss function, walk-forward optimization, over-optimization  \nJEL: C4, C14, C45, C53, C58, G13  \n1. Introduction  \nThe main idea for this paper comes from the unsolved dilemma regarding the search for forecasting models that can be used for buy/sell signal generation in algorithmic investment strategies (AIS) . No matter what kind of theoretical concept is incorporated into the heart of such an investment model, we have a few similar issues that have to be properly addressed to increase the probability of generating efficient signalson out-of-sample (OOS) data. Among many others, these include the architecture of testing various models (machine learning, econometric, macroeconomic, or statistical approaches), the structure of the walk-forward procedure (usually consisting of numerous training, validation, and testing periods of different lengths), hyperparameters tuning and parameters optimization, model estimation phase, and finally the appropriate set of time series with possibly diverse characteristics of their distributions. The point is that all of these problems have to be designed optimally in order to avoid potential over-fitting issues and find the best possible variant of the investment model.  \nMajority of papers undertaking the topic of AIS testing do not put proper attention to these problems and focus only on the empirical testing of one or several selected investment models, on a single instrument, over quite short data periods, usually without explaining the details of the whole procedure. In this paper,  \n⋆ This document is the results of the research project funded by IDUB program: BOB-IDUB-622-233/2022 at the University of Warsaw  \n∗ Corresponding author: [rslepaczuk@wne.uw.edu.pl](rslepaczuk@wne.uw.edu.pl)  \n1 ORCID: 0000-0002-0567-6240; [email: jmichankow@wne.uw.edu.pl](email: jmichankow@wne.uw.edu.pl)  \n2 ORCID: 0000-0003-3384-3795; email: [sakowski@wne.uw.edu.pl](sakowski@wne.uw.edu.pl)  \n3 ORCID: 0000-0001-5227-2014  \nPreprint submitted to arXiv September 2023  \nwe decided to focus on one crucial aspect of testing such models, which is, in our opinion, the selection of a proper loss function. In reality, it has the greatest impact on hyper-parameter tuning, followed by the model estimation phase.  \nThe main hypothesis verified in this paper is as follows (RH): The MADL loss function has better properties than classical forecast error functions in the optimization of ML models used in forecasting financial time series for the purpose of AIS construction. In","cbCaijbAdwyXEJUQ","https://ap.wps.com/l/cbCaijbAdwyXEJUQ","pdf",2316283,1,12,"English","en",105,"# Introduction\n# Literature review\n# Methodology and data\n# Results\n# Conclusion and extensions","[{\"question\":\"What problem does MADL address in algorithmic investment strategies?\",\"answer\":\"MADL addresses the lack of an appropriate loss function for optimizing ML forecasting models so that predicted directions translate into effective buy/sell signals.\"},{\"question\":\"How does the paper validate the proposed MADL loss function?\",\"answer\":\"It compares MADL with a classical forecast error function (MAE) using two time-series datasets: Bitcoin and Crude Oil daily returns.\"},{\"question\":\"What impact does MADL have on LSTM model tuning and strategy quality?\",\"answer\":\"MADL enables better hyperparameter selection for the LSTM model and leads to more efficient out-of-sample investment strategies under risk-adjusted return metrics.\"}]","Mean Absolute Directional Loss as a New Loss Function - for Machine Learning Problems in Algorithmic Investment Strategies | PDF",1786001332,30,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":87,"head_meta":89,"extra_data":91,"updated_unix":28},"mean-absolute-directional-loss-as-a-new-loss-function-for-machine-learning-problems-in-algorithmic-investment-strategies","",{"@graph":36,"@context":86},[37,54,69],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/mean-absolute-directional-loss-as-a-new-loss-function-for-machine-learning-problems-in-algorithmic-investment-strategies/128485/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":63,"encodingFormat":61,"isAccessibleForFree":64,"interactionStatistic":65},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-22","2026-08-06",true,{"@type":66,"interactionType":67,"userInteractionCount":20},"InteractionCounter",{"@type":68},"ViewAction",{"@type":70,"mainEntity":71},"FAQPage",[72,78,82],{"name":73,"@type":74,"acceptedAnswer":75},"What problem does MADL address in algorithmic investment strategies?","Question",{"text":76,"@type":77},"MADL addresses the lack of an appropriate loss function for optimizing ML forecasting models so that predicted directions translate into effective buy/sell signals.","Answer",{"name":79,"@type":74,"acceptedAnswer":80},"How does the paper validate the proposed MADL loss function?",{"text":81,"@type":77},"It compares MADL with a classical forecast error function (MAE) using two time-series datasets: Bitcoin and Crude Oil daily returns.",{"name":83,"@type":74,"acceptedAnswer":84},"What impact does MADL have on LSTM model tuning and strategy quality?",{"text":85,"@type":77},"MADL enables better hyperparameter selection for the LSTM model and leads to more efficient out-of-sample investment strategies under risk-adjusted return metrics.","https://schema.org",{"og:url":52,"og:type":88,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":90,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":93},[94,98,102,106,111,116,121,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":95,"show_sort_weight":96,"slug":97},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":99,"show_sort_weight":100,"slug":101},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":103,"show_sort_weight":104,"slug":105},"Exam",70,"exam",{"id":107,"doc_module":4,"doc_module_name":46,"category_name":108,"show_sort_weight":109,"slug":110},5,"Comic",60,"comic",{"id":112,"doc_module":4,"doc_module_name":46,"category_name":113,"show_sort_weight":114,"slug":115},6,"Technology",50,"technology",{"id":117,"doc_module":4,"doc_module_name":46,"category_name":118,"show_sort_weight":119,"slug":120},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":29,"slug":122},"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":107,"slug":138},19,"General","general"]