Implementing Machine Learning for Finance: A Systematic Approach to Predictive Risk and Performance Analysis for Investment Portfolios
()
About this ebook
The book introduces pattern recognition and future price forecasting that exerts effects on time series analysis models, such as the Autoregressive Integrated Moving Average (ARIMA) model, Seasonal ARIMA (SARIMA) model, and Additive model, and it covers the Least Squares model and the Long Short-Term Memory (LSTM) model. It presents hidden pattern recognition and market regime prediction applying the Gaussian Hidden Markov Model. The book covers the practical application of the K-Means model in stock clustering. It establishes the practical application of the Variance-Covariance method and Simulation method (using Monte Carlo Simulation) for value at risk estimation. It also includes market direction classification using both the Logistic classifier and the Multilayer Perceptron classifier. Finally, the book presents performance and risk analysis for investment portfolios.
By the end of this book, you should be able to explain how algorithmic trading works and its practical application in the real world, and know how to apply supervised and unsupervised ML and DL models to bolster investment decision making and implement and optimize investment strategies and systems.
What You Will Learn
- Understand the fundamentals of the financial market and algorithmic trading, as well as supervised and unsupervised learning models that are appropriate for systematic investment portfolio management
- Know the concepts of feature engineering, data visualization, and hyperparameter optimization
- Design, build, and test supervised and unsupervised ML and DL models
- Discover seasonality, trends, and market regimes, simulating a change in the market and investment strategy problems and predicting market direction and prices
- Structure and optimize an investment portfolio with preeminent asset classes and measure the underlying risk
Who This Book Is For
Beginning and intermediate data scientists, machine learning engineers, business executives, and finance professionals (such as investment analysts and traders)
Read more from Tshepo Chris Nokeri
Data Science Solutions with Python: Fast and Scalable Models Using Keras, PySpark MLlib, H2O, XGBoost, and Scikit-Learn Rating: 0 out of 5 stars0 ratingsWeb App Development and Real-Time Web Analytics with Python: Develop and Integrate Machine Learning Algorithms into Web Apps Rating: 0 out of 5 stars0 ratingsEconometrics and Data Science: Apply Data Science Techniques to Model Complex Problems and Implement Solutions for Economic Problems Rating: 0 out of 5 stars0 ratingsData Science Revealed: With Feature Engineering, Data Visualization, Pipeline Development, and Hyperparameter Tuning Rating: 0 out of 5 stars0 ratings
Related to Implementing Machine Learning for Finance
Related ebooks
Computer Vision with Maker Tech: Detecting People With a Raspberry Pi, a Thermal Camera, and Machine Learning Rating: 0 out of 5 stars0 ratingsTesting and Tuning Market Trading Systems: Algorithms in C++ Rating: 3 out of 5 stars3/5Hands-on Scikit-Learn for Machine Learning Applications: Data Science Fundamentals with Python Rating: 0 out of 5 stars0 ratingsPython Deep Learning Rating: 5 out of 5 stars5/5Practical Machine Learning with Python: A Problem-Solver's Guide to Building Real-World Intelligent Systems Rating: 0 out of 5 stars0 ratingsStatistics with Rust: 50+ Statistical Techniques Put into Action Rating: 0 out of 5 stars0 ratingsLearn Algorithmic Trading: Build and deploy algorithmic trading systems and strategies using Python and advanced data analysis Rating: 0 out of 5 stars0 ratingsArtificial Intelligence for Business Rating: 0 out of 5 stars0 ratingsAdvanced Data Analytics Using Python: With Machine Learning, Deep Learning and NLP Examples Rating: 0 out of 5 stars0 ratingsMulticriteria Portfolio Construction with Python Rating: 0 out of 5 stars0 ratingsPractical Machine Learning for Streaming Data with Python: Design, Develop, and Validate Online Learning Models Rating: 0 out of 5 stars0 ratingsImplementing AI Systems: Transform Your Business in 6 Steps Rating: 0 out of 5 stars0 ratingsLearning Quantitative Finance with R Rating: 4 out of 5 stars4/5Deep Learning for Data Architects: Unleash the power of Python's deep learning algorithms (English Edition) Rating: 0 out of 5 stars0 ratingsLearn R for Applied Statistics: With Data Visualizations, Regressions, and Statistics Rating: 0 out of 5 stars0 ratingsDeep Belief Nets in C++ and CUDA C: Volume 2: Autoencoding in the Complex Domain Rating: 0 out of 5 stars0 ratingsDeep Learning with Applications Using Python: Chatbots and Face, Object, and Speech Recognition With TensorFlow and Keras Rating: 0 out of 5 stars0 ratingsDeep Belief Nets in C++ and CUDA C: Volume 1: Restricted Boltzmann Machines and Supervised Feedforward Networks Rating: 0 out of 5 stars0 ratingsGraph Data Science with Python and Neo4j Rating: 0 out of 5 stars0 ratingsPython AI Programming Rating: 0 out of 5 stars0 ratingsPython AI Programming: Navigating fundamentals of ML, deep learning, NLP, and reinforcement learning in practice Rating: 0 out of 5 stars0 ratingsDeep Learning with Azure: Building and Deploying Artificial Intelligence Solutions on the Microsoft AI Platform Rating: 0 out of 5 stars0 ratingsPyTorch Recipes: A Problem-Solution Approach Rating: 0 out of 5 stars0 ratingsPractical Data Analysis - Second Edition Rating: 0 out of 5 stars0 ratingsPython Machine Learning By Example Rating: 4 out of 5 stars4/5Python Data Science Essentials Rating: 0 out of 5 stars0 ratingsData Science Fundamentals for Python and MongoDB Rating: 0 out of 5 stars0 ratings
Intelligence (AI) & Semantics For You
Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Artificial Intelligence: A Guide for Thinking Humans Rating: 4 out of 5 stars4/52084: Artificial Intelligence and the Future of Humanity Rating: 4 out of 5 stars4/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5Summary of Super-Intelligence From Nick Bostrom Rating: 5 out of 5 stars5/5101 Midjourney Prompt Secrets Rating: 3 out of 5 stars3/5ChatGPT For Fiction Writing: AI for Authors Rating: 5 out of 5 stars5/5The Secrets of ChatGPT Prompt Engineering for Non-Developers Rating: 5 out of 5 stars5/5Our Final Invention: Artificial Intelligence and the End of the Human Era Rating: 4 out of 5 stars4/5Dark Aeon: Transhumanism and the War Against Humanity Rating: 5 out of 5 stars5/5Chat-GPT Income Ideas: Pioneering Monetization Concepts Utilizing Conversational AI for Profitable Ventures Rating: 4 out of 5 stars4/5Midjourney Mastery - The Ultimate Handbook of Prompts Rating: 5 out of 5 stars5/5Discovery Writing with ChatGPT: AI-Powered Storytelling: Three Story Method, #6 Rating: 0 out of 5 stars0 ratingsImpromptu: Amplifying Our Humanity Through AI Rating: 5 out of 5 stars5/5What Makes Us Human: An Artificial Intelligence Answers Life's Biggest Questions Rating: 5 out of 5 stars5/5ChatGPT For Dummies Rating: 0 out of 5 stars0 ratingsThe Algorithm of the Universe (A New Perspective to Cognitive AI) Rating: 5 out of 5 stars5/5ChatGPT Ultimate User Guide - How to Make Money Online Faster and More Precise Using AI Technology Rating: 0 out of 5 stars0 ratingsAI for Educators: AI for Educators Rating: 5 out of 5 stars5/5Ways of Being: Animals, Plants, Machines: The Search for a Planetary Intelligence Rating: 4 out of 5 stars4/5The Business Case for AI: A Leader's Guide to AI Strategies, Best Practices & Real-World Applications Rating: 0 out of 5 stars0 ratingsTHE CHATGPT MILLIONAIRE'S HANDBOOK: UNLOCKING WEALTH THROUGH AI AUTOMATION Rating: 5 out of 5 stars5/5
Reviews for Implementing Machine Learning for Finance
0 ratings0 reviews
Book preview
Implementing Machine Learning for Finance - Tshepo Chris Nokeri
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
T. C. NokeriImplementing Machine Learning for Financehttps://doi.org/10.1007/978-1-4842-7110-0_1
1. Introduction to Financial Markets and Algorithmic Trading
Tshepo Chris Nokeri¹
(1)
Pretoria, South Africa
This is the initial chapter of a book that presents algorithmic trading. This chapter carefully covers the foreign exchange (FX) market and the stock market. It explores how we pair, quote, and exchange official currencies. Subsequently, it covers the stock exchange. In addition, it presents key market participants, principal brokers, liquidity providers, modern technologies, and software platforms that facilitate the exchange of currencies and shares. Furthermore, it looks at the speculative nature of the FX market and stock exchange market and specific aspects of investment risk management. Last, it covers several machine learning methods that we can apply to combat problems in finance.
FX Market
The FX market represents an international market in which investors exchange currency for another. It does not have a principal visible location in which transactions occur, each investor holds their own transaction records, and each transaction happens electronically. Key market participants self-regulate using guidelines prescribed by a regulatory body within their geographic boundaries.
Exchange Rate
Each official country generally has its own currency. The currency is a class of payments administered and distributed by the central government and dispersed around their geographic boundaries. In relation to foreign trade, an individual or corporation that purchases foreign goods or services and sells them to their local market typically has to exchange currencies. We universally recognize an exchange rate as the ratio of the price of a local currency to a foreign currency. The major currencies include the US dollar ($), euro (€), Great Britain pound (£), Japanese yen (¥), etc. The cross rate is the price of a currency against another, where the US dollar is uninvolved. For instance, euro/GBP is a cross rate between the euro and the sterling.
Exchange Rates Quotation
An exchange rate represents the price of a currency relative to an alternative. We quote currencies directly or indirectly. Using the direct method, the exchange shows how much we have to exchange the local currency for one unit of a foreign currency. For instance, EUR/USD = 1.19. The indirect method shows how much foreign currency trades for one unit of the local currency. For instance, USD/EUR = 0.84.
Exchange Rate Movement
The exchange rate is inconstant; it varies over time. There are several prime factors that influence changes in the exchange rate. For instance, economic and growth factors such as gross domestic product growth (GDP), inflation rates (consumer price index or GDP deflator), and stocks traded, external debt stocks, current account balance, total reserves, etc. In other instances, rates may react to geopolitical news, natural disasters, labor union activities, social-unrest, corporate scandals, among others. When changes befall, we say that one currency is stronger or weaker than another currency. For instance, with the EUR/USD currency pair, if the euro strengthens, the USD progressively weakens. Let’s say EUR/USD opened at 1.2100 and closed at 1.2190; we say that the EUR strengthened since 1 EUR bought more USD at the close than at open.
Assuming an investor buys 1 million euros at 1.2100 at the open, assuming it will strengthen on that day, but the euro closes at 1.2190, the investor has experienced $7 383. 10(€9000) loss.
$$ Euro\ Loss=\frac{+\$1\ 000\ 0000=-\$1\ 000\ 000=\kern0.5em }{-0-}\frac{-\text{\EUR} 1\ 219\ 000+\text{\EUR} 1\ 210\ 000\ }{\text{\EUR} 9\ 000} $$Bids and Offers
A market maker represents an organization that exchanges currencies on its own account at prices reflected on their systems. Common market makers include banks and brokers. They quote two rates as follows:
Bid: The rate at which market makers buy the currency
Offer: The rate at which market makers sell the base currency
The Left Bid and Right Offer Rule
As tricky as it may be when market makers trade, they are buying and selling at the same time. They buy the base currency on the left side of the quote and sell the currency on the right side of the quote. For instance, if a market maker quotes the EUR/USD at 1.2100/15, they will buy the dollars at €1.2100 and sell them at €1.2115.
The difference between the bid and offer is called the spread. It informs us about liquidity. The more liquid the market, the more narrow the spread. To understand how this works, let’s look at the minor currency pairs and major currencies. Currency pairs in emerging markets such as South African rand to rupees (ZAR/INR), Bangladeshi taka to Omani rial (BDT/OMR), among others, have low trading activities and are traded in small quantities. This results in higher spreads when compared to major currencies such as the GBP to the US dollar (USD), Australian dollar to the US dollar, etc. Equation 1-1 shows how we find the spread.
$$ Spread= Bid- Ask $$(Equation 1-1)
Consider the scenario where the EUR/USD is quoted at 1.2100/15; the spread equals 0.015.
The margin represents the difference between the bid and ask divided by the ask. It can be written mathematically as in Equation 1-2.
$$ Margin=\kern0.5em \left( Bid- Ask\right)/ Ask\kern0.5em \ast 100\% $$(Equation 1-2)
Margin equals 1.2381 percent.
Assume you are a US tourist who is visiting Europe and wants euros; you must buy the euros using the US dollars you arrived with. The market makers will sell them to you at €1.2115. In contrast, if you are on the seller’s side, the market maker buys the currency at