Probabilistic Machine Learning for Finance and Investing (Sixth Early Release)

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"

Whether based on academic theories or machine learning strategies, all financial models are at the mercy of modeling errors that can be mitigated but not eliminated. Probabilistic ML technologies are based on a simple and intuitive definition of probability and the rigorous calculus of probability theory. These 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. These systems are capable of warning us when their inferences and predictions are no longer useful in the current market environment. Probabilistic ML is the next generation ML framework and technology for AI-powered financial and investing systems for many reasons. 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 a mathematically rigorous statistical framework that quantifies uncertainty holistically and successfully. This book shows you how.

Author(s): Deepak Kanungo
Publisher: O'Reilly Media, Inc.
Year: 2023

Language: English
Pages: 266

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