This thesis explores the application of Machine Learning in Quantitative Trading. It primarily focuses on how Machine Learning techniques can be used to develop algorithmic trading strategies within financial markets. The Machine Learning models employed range from classical approaches like Logistic Regression and Support Vector Machines to more advanced methods such as Recurrent Neural Networks, Long Short-Term Memory networks, and Gated Recurrent Units. The models were tested using approximately 20 years of stock price data from International Business Machines Corporation (IBM), spanning from January 2000 to March 2021. This period was divided separately into two segments: a training phase from January 2000 to February2019, used to build the Machine Learning models, and a testing phase from February 2019 to March 2021, used to validate them. The thesis highlights two popular Machine Learning tasks: regression and classification. Logistic Regression and Support Vector Machines are presented as classification models, where the output serves as a trading signal for the stock. In contrast, Recurrent Neural Networks, Long Short-Term Memory networks, and Gated Recurrent Units are used as regression models, where the output predicts the next price of the stock. An additional step is required to interpret this predicted price as a trading signal. Furthermore, all model-based strategies are evaluated for effectiveness using an intraday vectorized backtest, which provides visual evidence of each strategy’s profitability and risk management through equity curves and maximum drawdown metrics. The thesis also considers metrics such as hit rate and the rate of false positions, combining them with the equity curves to offer a comprehensive assessment of each strategy’s overall efficacy. Particularly, the research paid attention to the safety AI solutions in different aspect like: Accuracy, Robustness, Fairness and Explainability. Keywords: Machine Learning, Deep Learning, Quantitative Trading, Algorithmic Strategies, Backtesting, Maximum Drawdown, Risk Management, Trustworthiness AI
Questa tesi esplora l’applicazione del Machine Learning nel Trading Quantitativo. Si concentra principalmente su come le tecniche di Machine Learning possano essere utilizzate per sviluppare strategie di trading algoritmico nei mercati finanziari. I modelli di Machine Learning impiegati spaziano da approcci classici come la Regressione Logistica e le Macchine a Vettori di Supporto a metodi pi`u avanzati come le Reti Neurali Ricorrenti, le Reti Neurali Long Short-Term Memory e le Gated Recurrent Units. I modelli sono stati testati utilizzando circa 20 anni di dati sui prezzi delle azioni della International Business Machines Corporation (IBM), che vanno da gennaio 2000 a marzo 2021. Questo periodo `e stato suddiviso in due segmenti: una fase di addestramento, da gennaio 2000 a febbraio 2019, utilizzata per costruire i modelli di Machine Learning, e una fase di test, da febbraio 2019 a marzo 2021, utilizzata per convalidarli. La tesi evidenzia due compiti popolari del Machine Learning: la regressione e la classificazione. La Regressione Logistica e le Macchine a Vettori di Supporto sono presentate come modelli di classificazione, in cui l’output serve come segnale di trading per il titolo azionario. Al contrario, le Reti Neurali Ricorrenti, le Reti Neurali Long Short-Term Memory e le Gated Recurrent Units sono utilizzate come modelli di regressione, in cui l’output prevede il prezzo futuro del titolo. `E necessario un passaggio aggiuntivo per interpretare questo prezzo previsto come segnale di trading. Inoltre, tutte le strategie basate sui modelli sono valutate per efficacia tramite un backtest vettorizzato intraday, che fornisce prove visive della redditivit`a e della gestione del rischio di ciascuna strategia attraverso curve di equit`a e metriche di drawdown massimo. La tesi considera anche metriche come il tasso di successo e il tasso di posizioni errate, combinandole con le curve di equit`a per offrire una valutazione complessiva dell’efficacia di ciascuna strategia. Particolarmente, la ricerca ha posto attenzione alle soluzioni di sicurezza nell’IA sotto diversi aspetti, come: Accuratezza, Robustezza, Equit`a e Spiegabilit`a. Parole chiave: Machine Learning, Deep Learning, Trading Quantitativo, Strategie Algoritmiche, Backtesting, Maximum Drawdown, Risk Management, Trustworthiness AI
Applicazione del Machine Learning al Trading Quantitativo
PHAN TIEN, DUNG
2023/2024
Abstract
This thesis explores the application of Machine Learning in Quantitative Trading. It primarily focuses on how Machine Learning techniques can be used to develop algorithmic trading strategies within financial markets. The Machine Learning models employed range from classical approaches like Logistic Regression and Support Vector Machines to more advanced methods such as Recurrent Neural Networks, Long Short-Term Memory networks, and Gated Recurrent Units. The models were tested using approximately 20 years of stock price data from International Business Machines Corporation (IBM), spanning from January 2000 to March 2021. This period was divided separately into two segments: a training phase from January 2000 to February2019, used to build the Machine Learning models, and a testing phase from February 2019 to March 2021, used to validate them. The thesis highlights two popular Machine Learning tasks: regression and classification. Logistic Regression and Support Vector Machines are presented as classification models, where the output serves as a trading signal for the stock. In contrast, Recurrent Neural Networks, Long Short-Term Memory networks, and Gated Recurrent Units are used as regression models, where the output predicts the next price of the stock. An additional step is required to interpret this predicted price as a trading signal. Furthermore, all model-based strategies are evaluated for effectiveness using an intraday vectorized backtest, which provides visual evidence of each strategy’s profitability and risk management through equity curves and maximum drawdown metrics. The thesis also considers metrics such as hit rate and the rate of false positions, combining them with the equity curves to offer a comprehensive assessment of each strategy’s overall efficacy. Particularly, the research paid attention to the safety AI solutions in different aspect like: Accuracy, Robustness, Fairness and Explainability. Keywords: Machine Learning, Deep Learning, Quantitative Trading, Algorithmic Strategies, Backtesting, Maximum Drawdown, Risk Management, Trustworthiness AIFile | Dimensione | Formato | |
---|---|---|---|
Final_Thesis_Phan_Tien_Dung_Uni_Pavia_add_frontise-pdfa.pdf
accesso aperto
Descrizione: The thesis emphasizes machine learning techniques in quantitative investing.
Models are created from manipulating data from market, backtesting and SAFE trustworthiness assessment.
Dimensione
1.57 MB
Formato
Adobe PDF
|
1.57 MB | Adobe PDF | Visualizza/Apri |
È consentito all'utente scaricare e condividere i documenti disponibili a testo pieno in UNITESI UNIPV nel rispetto della licenza Creative Commons del tipo CC BY NC ND.
Per maggiori informazioni e per verifiche sull'eventuale disponibilità del file scrivere a: unitesi@unipv.it.
https://hdl.handle.net/20.500.14239/26657