Probabilistic Machine Learning for Finance and Investing: A Primer to Generative AI with Python

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

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.

Author(s): Deepak K. Kanungo
Publisher: O’Reilly
Year: 2023

Language: English
Pages: 264

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