Reinforcement Learning for Finance

Book description

Reinforcement learning (RL) has led to several breakthroughs in AI. The use of the Q-learning (DQL) algorithm alone has helped people develop agents that play arcade games and board games at a superhuman level. More recently, RL, DQL, and similar methods have gained popularity in publications related to financial research.

This book is among the first to explore the use of reinforcement learning methods in finance.

Author Yves Hilpisch, founder and CEO of The Python Quants, provides the background you need in concise fashion. ML practitioners, financial traders, portfolio managers, strategists, and analysts will focus on the implementation of these algorithms in the form of self-contained Python code and the application to important financial problems.

This book covers:

  • Reinforcement learning
  • Deep Q-learning
  • Python implementations of these algorithms
  • How to apply the algorithms to financial problems such as algorithmic trading, dynamic hedging, and dynamic asset allocation

This book is the ideal reference on this topic. You'll read it once, change the examples according to your needs or ideas, and refer to it whenever you work with RL for finance.

Dr. Yves Hilpisch is founder and CEO of The Python Quants, a group that focuses on the use of open source technologies for financial data science, AI, asset management, algorithmic trading, and computational finance.

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Target Audience
    2. Overview of the Book
    3. About the Code in This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. I. The Basics
  3. 1. Learning Through Interaction
    1. Bayesian Learning
      1. Tossing a Biased Coin
      2. Rolling a Biased Die
      3. Bayesian Updating
    2. Reinforcement Learning
      1. Major Breakthroughs
      2. Major Building Blocks
    3. Deep Q-Learning
    4. Conclusions
    5. References
  4. 2. Deep Q-Learning
    1. Decision Problems
    2. Dynamic Programming
    3. Q-Learning
    4. CartPole as an Example
      1. The Game Environment
      2. A Random Agent
      3. The DQL Agent
    5. Q-Learning Versus Supervised Learning
    6. Conclusions
    7. References
  5. 3. Financial Q-Learning
    1. Finance Environment
    2. DQL Agent
    3. Where the Analogy Fails
      1. Limited Data
      2. No Impact
    4. Conclusions
    5. References
  6. II. Data Augmentation
  7. 4. Simulated Data
    1. Noisy Time Series Data
    2. Simulated Time Series Data
    3. Conclusions
    4. References
    5. DQLAgent Python Class
  8. 5. Generated Data
    1. Simple Example
    2. Financial Example
    3. Kolmogorov-Smirnov Test
    4. Conclusions
    5. References
  9. III. Financial Applications
  10. 6. Algorithmic Trading
    1. Prediction Game Revisited
    2. Trading Environment
    3. Trading Agent
    4. Conclusions
    5. References
    6. Finance Environment
    7. DQLAgent Class
    8. Simulation Environment
  11. 7. Dynamic Hedging
    1. Delta Hedging
    2. Hedging Environment
    3. Hedging Agent
    4. Conclusions
    5. References
    6. BSM (1973) Formula
  12. 8. Dynamic Asset Allocation
    1. Two-Fund Separation
    2. Two-Asset Case
    3. Three-Asset Case
    4. Equally Weighted Portfolio
    5. Conclusions
    6. References
    7. Three-Asset Code
  13. 9. Optimal Execution
    1. The Model
    2. Model Implementation
    3. Execution Environment
    4. Random Agent
    5. Execution Agent
    6. Conclusions
    7. References
  14. 10. Concluding Remarks
    1. References
  15. Index
  16. About the Author

Product information

  • Title: Reinforcement Learning for Finance
  • Author(s): Yves Hilpisch
  • Release date: October 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098169145