Probabilistic Machine Learning for Finance and Investing (Sixth Early Release)
9781492097679, 9781492097617
Whether based on academic theories or machine learning strategies, all financial models are at the mercy of modeling err
2,298
221
15MB
English
Pages 266
Year 2023
Report DMCA / Copyright
DOWNLOAD EPUB FILE
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
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
Conclusions
References
Further Reading
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
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
Further Reading
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
Conclusions
References
Further Reading
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
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
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
Financial activities
Objective function
Performance metrics
Analyze Data and Engineer Features
Data exploration
Feature engineering
Data analysis
Develop and Retrodict Prior Ensemble
Specify distributions and their parameters
Sample distributions and simulate data
Evaluate and revise untrained model
Train and Retrodict Posterior Model
Train and sample posterior
Retrodict and simulate training data
Evaluate and revise trained model
Test and Evaluate Ensemble Predictions
Swap data and resample posterior predictive
Predict and simulate test data
Evaluate, revise, or deploy ensemble
Summary
References
Further Reading
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
Value at Risk
Expected Shortfall
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