Artificial Intelligence in Finance

Book description

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

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. References
    2. Conventions Used in This Book
    3. Using Code Examples
    4. O’Reilly Online Learning
    5. How to Contact Us
    6. Acknowledgments
  2. I. Machine Intelligence
  3. 1. Artificial Intelligence
    1. Algorithms
      1. Types of Data
      2. Types of Learning
      3. Types of Tasks
      4. Types of Approaches
    2. Neural Networks
      1. OLS Regression
      2. Estimation with Neural Networks
      3. Classification with Neural Networks
    3. Importance of Data
      1. Small Data Set
      2. Larger Data Set
      3. Big Data
    4. Conclusions
    5. References
  4. 2. Superintelligence
    1. Success Stories
      1. Atari
      2. Go
      3. Chess
    2. Importance of Hardware
    3. Forms of Intelligence
    4. Paths to Superintelligence
      1. Networks and Organizations
      2. Biological Enhancements
      3. Brain-Machine Hybrids
      4. Whole Brain Emulation
      5. Artificial Intelligence
    5. Intelligence Explosion
    6. Goals and Control
      1. Superintelligence and Goals
      2. Superintelligence and Control
    7. Potential Outcomes
    8. Conclusions
    9. References
  5. II. Finance and Machine Learning
  6. 3. Normative Finance
    1. Uncertainty and Risk
      1. Definitions
      2. Numerical Example
    2. Expected Utility Theory
      1. Assumptions and Results
      2. Numerical Example
    3. Mean-Variance Portfolio Theory
      1. Assumptions and Results
      2. Numerical Example
    4. Capital Asset Pricing Model
      1. Assumptions and Results
      2. Numerical Example
    5. Arbitrage Pricing Theory
      1. Assumptions and Results
      2. Numerical Example
    6. Conclusions
    7. References
  7. 4. Data-Driven Finance
    1. Scientific Method
    2. Financial Econometrics and Regression
    3. Data Availability
      1. Programmatic APIs
      2. Structured Historical Data
      3. Structured Streaming Data
      4. Unstructured Historical Data
      5. Unstructured Streaming Data
      6. Alternative Data
    4. Normative Theories Revisited
      1. Expected Utility and Reality
      2. Mean-Variance Portfolio Theory
      3. Capital Asset Pricing Model
      4. Arbitrage Pricing Theory
    5. Debunking Central Assumptions
      1. Normally Distributed Returns
      2. Linear Relationships
    6. Conclusions
    7. References
    8. Python Code
  8. 5. Machine Learning
    1. Learning
    2. Data
    3. Success
    4. Capacity
    5. Evaluation
    6. Bias and Variance
    7. Cross-Validation
    8. Conclusions
    9. References
  9. 6. AI-First Finance
    1. Efficient Markets
    2. Market Prediction Based on Returns Data
    3. Market Prediction with More Features
    4. Market Prediction Intraday
    5. Conclusions
    6. References
  10. III. Statistical Inefficiencies
  11. 7. Dense Neural Networks
    1. The Data
    2. Baseline Prediction
    3. Normalization
    4. Dropout
    5. Regularization
    6. Bagging
    7. Optimizers
    8. Conclusions
    9. References
  12. 8. Recurrent Neural Networks
    1. First Example
    2. Second Example
    3. Financial Price Series
    4. Financial Return Series
    5. Financial Features
      1. Estimation
      2. Classification
      3. Deep RNNs
    6. Conclusions
    7. References
  13. 9. Reinforcement Learning
    1. Fundamental Notions
    2. OpenAI Gym
    3. Monte Carlo Agent
    4. Neural Network Agent
    5. DQL Agent
    6. Simple Finance Gym
    7. Better Finance Gym
    8. FQL Agent
    9. Conclusions
    10. References
  14. IV. Algorithmic Trading
  15. 10. Vectorized Backtesting
    1. Backtesting an SMA-Based Strategy
    2. Backtesting a Daily DNN-Based Strategy
    3. Backtesting an Intraday DNN-Based Strategy
    4. Conclusions
    5. References
  16. 11. Risk Management
    1. Trading Bot
    2. Vectorized Backtesting
    3. Event-Based Backtesting
    4. Assessing Risk
    5. Backtesting Risk Measures
      1. Stop Loss
      2. Trailing Stop Loss
      3. Take Profit
    6. Conclusions
    7. References
    8. Python Code
      1. Finance Environment
      2. Trading Bot
      3. Backtesting Base Class
      4. Backtesting Class
  17. 12. Execution and Deployment
    1. Oanda Account
    2. Data Retrieval
    3. Order Execution
    4. Trading Bot
    5. Deployment
    6. Conclusions
    7. References
    8. Python Code
      1. Oanda Environment
      2. Vectorized Backtesting
      3. Oanda Trading Bot
  18. V. Outlook
  19. 13. AI-Based Competition
    1. AI and Finance
    2. Lack of Standardization
    3. Education and Training
    4. Fight for Resources
    5. Market Impact
    6. Competitive Scenarios
    7. Risks, Regulation, and Oversight
    8. Conclusions
    9. References
  20. 14. Financial Singularity
    1. Notions and Definitions
    2. What Is at Stake?
    3. Paths to Financial Singularity
    4. Orthogonal Skills and Resources
    5. Scenarios Before and After
    6. Star Trek or Star Wars
    7. Conclusions
    8. References
  21. VI. Appendixes
  22. A. Interactive Neural Networks
    1. Tensors and Tensor Operations
    2. Simple Neural Networks
      1. Estimation
      2. Classification
    3. Shallow Neural Networks
      1. Estimation
      2. Classification
    4. References
  23. B. Neural Network Classes
    1. Activation Functions
    2. Simple Neural Networks
      1. Estimation
      2. Classification
    3. Shallow Neural Networks
      1. Estimation
      2. Classification
    4. Predicting Market Direction
  24. C. Convolutional Neural Networks
    1. Features and Labels Data
    2. Training the Model
    3. Testing the Model
    4. Resources
  25. Index

Product information

  • Title: Artificial Intelligence in Finance
  • Author(s): Yves Hilpisch
  • Release date: October 2020
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492055433