Tshepo Chris Nokeri
Pretoria, South Africa
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/978-1-4842-7109-4. For more detailed information, please visit www.apress.com/source-code.
ISBN 978-1-4842-7109-4 e-ISBN 978-1-4842-7110-0
https://doi.org/10.1007/978-1-4842-7110-0
Tshepo Chris Nokeri 2021
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole orpart of the material is concerned, specifically the rights of translation, reprinting, reuse ofillustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,and transmission or information storage and retrieval, electronic adaptation, computer software,or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
Introduction
Kindly welcome to Implementing Machine Learning for Finance. This book is your guide to mastering machine and deep learning applied to practical, real-world investment strategy problems using Python programming. In this book, you will learn how to properly build and evaluate supervised and unsupervised machine learning and deep learning models adequate for partial algorithmic trading and investment portfolio and risk analysis.
To begin with, it prudently introduces pattern recognition and future price forecasting exerting time-series analysis models, like the autoregressive integrated moving average (ARIMA) model, seasonal ARIMA (SARIMA) model, and additive model, and then it carefully covers the least squares model and the long-short term memory (LSTM) model. Also, it covers hidden pattern recognition and market regime prediction applying the Gaussian hidden Markov model. Third, it presents the practical application of the k-means model in stock clustering. Fourth, it establishes the practical application of the prevalent variance-covariance method and empirical simulation method (using Monte Carlo simulation) for value-at-risk estimation. Fifth, it encloses market direction classification using both the logistic classifier and the multilayer perceptron classifier. Lastly, it promptly presents performance and risk analysis for investment portfolios.
I used Anaconda (an open source distribution of Python programming) to prepare the examples. The libraries covered in this book include, but are not limited to, the following:
Auto ARIMA for time-series analysis
Prophet for time-series analysis
HMM Learn for hidden Markov models
Yahoo Finance for web data scraping
Pyfolio for investment portfolio and risk analysis
Pandas for data structures and tools
Statsmodels for basic statistical computation and modeling
SciKit-Learn for building and validating key machine learning algorithms
Keras for high-level frameworks for deep learning
Pandas MonteCarlo for Monte Carlo simulation
NumPy for arrays and matrices
SciPy for integrals, solving differential equations, and optimization
Matplotlib and Seaborn for popular plots and graphs
This book targets data scientists, machine learning engineers, and business and finance professionals, including retail investors who want to develop systematic approaches to investment portfolio management, risk analysis, and performance analysis, as well as predictive analytics using data science procedures and tools. Prior to exploring the contents of this book, ensure that you understand the basics of statistics, investment strategy, Python programming, and probability theories. Also, install the packages mentioned in the previous list in your environment.