Probabilistic Machine Learning for Finance and Investing

Book description

There are several reasons why probabilistic machine learning represents the next-generation ML framework and technology for finance and investing. This generative ensemble learns continually from small and noisy financial datasets while seamlessly enabling probabilistic inference, retrodiction, prediction, and counterfactual reasoning. Probabilistic ML also lets you systematically encode personal, empirical, and institutional knowledge into ML models.

Whether they're based on academic theories or ML strategies, all financial models are subject to modeling errors that can be mitigated but not eliminated. Probabilistic ML systems treat uncertainties and errors of financial and investing systems as features, not bugs. And they quantify uncertainty generated from inexact inputs and outputs as probability distributions, not point estimates. This makes for realistic financial inferences and predictions that are useful for decision-making and risk management.

Unlike conventional AI, these systems are capable of warning us when their inferences and predictions are no longer useful in the current market environment. By moving away from flawed statistical methodologies and a restrictive conventional view of probability as a limiting frequency, you’ll move toward an intuitive view of probability as logic within an axiomatic statistical framework that comprehensively and successfully quantifies uncertainty. This book shows you how.

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Who Should Read This Book?
    2. Why I Wrote This Book
    3. Navigating 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. 1. The Need for Probabilistic Machine Learning
    1. Finance Is Not Physics
    2. All Financial Models Are Wrong, Most Are Useless
    3. The Trifecta of Modeling Errors
      1. Errors in Model Specification
      2. Errors in Model Parameter Estimates
      3. Errors from the Failure of a Model to Adapt to Structural Changes
    4. Probabilistic Financial Models
    5. Financial AI and ML
    6. Probabilistic ML
      1. Probability Distributions
      2. Knowledge Integration
      3. Parameter Inference
      4. Generative Ensembles
      5. Uncertainty Awareness
    7. Summary
    8. References
    9. Further Reading
  3. 2. Analyzing and Quantifying Uncertainty
    1. The Monty Hall Problem
    2. Axioms of Probability
    3. Inverting Probabilities
    4. Simulating the Solution
    5. Meaning of Probability
      1. Frequentist Probability
      2. Epistemic Probability
      3. Relative Probability
    6. Risk Versus Uncertainty: A Useless Distinction
    7. The Trinity of Uncertainty
      1. Aleatory Uncertainty
      2. Epistemic Uncertainty
      3. Ontological Uncertainty
    8. The No Free Lunch Theorems
    9. Investing and the Problem of Induction
    10. The Problem of Induction, NFL Theorems, and Probabilistic Machine Learning
    11. Summary
    12. References
  4. 3. Quantifying Output Uncertainty with Monte Carlo Simulation
    1. Monte Carlo Simulation: Proof of Concept
    2. Key Statistical Concepts
      1. Mean and Variance
      2. Expected Value: Probability-Weighted Arithmetic Mean
      3. Why Volatility Is a Nonsensical Measure of Risk
      4. Skewness and Kurtosis
      5. The Gaussian or Normal Distribution
      6. Why Volatility Underestimates Financial Risk
      7. The Law of Large Numbers
      8. The Central Limit Theorem
    3. Theoretical Underpinnings of MCS
    4. Valuing a Software Project
    5. Building a Sound MCS
    6. Summary
    7. References
  5. 4. The Dangers of Conventional Statistical Methodologies
    1. The Inverse Fallacy
    2. NHST Is Guilty of the Prosecutor’s Fallacy
    3. The Confidence Game
      1. Single-Factor Market Model for Equities
      2. Simple Linear Regression with Statsmodels
      3. Confidence Intervals for Alpha and Beta
    4. Unveiling the Confidence Game
      1. Errors in Making Probabilistic Claims About Population Parameters
      2. Errors in Making Probabilistic Claims About a Specific Confidence Interval
      3. Errors in Making Probabilistic Claims About Sampling Distributions
    5. Summary
    6. References
    7. Further Reading
  6. 5. The Probabilistic Machine Learning Framework
    1. Investigating the Inverse Probability Rule
    2. Estimating the Probability of Debt Default
    3. Generating Data with Predictive Probability Distributions
    4. Summary
    5. Further Reading
  7. 6. The Dangers of Conventional AI Systems
    1. AI Systems: A Dangerous Lack of Common Sense
    2. Why MLE Models Fail in Finance
      1. An MLE Model for Earnings Expectations
      2. A Probabilistic Model for Earnings Expectations
    3. Markov Chain Monte Carlo Simulations
      1. Markov Chains
      2. Metropolis Sampling
    4. Summary
    5. References
  8. 7. Probabilistic Machine Learning with Generative Ensembles
    1. MLE Regression Models
      1. Market Model
      2. Model Assumptions
      3. Learning Parameters Using MLE
      4. Quantifying Parameter Uncertainty with Confidence Intervals
      5. Predicting and Simulating Model Outputs
    2. Probabilistic Linear Ensembles
      1. Prior Probability Distributions P(a, b, e)
      2. Likelihood Function P(Y| a, b, e, X)
      3. Marginal Likelihood Function P(Y|X)
      4. Posterior Probability Distributions P(a, b, e| X, Y)
    3. Assembling PLEs with PyMC and ArviZ
      1. Define Ensemble Performance Metrics
      2. Analyze Data and Engineer Features
      3. Develop and Retrodict Prior Ensemble
      4. Train and Retrodict Posterior Model
      5. Test and Evaluate Ensemble Predictions
    4. Summary
    5. References
    6. Further Reading
  9. 8. Making Probabilistic Decisions with Generative Ensembles
    1. Probabilistic Inference and Prediction Framework
    2. Probabilistic Decision-Making Framework
      1. Integrating Subjectivity
      2. Estimating Losses
      3. Minimizing Losses
    3. Risk Management
      1. Capital Preservation
      2. Ergodicity
      3. Generative Value at Risk
      4. Generative Expected Shortfall
      5. Generative Tail Risk
    4. Capital Allocation
      1. Gambler’s Ruin
      2. Expected Valuer’s Ruin
      3. Modern Portfolio Theory
      4. Markowitz Investor’s Ruin
      5. Kelly Criterion
      6. Kelly Investor’s Ruin
    5. Summary
    6. References
    7. Further Reading
  10. Index
  11. About the Author

Product information

  • Title: Probabilistic Machine Learning for Finance and Investing
  • Author(s): Deepak K. Kanungo
  • Release date: August 2023
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492097679