AI for Finance
Machine learning for markets and money: how quant firms work, portfolios and factors, honest backtesting, financial text, credit risk, and LLMs in finance. Education, not investment advice.
Before this: Machine Learning and Python & Math for AI. Time Series & Forecasting helps.
-
50 min
Step 1How quantitative trading firms work
Market making versus market taking, and how quants turn forecasts into trades.
Introduction to Quantitative TradingMemLabs
-
30 min
Step 2Option pricing and the Black-Scholes story
From Bachelier's random walks to Black-Scholes, hedging, and the rise of quant funds.
The Equation That Beat Wall StreetVeritasium
-
8 min
Step 3Factor models: Fama and French
John Cochrane on adding size and value factors to the market to explain returns.
1.1 The Fama/French 3-Factor ModelUChicago Online
-
23 min
Step 4Portfolio optimization in Python
Mean-variance weights built from estimated returns and covariances, so estimates drive results.
Portfolio Optimization in Python: Boost Your Financial PerformanceRyan O'Connell, CFA, FRM
-
10 min
Step 5Backtest a strategy in Python
Code a simple strategy and replay it on historical prices with backtesting.py.
Backtesting.py (1/2) - Backtest Trading Strategies in PythonPart Time Larry
kernc/backtesting.py★ 9.3k -
22 min
Step 6Test a backtest against chance
Permuting price changes and rebuilding price paths gives a chance baseline; passing doesn't promise profit.
How I Develop Trading Strategies | Permutation Tests and Trading Strategy Development with Pythonneurotrader
neurotrader888/mcpt★ 441 -
1h 14m
Step 7Why most machine learning funds fail
López de Prado's seven pitfalls, including bad labels, leaky cross-validation, overfit backtests.
The 7 Reasons Most Machine Learning Funds Fail Marcos Lopez de Prado from QuantCon 2018Quantopian
-
2h 59m
Step 8Three ML trading strategies, end to end
Clustering S&P 500 stocks, Twitter sentiment ranking, and a GARCH intraday signal, all coded.
Algorithmic Trading – Machine Learning & Quant Strategies Course with PythonfreeCodeCamp.org
-
24 min
Step 9Financial sentiment with FinBERT
Label financial text positive, negative, or neutral with a BERT tuned on finance.
Financial Text Sentiment Analysis in PythonNeuralNine
ProsusAI/finBERT★ 2.3k -
1h 06m
Step 10Credit risk modeling with machine learning
Predict loan risk on German credit data, handle imbalance, and serve it with Streamlit.
Credit Risk Modeling Using Machine Learning – Full Python Data Science Project (Step-by-Step)Onur Baltaci
-
20 min
Step 11LLMs in financial advice and risk
MIT's Andrew Lo on LLMs for financial advice and risk, and their current limits.
MIT Professor on How AI & LLMs are Shaping Financial Advice, Analysis, & Risk Management: Part 1MIT CSAIL
Build it
Watching isn't learning. Pick one and put it on GitHub.
- Backtest a moving-average crossover with backtesting.py, then run a permutation test on permuted price changes to see if it beats chance.
- Score a month of financial headlines with FinBERT and plot daily sentiment next to the stock's daily returns.
- Train a credit-risk classifier on the German credit data, report precision and recall, and explain it with SHAP.