The widespread adoption of AI and machine learning is revolutionizing many industries today. Once these technologies are combined with the programmatic availability of historical and real-time financial data, the financial industry will also change fundamentally. With this practical book, you'll learn how to use AI and machine learning to discover statistical inefficiencies in financial markets and exploit them through algorithmic trading.
Author Yves Hilpisch shows practitioners, students, and academics in both finance and data science practical ways to apply machine learning and deep learning algorithms to finance. Thanks to lots of self-contained Python examples, you'll be able to replicate all results and figures presented in the book.
In five parts, this guide helps you:
• Learn central notions and algorithms from AI, including recent breakthroughs on the way to artificial general intelligence (AGI) and superintelligence (SI)
• Understand why data-driven finance, AI, and machine learning will have a lasting impact on financial theory and practice
• Apply neural networks and reinforcement learning to discover statistical inefficiencies in financial markets
• Identify and exploit economic inefficiencies through backtesting and algorithmic trading--the automated execution of trading strategies
• Understand how AI will influence the competitive dynamics in the financial industry and what the potential emergence of a financial singularity might bring about
Author(s): Yves Hilpisch
Edition: 1
Publisher: O'Reilly Media
Year: 2020
Language: English
Commentary: Vector PDF
Pages: 478
City: Sebastopol, CA
Tags: Machine Learning; Neural Networks; Reinforcement Learning; Regression; Python; Recurrent Neural Networks; Classification; Risk; Finance; Risk Management; Portfolio Management; Capital Asset Pricing Model; Uncertainty; Algorithmic Trading; Arbitrage Pricing Theory; Financial Singularity
Cover
Copyright
Table of Contents
Preface
References
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Part I. Machine Intelligence
Chapter 1. Artificial Intelligence
Algorithms
Types of Data
Types of Learning
Types of Tasks
Types of Approaches
Neural Networks
OLS Regression
Estimation with Neural Networks
Classification with Neural Networks
Importance of Data
Small Data Set
Larger Data Set
Big Data
Conclusions
References
Chapter 2. Superintelligence
Success Stories
Atari
Go
Chess
Importance of Hardware
Forms of Intelligence
Paths to Superintelligence
Networks and Organizations
Biological Enhancements
Brain-Machine Hybrids
Whole Brain Emulation
Artificial Intelligence
Intelligence Explosion
Goals and Control
Superintelligence and Goals
Superintelligence and Control
Potential Outcomes
Conclusions
References
Part II. Finance and Machine Learning
Chapter 3. Normative Finance
Uncertainty and Risk
Definitions
Numerical Example
Expected Utility Theory
Assumptions and Results
Numerical Example
Mean-Variance Portfolio Theory
Assumptions and Results
Numerical Example
Capital Asset Pricing Model
Assumptions and Results
Numerical Example
Arbitrage Pricing Theory
Assumptions and Results
Numerical Example
Conclusions
References
Chapter 4. Data-Driven Finance
Scientific Method
Financial Econometrics and Regression
Data Availability
Programmatic APIs
Structured Historical Data
Structured Streaming Data
Unstructured Historical Data
Unstructured Streaming Data
Alternative Data
Normative Theories Revisited
Expected Utility and Reality
Mean-Variance Portfolio Theory
Capital Asset Pricing Model
Arbitrage Pricing Theory
Debunking Central Assumptions
Normally Distributed Returns
Linear Relationships
Conclusions
References
Python Code
Chapter 5. Machine Learning
Learning
Data
Success
Capacity
Evaluation
Bias and Variance
Cross-Validation
Conclusions
References
Chapter 6. AI-First Finance
Efficient Markets
Market Prediction Based on Returns Data
Market Prediction with More Features
Market Prediction Intraday
Conclusions
References
Part III. Statistical Inefficiencies
Chapter 7. Dense Neural Networks
The Data
Baseline Prediction
Normalization
Dropout
Regularization
Bagging
Optimizers
Conclusions
References
Chapter 8. Recurrent Neural Networks
First Example
Second Example
Financial Price Series
Financial Return Series
Financial Features
Estimation
Classification
Deep RNNs
Conclusions
References
Chapter 9. Reinforcement Learning
Fundamental Notions
OpenAI Gym
Monte Carlo Agent
Neural Network Agent
DQL Agent
Simple Finance Gym
Better Finance Gym
FQL Agent
Conclusions
References
Part IV. Algorithmic Trading
Chapter 10. Vectorized Backtesting
Backtesting an SMA-Based Strategy
Backtesting a Daily DNN-Based Strategy
Backtesting an Intraday DNN-Based Strategy
Conclusions
References
Chapter 11. Risk Management
Trading Bot
Vectorized Backtesting
Event-Based Backtesting
Assessing Risk
Backtesting Risk Measures
Stop Loss
Trailing Stop Loss
Take Profit
Conclusions
References
Python Code
Finance Environment
Trading Bot
Backtesting Base Class
Backtesting Class
Chapter 12. Execution and Deployment
Oanda Account
Data Retrieval
Order Execution
Trading Bot
Deployment
Conclusions
References
Python Code
Oanda Environment
Vectorized Backtesting
Oanda Trading Bot
Part V. Outlook
Chapter 13. AI-Based Competition
AI and Finance
Lack of Standardization
Education and Training
Fight for Resources
Market Impact
Competitive Scenarios
Risks, Regulation, and Oversight
Conclusions
References
Chapter 14. Financial Singularity
Notions and Definitions
What Is at Stake?
Paths to Financial Singularity
Orthogonal Skills and Resources
Scenarios Before and After
Star Trek or Star Wars
Conclusions
References
Part VI. Appendixes
Appendix A. Interactive Neural Networks
Tensors and Tensor Operations
Simple Neural Networks
Estimation
Classification
Shallow Neural Networks
Estimation
Classification
References
Appendix B. Neural Network Classes
Activation Functions
Simple Neural Networks
Estimation
Classification
Shallow Neural Networks
Estimation
Classification
Predicting Market Direction
Appendix C. Convolutional Neural Networks
Features and Labels Data
Training the Model
Testing the Model
Resources
Index
About the Author
Colophon