[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-117453-en":3,"doc-seo-117453-105":30,"detail-sidebar-cat-0-en-105":91},{"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":4,"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},117453,1374391975076,"Riley","https://ap-avatar.wpscdn.com/avatar/14000253ca4ec9f6853?x-image-process=image/resize,m_fixed,w_180,h_180&k=1783305029341752051",8,"Research & Report","Machine Learning for Automated Trading - Thesis","This thesis develops automated trading systems using three machine learning algorithms to predict the direction of share prices from technical analysis signals. Random forest, gradient boosting, and BART are compared under a trading setup that evaluates buying and selling over 5-day windows across a fixed set of predetermined stocks. Hyperparameters are tuned to optimize each model, including gradient boosting variants with multiple tuning algorithms. Results show higher returns and improved risk-adjusted returns versus a buy-hold baseline.","Machine Learning for Automated Trading  \nWilliam Semple  \nA thesis submitted in partial fulfillment of the requirements for the degree of Master of Mathematical Sciences in Financial Engineering.  \nSchool of Mathematics and Statistics University of Canterbury  \nJanuary, 2025  \nAbstract  \nThis thesis uses three machine learning algorithms to construct automated trading systems to predict the direction of share prices using technical analysis. Random forest, gradient boosting, and BART methods were chosen. We use a strategy of buying and selling stocks over 5-day windows over the span of the trading period, using some set of pre-determined shares. We considered the buy-hold strategy of buying all of the predetermined shares atthe start of the trading period and selling them at the end of the period, to be the baseline against which our systems were measured. Each machine learning algorithm had their hyperparameters tuned, with gradient boosting using three different tuning algorithms. The final results are promising; each of the three methods resulted in greater returns and risk-adjusted returns than the buy-hold strategy.  \nAcknowledgements  \nI would like to extend my sincere thanks to my supervisors, Blair and Marco, for their guidance, patience, and thoughtful feedback throughout this project. Their expertise has been vital in helping me develop my ideas and refine my research, and I appreciate the time and effort they invested in my work.  \nI am also truly grateful to my partner, Maia, for her constant support and understanding. Her belief in my abilities gave me the confidence to keep going, especially during the more challenging phases of my studies.  \nLastly, I want to acknowledge my family for always standing by me and cheering me on. Their encouragement helped me to both start and finish this thesis.  \nContents  \n1 Theory and Historical Background 3  \n1.1 A Brief History .................................. 3  \n1.2 Technical Analysis ................................ 4  \n1.3 Machine Learning ................................. 7  \n1.4 Financial Machine Learning ........................... 12  \n2 Methodology 14  \n2.1 Overview ..................................... 14  \n2.2 Technical Indicators ............................... 16  \n2.2.1 Volatility Indicators ........................... 16  \n2.2.2 Momentum Indicators .......................... 20  \n2.3 Dataset ...................................... 27  \n2.3.1 Collecting and Wrangling the Data ................... 29  \n2.4 Develop Algorithms ............................... 32  \n2.5 Random Forest .................................. 33  \n2.5.1 Random Forest Preliminary Results .................. 35  \n2.6 Boosting ...................................... 36  \n2.6.1 Gradient boosting ............................ 36  \n2.6.2 Gradient Boosting Hyperparameters .................. 37  \n2.6.3 Grid Search ................................ 38  \n2.6.4 Halton Sequence ............................. 39  \n2.6.5 Particle Swarm Optimization ...................... 41  \n2.6.6 Gradient Boosting Preliminary Results ................. 44  \n2.7 BART ....................................... 46  \n2.7.1 BART Preliminary Results ....................... 48  \n2.8 Evaluation Metrics ................................ 49  \n3 Results 51  \n3.1 Statistical Model Performance Measures .................... 51  \n3.2 Financial Performance Measures ........................ 54  \n3.2.1 Friedman and Wilcoxon Tests ...................... 56  \n3.2.2 Sharpe and Sortino Ratios ........................ 57  \n4 Conclusion 61  \nAppendices 68  \nA Code Appendix 69  \nA.1 Packages and Dataset .............................. 69  \nA.1.1 Packages Used .............................. 69  \nA.1.2 Dataset .................................. 70  \nA.2 Random Forest Code ............................... 78  \nA.3 Gradient Boosting Code ............................. 80  \nA.3.1 Grid Search ................................ 80  \nA.3.2 Halton Sequence .............","cbCaii0rWgy9QV6c","https://ap.wps.com/l/cbCaii0rWgy9QV6c","pdf",2593870,1,101,"English","en",105,"# Theory and Historical Background\n## A Brief History\n## Technical Analysis\n## Machine Learning\n## Financial Machine Learning\n# Methodology\n## Overview\n## Technical Indicators\n## Dataset\n## Develop Algorithms\n## Random Forest\n## Boosting\n## BART\n## Evaluation Metrics\n# Results\n## Statistical Model Performance Measures\n## Financial Performance Measures\n## Friedman and Wilcoxon Tests\n## Sharpe and Sortino Ratios\n# Conclusion\n## Appendices\n### Code Appendix","[{\"question\":\"What is the main goal of this thesis?\",\"answer\":\"To build automated trading systems that use machine learning to predict whether share prices will move up or down based on technical analysis signals.\"},{\"question\":\"Which machine learning methods are used?\",\"answer\":\"The thesis uses Random Forest, gradient boosting, and Bayesian Additive Regression Trees (BART).\"},{\"question\":\"How is model performance evaluated?\",\"answer\":\"The approach compares statistical performance and financial performance measures, including Sharpe and Sortino ratios and Friedman and Wilcoxon tests, against a buy-hold baseline.\"}]","Machine Learning for Automated Trading - Thesis | PDF",1785675931,255,{"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":86,"head_meta":88,"extra_data":90,"updated_unix":28},"machine-learning-for-automated-trading-thesis","",{"@graph":36,"@context":85},[37,54,68],{"@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/machine-learning-for-automated-trading-thesis/117453/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":62,"encodingFormat":61,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-02",true,{"@type":65,"interactionType":66,"userInteractionCount":4},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What is the main goal of this thesis?","Question",{"text":75,"@type":76},"To build automated trading systems that use machine learning to predict whether share prices will move up or down based on technical analysis signals.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Which machine learning methods are used?",{"text":80,"@type":76},"The thesis uses Random Forest, gradient boosting, and Bayesian Additive Regression Trees (BART).",{"name":82,"@type":73,"acceptedAnswer":83},"How is model performance evaluated?",{"text":84,"@type":76},"The approach compares statistical performance and financial performance measures, including Sharpe and Sortino ratios and Friedman and Wilcoxon tests, against a buy-hold baseline.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"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":106,"slug":138},19,"General","general"]